In: Statistics and Probability
Suppose you flip two coins 100 times. The result are 20 HH, 27 HT, 30 TH and 23 TT. Are the coins fair? Test at %5 significance level.
Solution:
Given: Two coins are flipped 100 times.
We have to test if coins are fair or unfair.
Level of significance = 5%
Step 1) State H0 and H1:
If coins are fair then each outcome has an equal chance.
That is: P(HH) = P( HT) = P(TH) = P(TT) = 1/4 = 0.25
Thus
H0: Two coins are fair , that is: P(HH) = P( HT) = P(TH) = P(TT) = 1/4 = 0.25
Vs
H1: Two coins are fair , that is: at least of the proportion is different from 0.25
Step 2) Test statistic:
Chi square test statistic for goodness of fit
Where
Oi = Observed Counts
Ei =Expected Counts
Thus we need to make following table
Outcomes | Oi: Observed frequency | Expected proportions | Ei: Expected Frequency | Oi2/Ei |
---|---|---|---|---|
HH | 20 | 0.25 | 25 | 16 |
HT | 27 | 0.25 | 25 | 29.16 |
TH | 30 | 0.25 | 25 | 36 |
TT | 23 | 0.25 | 25 | 21.16 |
N = 100 |
Thus
Step 3) Chi-square critical value:
df = k - 1 = 4 - 1 = 3
Level of significance = 0.05
Chi-square critical value = 7.815
Step 4) Decision Rule:
Reject null hypothesis H0, if Chi square test statistic >
Chi-square critical value = 7.815, otherwise we fail to reject
H0.
Since Chi square test statistic =
< Chi-square critical value = 7.815, we fail to reject H0.
Step 5) Conclusion:
At 0.05 level of significance, we conclude that: Two coins are fair.