In: Statistics and Probability
These numbers have been drawn from a uniform distribution with range 1-40.
4, 6, 16, 12, 23, 19, 16 26, 14, 12, 12, 10, 3, 26, 35, 8, 30, 11, 14, 34, 37, 16, 36, 30, 18, 39, 24, 18, 39, 5, 12, 28, 4, 12, 34, 16, 35, 27, 15, 1
Test the sample for randomness using:
These numbers have been drawn from a uniform distribution with range 1-40.
4, 6, 16, 12, 23, 19, 16 26, 14, 12, 12, 10, 3, 26, 35, 8, 30, 11, 14, 34, 37, 16, 36, 30, 18, 39, 24, 18, 39, 5, 12, 28, 4, 12, 34, 16, 35, 27, 15, 1
b. Chi Square test for goodness
These numbers converted into continuous frequency distribution.
Here range 1- 40
The continuous uniform distribution.
X~CU(a=1,b=50)
f(x)=1/(b-a)
Distribution function
F(X)=(x-a)/(b-a)
=( X-1)/(40-1)
= (X-1)/39
Class | f |
ul X |
F(X) | p(X) | Ei | (Oi-Ei)^2/Ei | |
0-10 | 07 | 10 | 0.2307 | 0.2307 | 9.228 | 0.5379 | |
10-20 | 17 | 20 | 0.4871 | 0.2307 | 9.228 | 6.5457 | |
20-30 | 06 | 30 | 0.7435 | 0.2307 | 9.228 | 1.1291 | |
30-40 | 10 | 40 | 1 | 0.2307 | 9.228 | 0.0645 | |
- |
total fi=40 |
Total= 8.2772 |
Ho: The given sample fit for continuous uniform distribution.
H1: The given sample does not fit for continuous uniform distribution.
Calculated value=8.2772
Tabulated value= chi square tab( n-1;5%)
= chi square tab (4-1;0.05)
=7.81
Chi square calculated greater than chi square table.
The sample does not fit for uniform distribution.