0
$\begingroup$

Monte Carlo methods typically require us to construct very large vectors of numbers. In doing so it is often of great importance that the generated random numbers are independent.

My question here, as someone who knows next to nothing about random number generators, is: Is there a risk that the shortcomings of some, or all, random number generators influence the end result of the Monte Carlo simulation in a noticeable way with some bias or subtle dependence between the random numbers?

I heard someone say that the commonly used Mersenne twister could only guarantee independence of the elements in up to 623 elements long vectors, which is way smaller than the typical length of a Monte Carlo sample. Don't know if I misunderstood that, but it would be nice if someone could shed some light on the matter.

$\endgroup$
1
  • $\begingroup$ The reason that rw dim numbers are used in montecarlo simulations is not because they are random, but instead because they span the n dimensional simulation space relatively uniformly, and 5his uniformity is conserved across all possible sub dimensions. There is no requirement that the numbers are actuslly random, and in fact there are many such sets of numbers for simulation which are not random which converge significantly faster. $\endgroup$
    – will
    Oct 26, 2020 at 22:03

2 Answers 2

5
$\begingroup$

You have misunderstood the statement in Matsumotos original paper. The original Mersenne twister guarantees, over its period of $2^{19937}-1$ (a number which I am sure you will agree is larger than the length of any Monte Carlo sequence ever devised), that every 623 dimensional uniformly distributed tuple occurs a fixed number of times, with each single uniform number (per dimension) being up to 32 bits in length. That is, the Mersenne twister can (or will, if run long enough) produce every 623-tuple of 32-bit integers. If we reduce that to a single tuple, the Mersenne twister is a uniformly distributed $623 \times 32 = 19936$ bit binary generator.

In other words, no, you do not need to worry - if the RNG is properly implemented that is.

However, sometimes we don't even need properly random numbers to do Monte Carlo, but that is another discussion.

$\endgroup$
2
  • $\begingroup$ Thanks, that is what I needed to know. I notice there seem to be a lot of different random number generators and new development in the area. Is this mostly academical or something that really would benefit Monte Carlo simulations in some way? $\endgroup$ Oct 26, 2020 at 21:45
  • $\begingroup$ @JesperTidblom: The problem is that for some problems to get a reasonably low variance (certainty that your number is close to the true value), you might need a lot of Monte Carlo samples. So there are tricks to reduce the variance without increasing the number of samples. One way that is directly associted with the random numbers themselves, is to do quasi-random numbers as suggested here. Intuitively if you draw samples from uniform(0,1), you would draw them so that they are "evenly spaced", e.g drawing two qasi samples would be $x_1 = 1/3$ and $x_2=2/3$ $\endgroup$ Dec 1, 2020 at 12:59
0
$\begingroup$

Check out the Xorshift method, which seems to be a better method than Mersenne Twister. It is also implemented here, documented here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.