9.3.2 Chi-Square Goodness-of-Fit Test Flashcards
What is a goodness-of-fit test?
Testing whether your assumptions about the distribution is valid or not.
e.g. test whether a specified distribution or model fits a dataset.
Say you have some sample data {x1, x2, …, xn} and want to test the assumption of Poisson distribution. What are the steps?
- Estimate λ using the data
2. Goodness of fit test to check if this is correct.
What is the basic idea of g.o.f?
- Partitition all possible values into c categories.
- Treat each category as a possible outcome of a multinomial distribution.
- Use chi-square with appropriate d.f. to look at the probability of seeing whatever outcome you got.
Ex. g.o.f:
During WWII, a 36km^2 area of South London was divided into 576 small squares of 0.25km^2 each to record bomb hits. The data are as follows:
hits: # squares
0: 229
1: 211
2: 93
3: 35
4: 7
5: 0
6: 0
7: 1
Test whether a Poisson model would fit the data at α = 0.05
-Find expected value of this sample data, λ:
Σ (# hits) (# squares) / (total #)
Ho: # hits per .25 km^2 follows Poisson distribution.
Ha: # hits does not follow Poisson dist. (at least one Pi != Pio)
Combine last columns together until there is a frequency for that column greater than 5
Given X ~ N(0,1), what is chi-square?
Q = X^2
Q ~ X^2_1
Or, Q is distributed among the chi-square distribution with 1 d.f
What does it mean for a chi-square r.v. to have 2 d.f?
You have 2 r.v’s.
Sample X1 from a normal distribution, square it, and do the same with X2.
Q2 = X1^2 + X2^2
means Q ~ X2^2