Simulation and modeling - Old Questions
7. Why an auto-correlation test is needed in random number?
Answer
AI is thinking...
Autocorrelation Test is needed to determines whether a random number generator is producing independent random number in a sequence. The test for the auto correlation is concerned with the dependence between numbers in a sequence.
The test computes the autocorrelation between every m numbers (m is also known as lag) starting with ith index. Thus the autocorrelation between the following numbers would be of interest.
The value M is the largest integer such that where N is the total number of values in the sequence.
For large values of M, the distribution of the estimator , denoted as
, is approximately normal if the values
are uncorrelated.
Form the test statistic:
The actual formula for and the standard deviation is
and
After computing , do not reject the null hypothesis of independence if
where
is the level of significance.