CSC328 ยท 2080 ยท 10 marks
What are the two main properties of random numbers? Test whether the 3rd, 7th, 11th, and so on numbers in the sequence in the following random number sample are auto-correlated. (Zalpha=0.05 and Z0.025=1.96) 0.12, 0.01, 0.23, 0.28, 0.89, 0.31, 0.64, 0.28, 0.83, 0.93, 0.99, 0.15, 0.33, 0.35, 0.91, 0.
What are the two main properties of random numbers? Test whether the 3rd, 7th, 11th, and so on numbers in the sequence in the following random number sample are auto-correlated. ($Z_{\alpha}=0.05$ and $Z_{0.025}=1.96$)
0.12, 0.01, 0.23, 0.28, 0.89, 0.31, 0.64, 0.28, 0.83, 0.93, 0.99, 0.15, 0.33, 0.35, 0.91, 0.41, 0.60, 0.27, 0.75, 0.88, 0.68, 0.49, 0.05, 0.43, 0.95, 0.58, 0.19, 0.36, 0.69, 0.87, [10]
Two Main Properties of Random Numbers and Autocorrelation Test
Part 1: Two Main Properties
-
Uniformity: The random numbers $R_i$ are uniformly distributed on $[0,1]$. Each value is an independent draw from a continuous uniform distribution with pdf $$f(x)=\begin{cases}1 & 0\le x\le 1\ 0 & \text{otherwise}\end{cases}$$ giving $E(R)=\tfrac12$ and $Var(R)=\tfrac{1}{12}$.
-
Independence: Successive random numbers are statistically independent; the current value has no correlation with previous ones.
Part 2: Autocorrelation Test
Given Data
30 numbers, 1-indexed:
| i | R | i | R | i | R |
|---|---|---|---|---|---|
| 1 | 0.12 | 11 | 0.99 | 21 | 0.68 |
| 2 | 0.01 | 12 | 0.15 | 22 | 0.49 |
| 3 | 0.23 | 13 | 0.33 | 23 | 0.05 |
| 4 | 0.28 | 14 | 0.35 | 24 | 0.43 |
| 5 | 0.89 | 15 | 0.91 | 25 | 0.95 |
| 6 | 0.31 | 16 | 0.41 | 26 | 0.58 |
| 7 | 0.64 | 17 | 0.60 | 27 | 0.19 |
| 8 | 0.28 | 18 | 0.27 | 28 | 0.36 |
| 9 | 0.83 | 19 | 0.75 | 29 | 0.69 |
| 10 | 0.93 | 20 | 0.88 | 30 | 0.87 |
Test: 3rd, 7th, 11th, ... โ starting index $i=3$, lag $m=4$. $Z_{0.025}=1.96$, $\alpha=0.05$.
Step 1: Determine M
Standard formula (Banks/Carson): $M$ = largest integer such that $i + (M+1)m \le N$, with $N=30$.
$$3 + (M+1)\cdot 4 \le 30 \Rightarrow (M+1)\cdot4 \le 27 \Rightarrow M+1 \le 6.75 \Rightarrow M+1=6 \Rightarrow M=5$$
So we use indices $3, 7, 11, 15, 19, 23$: that is $M+1 = 6$ values forming $M+1 = 6$ terms... let me apply the standard autocorrelation formula precisely.
The autocorrelation estimator: $$\hat\rho_{im}=\frac{1}{M+1}\left[\sum_{k=0}^{M}R_{i+km},R_{i+(k+1)m}\right]-0.25$$
This requires indices up to $i+(M+1)m$. With $i=3,m=4$: $3+(M+1)4\le30\Rightarrow M+1\le6.75\Rightarrow M=5$.
Indices needed: $3,7,11,15,19,23,27$ (from $k=0$ to $M+1=6$).
Values: $R_3=0.23,\ R_7=0.64,\ R_{11}=0.99,\ R_{15}=0.91,\ R_{19}=0.75,\ R_{23}=0.05,\ R_{27}=0.19$
Step 2: Products $R_{i+km}R_{i+(k+1)m}$, k = 0..M (=0..5)
| k | $R_a$ | $R_b$ | product |
|---|---|---|---|
| 0 | 0.23 | 0.64 | 0.1472 |
| 1 | 0.64 | 0.99 | 0.6336 |
| 2 | 0.99 | 0.91 | 0.9009 |
| 3 | 0.91 | 0.75 | 0.6825 |
| 4 | 0.75 | 0.05 | 0.0375 |
| 5 | 0.05 | 0.19 | 0.0095 |
$$\sum = 2.4112$$
Step 3: Compute $\hat\rho$
$$\hat\rho=\frac{1}{M+1}(2.4112)-0.25=\frac{2.4112}{6}-0.25=0.40187-0.25=0.15187$$
Step 4: Standard deviation
$$\sigma_{\hat\rho}=\frac{\sqrt{13M+7}}{12(M+1)}=\frac{\sqrt{13(5)+7}}{12(6)}=\frac{\sqrt{72}}{72}=\frac{8.4853}{72}=0.11785$$
Step 5: Test statistic
$$Z_0=\frac{\hat\rho}{\sigma_{\hat\rho}}=\frac{0.15187}{0.11785}=1.289$$
Step 6: Decision
Critical value $Z_{0.025}=1.96$.
Since $|Z_0| = 1.289 < 1.96$, we fail to reject the null hypothesis of independence.
Conclusion: There is no significant autocorrelation among the 3rd, 7th, 11th, ... numbers. They can be considered independent.
Common mistake: using $M = 6$ pairs and dividing by $M-1 = 5$, and then applying $\sigma = \frac{\sqrt{13M+7}}{12M}$ with that wrong $M$. The Banks-Carson convention gives $M = 5$, $\hat\rho = 0.1519$, $\sigma = 0.1179$ and $Z_0 \approx 1.29$. The conclusion (not autocorrelated) is the same, but the intermediate values are not.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.