Goodness of fit test
Used to test how well a proposed model (distribution) fits the observed data. The
Step 1. Estimate the parameter for the assumed distribution
Step 2. Compute the probability for each observation under the assumed distribution
Step 3. Compute the expected frequencies
Step 4. Test the goodness-of-fit of the assumed distribution to the observed data
Examples
Number of errors | Observed frequencies |
Poisson probability with |
Expected frequencies |
---|---|---|---|
0 | 18 | ||
1 | 53 | ||
2 | 103 | ||
3 | 107 | ||
4 | 82 | ||
5 | 46 | ||
6 | 18 | ||
7 | 10 | ||
8 | 2 | ||
9 | 1 |
Step 1. Estimate the parameter for the assumed distribution
We test
Could indicate that the estimate given is not good, or that the distribution doesn't fit
Step 2. Compute the probability for each observation under the assumed distribution
Number of errors | Observed frequencies |
Poisson probability with |
Expected frequencies |
---|---|---|---|
0 | 18 | 0.0498 | |
1 | 53 | 0.1494 | |
2 | 103 | 0.2240 | |
3 | 107 | 0.1680 | |
4 | 82 | 0.1008 | |
5 | 46 | 0.0504 | |
6 | 18 | 0.0216 | |
7 | 10 | 0.0081 | |
8 | 2 | 0.0081 | |
9 | 1 | 0.0038 |
Step 3. Compute the expected frequencies
Let
Number of errors | Observed frequencies |
Poisson probability with |
Expected frequencies |
---|---|---|---|
0 | 18 | 0.0498 | 21.9 |
1 | 53 | 0.1494 | 65.7 |
2 | 103 | 0.2240 | 98.6 |
3 | 107 | 0.1680 | 98.6 |
4 | 82 | 0.1008 | 73.9 |
5 | 46 | 0.0504 | 44.4 |
6 | 18 | 0.0216 | 22.2 |
7 | 10 | 0.0081 | 9.5 |
8 | 2 | 0.0081 | 3.6 |
9 | 1 | 0.0038 | 1.7 |
10 | 0 | ||
... |
- based on the fischer exact test (?), the Chi-Squared Test will become less accurate for values
, we can group all those groups together
Step 4.de
Test the goodness-of-fit of the Poisson distribution to the observed data
under
Reject