# Why are random numbers necessary for a Monte Carlo simulation?

This may be somewhat of a question with an obvious answer, but I can not seem to understand the necessity of "truly" random numbers to make a Monte Carlo simulation a good one.

I understand that not all simulations require "truly" random numbers...

Does it have something to do with the probability that such a number/value may be generated multiple times, offsetting the approximation?

I found this, but I have a bit of a hard time wrapping my head around it; could anyone could explain/elaborate more simply?

-
They don't have to be "truly" random. Look up quasi-Monte Carlo methods, for instance... –  Guess who it is. Feb 9 '12 at 2:51

It's not necessarily true that you need to use random numbers. There are some situations where random sampling is used, and others in which systematic sampling is used. We refer to the former as a Monte Carlo, the latter as numerical integration.

When you have a choice, it is typically better to use systematic sampling. For example, suppose we didn't know how to do $\int_{-1/2}^{1/2} x d x$ in closed form. With Monte Carlo simulation, we'd generate $N$ random numbers between $-1/2$ and 1/2 and average them. We would get an average close to zero, but the average would only converge to zero in proportion to $1/\sqrt{N}$, which is pathetic. Even the most simpleminded numerical integration method would give an error falling off like $1/N$.

But sometimes you don't have a choice. You might have 1000 random variables, and it's not practical to do an integral of the form $\int\int\int\ldots dx_1 dx_2 dx_3 \ldots$ nested 1000 deep by systematic sampling, because if your number of grid points along each axis is $N$, the number of samples you have to integrate is $N^{1000}$.

Another typical reason to prefer a Monte Carlo is that it's relatively easy to verify that a complex Monte Carlo is correct. All you really have to verify is that the random variables are being chosen with the correct distributions, and that any computations done on those random variables are correct. For example, in a big particle physics experiment, you could have hundreds of particles emitted in a collision, and hundreds of detectors sensing them, along with the electronics reading out the sensors. It's relatively straightforward to verify that a Monte Carlo simulation of this system is correct. The team in charge of detector 37 just has to characterize the behavior of their own detector and electronics correctly, and implement that in a subroutine. The other groups don't have to dig through the subroutine; they just have to know that it's a black box that works, and that has been thoroughly tested by that team by comparing against actual test-bench results on their detector. In a complex example like this, it's likely that nobody even knows how many random variables there are. A given team's subroutine might have a random number generation that is only activated in certain special situations. Nobody else knows that that random variable exists, and they don't need to know.

-
What is described in the third paragraph of Ben's answer is what's often referred to as the curse of dimensionality. We are lucky that (quasi-)Monte Carlo methods are not as affected by this as customary deterministic cubature methods are. –  Guess who it is. Feb 9 '12 at 3:42
very informative! i have 2 questions though, in the third paragrph, what do you mean by correct distributions? can you possibly provide a simple scenario where you would prefer systematic vs random sampling? –  NetSkay Feb 9 '12 at 4:25
@NetSkay: The random variables need not be uniformly distributed. For example, if I was doing a Monte Carlo simulation of plant growth, the number of times per week that an animal steps on the plant might be distributed according to a Poisson distribution. –  Ben Crowell Feb 9 '12 at 4:27
edited in my second question –  NetSkay Feb 9 '12 at 4:28