Next: Test of Independence for
Up: GoodnessofFit Tests
Previous: GoodnessofFit Tests
ChiSquared Goodness of Fit Test
Recall that a discrete probability model consists of the range of
possible values and the corresponding probabilities of those values.
In practice we often have a hypothesis of interest concerning
these probabilities.
For example, suppose we have a 6sided die.
The hypothesis of interest is that the die is fair; i.e, the
corresponding probabilities are all 1/6.
If we let p_{1} be the probability that the upface is a 1,
p_{2} be the probability that the upface is a 2, et cetra,
our hypotheses are:
To test this hypothesis, we roll the die many times and obtain a sample
frequency of outcomes; i.e., the observed number of 1's (O_{1}),
the observed number of 2's (O_{2}), et cetra.
We then compare this with what we expect under H_{0}:
the expected number of 1's (E_{1}),
the expected number of 2's (E_{2}), et cetra.
The averaged squared (standardized) deviations from what we expect is
our test statistic:

(1) 
We will employ a simple decision rule.

(2) 
where k is the number of categories.
Example 0.0.1
Consider the fair 6sided die discussed above.
Suppose the observations on 600 rolls results in

1 
2 
3 
4 
5 
6 
Total 
Observed Frequency O 
92 
108 
78 
97 
124 
101 
600 
Do you think the die is fair based on this data?
Just look at that 78 3's, 22 below what we expect;
How about that 124?
Stand back, let
get to work.
We of course expect 100 of each upface if the die is fair (i.e., if
H_{0}
is true).
So
Since
k = 6 our critical value is:
Because
,
we would reject
H_{0} if favor of
H_{A}, concluding that the die
is not fair.
The hypothesis H_{0} is often called an overall (omnibus) hypothesis.
Upon rejecting, we often consider separate confidence intervals
for the categorical probabilities.
Recall the formula for the confidence interval for a proportion:
For instance, the confidence interval for p_{1} is (
):
This is
(.1245, .1821) which traps
1/6 = .1666.
In the exercises, you will be asked to obtain the confidence intervals
for some of the remaining proportions.
EXERCISES
0.0.1
Obtain the confidence for the proportions
p_{2} and
p_{3} for the above example.
Did the intervals trap 1/6.
Next: Test of Independence for
Up: GoodnessofFit Tests
Previous: GoodnessofFit Tests
Stat 160
20020412