Component Manual for the Neutron Ray-Tracing Package McStas, version 3.8.6

2.5  Accuracy of Monte Carlo simulations

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.

McStas uses a space with \(d=10\) parameters to describe neutrons (position, velocity, spin, 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 Accuracy


\(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 McStas.