# Uncertainties of numerical results

1. Apr 21, 2013

### Niles

How do people generally determine uncertainties on results that are based on Monte Carlo simulations? Take this fictive example, just so we have something specific to talk about:

I look at 106 particles, confined to a box. There is a small hole in one of the walls, and at some time t0 I am interested in knowing how many particles N have diffused out of the box. This can be simulated by a Monte Carlo approach (Brownian motion).

This number N will vary each time I perform the simulation, but it will converge the larger I make the initial sample. Nonetheless, I guess an uncertainty is still present - how can we determine that in general?

Thanks for input in advance.

2. Apr 21, 2013

### mikeph

I'm not sure if there's a more elegant method, but I'd repeat the simulation multiple times and take the standard deviation of the results. Perhaps if it's too computationally expensive to do this with a very high N, you can repeat it for a few low N and extrapolate the uncertainty as a function of N using a curve fit? I assume it would be 1/sqrt(N)?