Chi-Square Goodness of Fit Test Examples and Procedures
Overview of Chi-Square Goodness of Fit Test Examples
The Chi-Square Goodness of Fit test is used to determine how well observed data fits an expected distribution.
There are two primary ways to determine expected proportions:
Assuming all categories are equal: This treats every category as having the same probability of occurrence.
Based on previous research: This uses existing data or historical statistics to define what the proportions should be today.
Example 1: Assuming All Categories are Equal (The Fair Die)
Problem Context: A gambler wants to know if a six-sided die is fair.
Definition of a Fair Die: A die is considered "fair" if it rolls all six sides equally. This is analogous to a "fair coin" providing heads and tails with equal frequency.
Data Collection: The gambler throws the die a total of times.
Observed Frequencies (): These are the actual data points collected from the experiment.
Side 1:
Side 2:
Side 3:
Side 4:
Side 5:
Side 6:
Total observations (): .
Step 1: State the Null Hypothesis ()
: The die is fair.
In a Chi-Square test, states the expected proportions. For a fair six-sided die, the proportion for each side is expected to be .
Individual Expected Proportions: .
Alternative Hypothesis (): The die is not fair (at least one side is not rolled of the time).
Step 2: Calculate Expected Frequencies () and Chi-Square Obtained ()
Formula for Expected Frequency: .
Calculation: .
Because we assume all categories are equal, the for every side is .
Self-Check: The sum of the expected frequencies must equal the sample size ().
.
The discrepancy (off by ) is due to rounding error from using two decimal places instead of infinity. For the purpose of the test, this is considered equal to .
Formula for Chi-Square Obtained:
Calculations for each category:
Side 1:
Side 2:
Side 3:
Side 4:
Side 5:
Side 6:
Total : Adding these six values gives .
Calculator Warning: When squaring values, always ensure you handle negatives correctly (e.g., using parentheses) so the result is positive; a squared number cannot be negative.
Step 3: Find Degrees of Freedom () and Chi-Square Critical ()
Degrees of Freedom formula: , where is the number of categories.
Calculation: .
Decision Criteria: Use alpha () = .
Looking at the distribution table for and , the critical value is .
Step 4: Decision and Conclusion
Comparison: Is \chi^2_{obt} > \chi^2_{crit}?
2.55 > 11.07 is False.
Decision: Fail to reject .
Retain Hypothesis: We keep , meaning there is no significant evidence to suggest the die is unfair. We did not "prove" it is fair, but we failed to find evidence to throw the assumption out.
Conclusion: The die is rolled of the time for each side; the die is fair.
APA Format: \chi^2(5, n = 50) = 2.55, p > 0.05 (Note: p > 0.05 because we failed to reject the null hypothesis).
Example 2: Proportions from Previous Research (Student Major Trends)
Problem Context: 15 years ago, the Chaffey Psychology Department surveyed Social Science 10 students and found specific proportions of majors. An instructor today wants to see if these proportions have changed.
Past Research Proportions ( years ago):
Psychology:
Sociology:
All other majors:
Current Data ( students):
Psychology observed:
Sociology observed:
Other observed:
Objective: Use to see if student major distributions have changed.
Step 1: State the Null Hypothesis ()
: The proportions today are the same as they were 15 years ago ().
This implies the status quo has not changed over the passage of time.
Step 2: Calculate Expected Frequencies () and Chi-Square Obtained ()
Calculate based on the sample size ():
Psych:
Sociology:
Other:
Verification: . The total expected equals the total observed.
Initial Observation: Comparing observed () to expected (), there appear to be large differences. We observe fewer Psych majors and more "Other" majors than expected.
Chi-Square Calculation:
Psych:
Sociology:
Other:
Total : .
Step 3: Find Degrees of Freedom () and Chi-Square Critical ()
Categories () = 3 (Psych, Soc, Other).
.
For and , consult the table: .
Step 4: Decision and Conclusion
Comparison: Is \chi^2_{obt} > \chi^2_{crit}?
14.86 > 5.99 is True.
Decision: Reject .
Conclusion: The proportions of majors today are significantly different from the past research 15 years ago. Specifically, the distribution of Psych, Sociology, and Other majors in Social Science 10 has changed.
APA Format: \chi^2(2, n = 30) = 14.86, p < 0.05 (Note: Speaker clarifies that the APA string should list sample size as rather than repeating ).
Since the null hypothesis was rejected, we use p < 0.05 to indicate significance.