Carrying Out a Chi Square Goodness of Fit Test

Ava Garcia
8 min read
Listen to this study note
Study Guide Overview
This study guide covers the Chi-Square Goodness of Fit Test, including its purpose, the step-by-step procedure (hypotheses, significance level, calculating the ฯยฒ statistic, degrees of freedom, critical value, comparison, and conclusion), and working through example problems. It also emphasizes key exam tips, common mistakes, and practice questions covering multiple-choice and free-response formats.
AP Statistics: Chi-Square Goodness of Fit Test - The Ultimate Review
Hey, future AP Stats master! Let's nail this chi-square goodness of fit test. This guide is your fast track to acing the exam, focusing on what truly matters. Let's get started! ๐
Chi-Square Goodness of Fit: Core Concepts
What is it?
The chi-square goodness of fit test is used to determine if an observed frequency distribution matches a theoretical expected distribution. Basically, are your observations what you'd expect, or is something fishy going on? ๐ค
It's all about comparing observed data to expected data to see if the differences are statistically significant.
Big Picture Procedure
Here's the step-by-step breakdown:
-
Hypotheses:
- Null Hypothesis (Hโ): The observed distribution is the same as the expected distribution.
- Alternative Hypothesis (Hโ): The observed and expected distributions are significantly different.
-
Significance Level (ฮฑ):
- Choose your ฮฑ (usually 0.1, 0.05, or 0.01). This is your threshold for rejecting Hโ.
-
Chi-Square Statistic (ฯยฒ):
-
Calculate using the formula:
Where:
-
Observed = Observed frequency for each category
-
Expected = Expected frequency for each category
-
-
Remember O-E, square, divide, sum!

4. Degrees of Freedom (df): * df = Number of categories - 1
-
Critical Value:
- Use a chi-square table or calculator to find the critical value based on your ฮฑ and df.
-
Comparison:
- If ฯยฒ statistic > critical value, reject Hโ.
- If ฯยฒ statistic โค critical value, fail to reject Hโ.
-
Conclusion:
- Reject Hโ: Observed distribution is significantly different from expected.
- Fail to reject Hโ: Observed distribution is not significantly different from expected.
Doing the Test
Test Statistic (ฯยฒ)
- A ฯยฒ value close to 0 supports Hโ (observed and expected are similar).
- A large ฯยฒ value suggests that the expected counts are not accurate, leading to rejection of Hโ.
Use your calculator to compute the ฯยฒ statistic. It saves time and reduces errors!
Example: Happiness Survey
Let's say we have the following null hypothesis about happiness:
- 10% Unhappy (1)
- 15% Somewhat Unhappy (2)
- 28% Sometimes Happy/Sad (3)
- 30% Happy (4)
- 17% Always Happy (5)
We survey 1000 people and get:
- 120 respond 1
- 180 respond 2
- 220 respond 3
- 480 respond 4
- 0 respond 5
Steps:
- Calculate expected counts: 100, 150, 280, 300, 170
- Calculate (Observed - Expected)ยฒ / Expected for each category.
- Sum these values to get ฯยฒ.
Degrees of Freedom (df)
- df = Number of categories - 1
- In the happiness example, df = 5 - 1 = 4
P-Value
- The p-value is the probability of observing a ฯยฒ statistic as extreme as the one calculated, assuming Hโ is true. ๐ ฟ๏ธ
- A low p-value (less than ฮฑ) leads to rejecting Hโ.
Low p, reject the Ho!
Example: Happiness Survey (Continued)
After the calculation, we get the following output:
Conclusion
- Compare p-value to ฮฑ.
- If p-value < ฮฑ, reject Hโ. There is convincing evidence for Hโ.
- If p-value โฅ ฮฑ, fail to reject Hโ. There is not convincing evidence for Hโ.
- Never say โacceptโ the null!
- Always include context in your conclusion.
Example: Happiness Survey Conclusion
Since our p-value (~0) < 0.05, we reject the null hypothesis. We have convincing evidence that at least one of the proportions for how people rank on the happiness scale is incorrect. ๐
Forgetting to include context in your conclusion is a common mistake! Always relate your findings back to the original problem.
Final Exam Focus
- High-Priority Topics: Chi-square goodness of fit test, hypothesis testing steps, p-value interpretation, degrees of freedom, and conclusion writing.
- Common Question Types:
- Multiple-choice questions testing your understanding of the steps and concepts.
- Free-response questions requiring you to perform a full chi-square test and interpret the results.
- Time Management: Practice using your calculator efficiently to save time on calculations. Focus on understanding the concepts rather than memorizing formulas.
- Common Pitfalls:
- Forgetting to calculate expected counts correctly.
- Mixing up observed and expected values.
- Misinterpreting the p-value.
- Not including context in the conclusion.
Double-check your calculations and make sure your conclusion is clear and concise.
Practice Questions
Practice Question
Multiple Choice Questions
Question 1:
A researcher is testing if the distribution of colors in a bag of candies matches the company's stated proportions. The null hypothesis is that the observed distribution matches the expected distribution. After performing a chi-square goodness of fit test, the p-value is 0.03. Assuming a significance level of 0.05, what is the correct conclusion?
(A) Fail to reject the null hypothesis; there is not enough evidence to suggest the distribution of colors is different from the stated proportions. (B) Fail to reject the null hypothesis; there is enough evidence to suggest the distribution of colors is different from the stated proportions. (C) Reject the null hypothesis; there is not enough evidence to suggest the distribution of colors is different from the stated proportions. (D) Reject the null hypothesis; there is enough evidence to suggest the distribution of colors is different from the stated proportions.
Question 2:
In a chi-square goodness of fit test, what does the degrees of freedom represent?
(A) The number of observations in the sample. (B) The number of categories in the distribution. (C) The number of categories minus one. (D) The number of expected values.
Question 3:
Which of the following best describes the purpose of a chi-square goodness of fit test?
(A) To determine if there is a linear relationship between two quantitative variables. (B) To compare the means of two or more groups. (C) To determine if an observed frequency distribution matches a theoretical expected distribution. (D) To estimate a population proportion based on a sample.
Free Response Question
A researcher wants to investigate whether the distribution of car colors in a particular city matches the national distribution. The national distribution is as follows: 20% are white, 25% are black, 15% are silver, 10% are red, and 30% are other colors. The researcher observes 300 cars in the city and finds the following: 70 white, 80 black, 40 silver, 30 red, and 80 other.
(a) State the null and alternative hypotheses. (b) Calculate the expected frequencies for each color. (c) Calculate the chi-square test statistic. (d) Determine the degrees of freedom. (e) Using a significance level of 0.05, state your conclusion.
Scoring Breakdown:
(a) Hypotheses (1 point):
- Hโ: The distribution of car colors in the city matches the national distribution.
- Hโ: The distribution of car colors in the city does not match the national distribution.
(b) Expected Frequencies (1 point):
- White: 300 * 0.20 = 60
- Black: 300 * 0.25 = 75
- Silver: 300 * 0.15 = 45
- Red: 300 * 0.10 = 30
- Other: 300 * 0.30 = 90
(c) Chi-Square Statistic (2 points):
- ฯยฒ = [(70-60)ยฒ/60] + [(80-75)ยฒ/75] + [(40-45)ยฒ/45] + [(30-30)ยฒ/30] + [(80-90)ยฒ/90]
- ฯยฒ = 1.67 + 0.33 + 0.56 + 0 + 1.11 = 3.67
(d) Degrees of Freedom (1 point):
- df = 5 - 1 = 4
(e) Conclusion (2 points):
- Using a chi-square table or calculator, the critical value for ฮฑ = 0.05 and df = 4 is approximately 9.488. * Since the calculated ฯยฒ (3.67) is less than the critical value (9.488), we fail to reject the null hypothesis.
- Conclusion: There is not enough evidence to suggest that the distribution of car colors in the city is different from the national distribution.
Alright, you've got this! Keep practicing, stay calm, and go ace that AP Stats exam! ๐

How are we doing?
Give us your feedback and let us know how we can improve
Question 1 of 11
๐ Ready to rock? What is the main purpose of a chi-square goodness of fit test?
To compare means of two groups
To determine if an observed distribution matches a theoretical distribution
To assess correlation between two variables
To find the standard deviation of a dataset