[BLAST_ANAWARE] Uncertainty in Monte Carlo calculations

From: Douglas Hasell (hasell@mit.edu)
Date: Tue Mar 08 2005 - 11:19:56 EST


Hi,

        Just a follow up on the uncertainties in Monte Carlo calculations
which I raised a couple of weeks ago.

        It's rather obvious actually. Generating Monte Carlo events based on
a uniform random number distributed between 0 and 1 is a binomial
distribution. So if you generate "n" events and "m" find their way
into a given bin then the probability for an event going into that bin
is "p=m/n". If you repeat the Monte Carlo calculation many times then
the mean number of events which go to that bin is "np" and the variance
from calculation to calculation is "np(1-p)" where "p" now is the
average value of "m/n" for all the MC calculations. Since the
uncertainty (standard deviation, RMS) is the square root of the
variance (assuming the sample is statistically significant); then the
uncertainty in that bin is "sqrt(np(1-p))" or
sqrt(m(1-m/n))". This approaches gaussian or normal distribution when
"m/n~0" at which point the uncertainty in the number of events in the
bin is the square root of the number of entries in that bin.

        So the conclusion is: if you generate a large number of MC events and
only a small fraction of them end up in a given bin ( ie "m/n~0" ) you
can use the square root of the number of entries in that bin (
"sqrt(m)" ) for the uncertainty. Otherwise you must use "sqrt( m
(1-m/n) )".

          Hope that is clear. Let me know if there are any problems with this.

                                                                         
                      Cheers,
                                                                         
                                      Douglas

26-415 M.I.T.
Tel: +1 (617) 258-7199
77 Massachusetts Avenue Fax: +1 (617)
258-5440
Cambridge, MA 02139, USA E-mail:
hasell@mit.edu



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:32 EST