In: Statistics and Probability
I flip a coin 20 times and record the results as follows: T T H H H T H H T T H H H T T T T T T H. Use the runs test for randomness at a significance level of 0.05 to test this sequence of coin flips for randomness.
Solution:
Givem: A coin is flipped 20 times
T T H H H T H H T T H H H T T T T T T H
We have to use the runs test for randomness at a significance level of 0.05 to test this sequence of coin flips for randomness.
Step 1) State H0 and H1:
H0: The sequence of coin flips is random
Vs
H1: The sequence of coin flips is not random
Step 2) Find r = number of runs.
Run is an unbroken sequence of simmilar symbols
thus we have:
T | T | H | H | H | T | H | H | T | T | H | H | H | T | T | T | T | T | T | H |
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Thus
Number of runs are:
r = 8
m = Number of symbols of type T = 11
n = Number of symbols of type H = 9
Step 3) Find critical value using run test critical value table.
thus critical values are:
a = 6 , b = 16
Step 4) Decision rule:
If a < r < b, then we do not reject the null hypothesis H0, otherwise we reject H0.
Since a = 6 < r = 8 < b = 16, we do not reject the null hypothesis H0.
Step 5) Conclusion:
At 0.05 level of significance , we conclude that the sequence of coin flips is random