Simulation and modeling - Old Questions

Question Answer Details

7.  Why an auto-correlation test is needed in random number?

5 marks
Asked in 2069

Answer

AI Generated Answer

AI is thinking...

Official Answer

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 $\\rho_{im}$ between the following numbers would be of interest.

\\begin{displaymath}R_i, R_{i+m}, R_{i+2m}, ... R_{i+(M+1)m} \\end{displaymath}

The value M is the largest integer such that $i + (M+1)m \\le N$ where N is the total number of values in the sequence.

For large values of M, the distribution of the estimator $\\rho_{im}$, denoted as $\\hat{\\rho_{im}}$, is approximately normal if the values $ R_i, R_{i+m}, R_{i+2m}, ... R_{i+(M+1)m}$ are uncorrelated.

Form the test statistic:

\\begin{displaymath}Z_0 = \\frac{\\hat{\\rho_{im}}} { \\sigma_{\\hat{\\rho_{im}}}} \\end{displaymath}

The actual formula for $\\hat{\\rho_{im}}$ and the standard deviation is

\\begin{displaymath}\\hat{\\rho_{im}} = \\frac{1}{M+1} \\left[ \\sum_{k=0}^M R_{i+km}
R_{(k+1)m} \\right] - 0.25 \\end{displaymath}

and  \\begin{displaymath}\\sigma_{\\hat{\\rho_{im}}} = \\frac{\\sqrt{13M+7}}{12(M+1)} \\end{displaymath}

After computing $Z_0$, do not reject the null hypothesis of independence if \\begin{displaymath}- z_{\\alpha/2} \\le Z_0 \\le z_{\\alpha/2} \\end{displaymath} where $\\alpha$ is the level of significance.