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 | 12 | 9 | 7 | 7 | 12 | 12 | 6 | 8 | 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 not 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. 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.
a)
applying chi square goodness of fit test: |
relative | observed | Expected | residual | Chi square | |
category | frequency(p) | Oi | Ei=total*p | R2i=(Oi-Ei)/√Ei | R2i=(Oi-Ei)2/Ei |
0 | 0.1000 | 12.0000 | 10.00 | 0.63 | 0.400 |
1 | 0.1000 | 9.0000 | 10.00 | -0.32 | 0.100 |
2 | 0.1000 | 7.0000 | 10.00 | -0.95 | 0.900 |
3 | 0.1000 | 7.0000 | 10.00 | -0.95 | 0.900 |
4 | 0.1000 | 12.0000 | 10.00 | 0.63 | 0.400 |
5 | 0.1000 | 12.0000 | 10.00 | 0.63 | 0.400 |
6 | 0.1000 | 6.0000 | 10.00 | -1.26 | 1.600 |
7 | 0.1000 | 8.0000 | 10.00 | -0.63 | 0.400 |
8 | 0.1000 | 12.0000 | 10.00 | 0.63 | 0.400 |
9 | 0.1000 | 15.0000 | 10.00 | 1.58 | 2.500 |
total | 1.000 | 100 | 100 | 8.0000 | |
test statistic X2 = | 8.0000 |
ii)
degree of freedom =categories-1= | 9 |
from excel p value =chidist(8,9)= | 0.5341 |
Fail to reject the null hypothesis. There is not significant evidence that the integers are not being generated uniformly.