Goodness of Fit Test
Goodness of Fit Test
Used to analyze proportions of relative frequencies on one variable with multiple levels.
Common applications: political party preferences, ethnic group representation.
Hypotheses
Null Hypothesis (H0): A variable follows a hypothesized distribution.
Alternative Hypothesis (H1): A variable does not follow a hypothesized distribution.
Example Scenario
Examined detentions granted by day of the week:
Monday: 50
Tuesday: 60
Wednesday: 40
Thursday: 47
Friday: 53
Total detentions = 250; expect equal distribution across 5 days (50 each).
Chi-square Calculation
Formula:
$O$ = observed value
$E$ = expected value
Observed Frequencies and Expected Frequencies table generated.
Statistical Significance
Determine if p-value < 0.05
Degrees of freedom (df) = n - 1; where n = 5 days, df = 4
Decision Making
If p-value <= 0.05, reject H0; otherwise, fail to reject H0.
Example outcome: p-value = 0.359, conclusion: fail to reject H0.
Result example: "A chi-square test indicated no significant difference between detention counts across days (X² = 4.36, p = 0.36)."
Summary
Use goodness of fit test to assess categorical data distribution.
Calculate using chi-square formula.
Properly communicate results in write-ups.