In: Statistics and Probability
A program for generating random numbers on a computer is to be tested. The program is instructed to generate 100 single-digit integers between 0 and 9. The frequencies of the observed integers were as follows. At the 0.05 level of significance, is there sufficient reason to believe that the integers are not being generated uniformly?
Integer | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Frequency | 9 | 7 | 9 | 6 | 10 | 14 | 8 | 10 | 12 | 15 |
(a) Find the test statistic. (Round your answer to two decimal
places.)
(ii) Find the p-value. (Round your answer to four decimal
places.)
(b) State the appropriate conclusion.
Reject the null hypothesis. There is significant evidence that the integers are not being generated uniformly. Fail to reject the null hypothesis. There is significant evidence that the integers are not being generated uniformly. Fail to reject the null hypothesis. There is not significant evidence that the integers are not being generated uniformly. Reject the null hypothesis. There is not significant evidence that the integers are not being generated uniformly.
You may need to use the appropriate table in Appendix B to answer
this question.
Solution:
Here, we have to use chi square test for independence of two categorical variables.
Null hypothesis: H0: Data follows uniform distribution.
Alternative hypothesis: Ha: Data do not follow uniform distribution.
We are given level of significance = α = 0.05
Test statistic formula is given as below:
Chi square = ∑[(O – E)^2/E]
Where, O is observed frequencies and E is expected frequencies.
We are given
N = 10
Degrees of freedom = df = N – 1 = 10 – 1 = 9
α = 0.05
Critical value = 16.92
(by using Chi square table or excel)
Calculation tables for test statistic are given as below:
Integer |
Frequency (O) |
Expected (E) |
(O - E)^2 |
(O - E)^2/E |
0 |
9 |
10 |
1 |
0.1 |
1 |
7 |
10 |
9 |
0.9 |
2 |
9 |
10 |
1 |
0.1 |
3 |
6 |
10 |
16 |
1.6 |
4 |
10 |
10 |
0 |
0 |
5 |
14 |
10 |
16 |
1.6 |
6 |
8 |
10 |
4 |
0.4 |
7 |
10 |
10 |
0 |
0 |
8 |
12 |
10 |
4 |
0.4 |
9 |
15 |
10 |
25 |
2.5 |
Total |
100 |
100 |
7.6 |
Chi square = ∑[(O – E)^2/E] = 7.60
P-value = 0.5749
(By using Chi square table or excel)
P-value > α = 0.05
So, we do not reject the null hypothesis
There is insufficient evidence to conclude that the integers are not being generated uniformly.
(a) Find the test statistic.
Answer: 7.60
(ii) Find the p-value.
Answer: 0.5749
(b) State the appropriate conclusion.
Fail to reject the null hypothesis. There is not significant evidence that the integers are not being generated uniformly.