A die is said to be fair if the probability of rolling the n
A die is said to be fair if the probability of rolling the number i is pi=1/6 for i=1,…,6. You roll a die 60 times with the following outcome.
(a) Calculate the test statistic X2 for the test
using the formula
X2=(OiEi)2Ei.
X2= ______
(b) Use the R function pchisq() and the value of the test statistic from (a) to find the p-value for the test in (a).
p-value = ______
| i | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Oi | 15 | 9 | 9 | 10 | 6 | 11 |
Solution
A)
Doing an observed/expected value table,
O E (O - E)^2/E
15 10 2.5
9 10 0.1
9 10 0.1
10 10 0
6 10 1.6
11 10 0.1
Using chi^2 = Sum[(O - E)^2/E],
chi^2 = 4.4 [ANSWER]
**********************
b)
As df = a - 1,
a = 6
df = a - 1 = 5
Thus, the p value is
p = 0.493373524 [ANSWER]
