When running a Monte Carlo, the meaningful quantities are obtained by integrating random events into a single value (e.g. flux), or onto an histogram grid. The theory [Jam80] shows that the accuracy of these estimates is a function of the space dimension \(d\) and the number of events \(N\). For large numbers \(N\), the central limit theorem provides an estimate of the relative error as \(1/\sqrt {N}\). However, the exact expression depends on the random distributions.
McXtrace uses a space with \(d=12\) parameters to describe x-rays (position, wavevector, weight, polarisation, phase, time). We show in Table 2.1 a rough estimate of the accuracy on integrals as a function of the number of records reaching the integration point. This stands both for integrated flux, as well as for histogram bins - for which the number of events per bin should be used for \(N\).
| Records | Accurarcy |
| \(10^3\) | 10 % |
| \(10^4\) | 2.5 % |
| \(10^5\) | 1 % |
| \(10^6\) | 0.25 % |
| \(10^7\) | 0.05 % |
| Table 2.1.: | Accuracy estimate as a function of the number of statistical events used to estimate an integral with McXtrace. |