Topic 8.7 Notes – Skills Focus: Selecting an Appropriate Inference Procedure for Categorical Data
What categorical inference is trying to do
Categorical inference deals with counts in categories. We are making conclusions about:
- Proportions (percent who said yes, percent who prefer A)
- Distributions (how responses are spread across several categories)
- Associations (whether two categorical variables are related)
Before you even think about formulas, ask:
- How many categorical variables are there?
- How many categories does each variable have?
- How many samples or groups are being compared?
Those three questions determine everything.
If a variable has only two categories (success/failure), that points toward a z-test for proportions.
If there are three or more categories, that pushes you toward a chi-square procedure.
The full set of categorical inference procedures
Here’s the entire menu for AP Stats:
- One-proportion z-test
- Two-proportion z-test
- Chi-square goodness of fit test
- Chi-square test for independence
- Chi-square test for homogeneity
If you can quickly sort problems into one of these five, you’re in great shape.
One-proportion z-test
Structure:
- One sample
- One categorical variable
- Two categories
- Testing a claim about a single population proportion
Typical situation: A school claims 60% of students buy lunch. You sample students and test whether the true proportion equals 0.60.
If you see one sample + yes/no outcome → think one-proportion z-test.
Two-proportion z-test
Structure:
- Two independent samples or groups
- One categorical variable
- Two categories
- Comparing two population proportions
Example: Compare the proportion of voters who support a policy in City A vs City B.
If either variable has more than two categories, it is no longer a z-test.
Chi-square goodness of fit
Structure:
- One sample
- One categorical variable
- Three or more categories
- Comparing to a theoretical or claimed distribution
You’re checking whether observed counts “fit” expected proportions.
Example: A die is rolled 180 times. Do the results match a fair distribution?
This test compares:
- Observed counts
- Expected counts based on given proportions
There is no second sample here.
Independence vs Homogeneity
These two cause the most confusion because they look almost identical mathematically.
Both:
- Use a two-way table
- Use a chi-square statistic
- Have the same conditions and calculation
The difference is in how the data were collected.
Chi-square test for independence
Structure:
- One random sample
- Two categorical variables
- Asking whether the variables are associated
Example: A random sample of adults is asked about exercise level and coffee preference. You test whether exercise level and coffee preference are associated.
Hypotheses look like:
- : The variables are independent (no association).
- : The variables are associated.
You measured two traits on the same individuals.
Chi-square test for homogeneity
Structure:
- Two or more independent samples (or treatments)
- One categorical variable
- Comparing distributions across groups
Example: Three different schools are sampled, and students are asked their favorite subject. You test whether the distribution of favorite subjects is the same across schools.
Hypotheses look like:
- : The population distributions are the same.
- : At least one distribution differs.
You are comparing groups, not testing association within one sample.
How to choose the correct test
Keep these distinctions straight on test day:
Note: A two-proportion z-test is for one categorical variable with two categories, compared across two independent samples. A two-way table from one random sample with two variables calls for chi-square independence; multiple samples comparing one variable’s distribution across groups calls for homogeneity.
When stuck, slow down and label your situation before picking a test:
- Number of variables
- Number of categories
- Number of samples
Most multiple-choice questions on this topic are pure structure recognition.
Common mistakes that cost points
- Using a two-proportion z-test when a variable has 3+ categories.
- Calling a homogeneity test “independence” without checking whether there were multiple samples.
- Forgetting that goodness of fit compares to a theoretical distribution, not another group.
- Writing vague hypotheses like “there is a difference.” Always say what variables and what population in context.
On free-response questions, they often describe the sampling carefully. That wording is not filler. It tells you which chi-square test to use.
Key Takeaways
Chi-Square Goodness of Fit Test
Tests whether one sample's categorical distribution matches a stated or theoretical distribution.
Chi-Square Test for Independence
Tests whether two categorical variables are associated in one population from one sample.
Chi-Square Test for Homogeneity
Tests whether categorical distributions are the same across two or more populations or treatments.
One-Way Table vs. Two-Way Table
One-way tables summarize one categorical variable; two-way tables summarize two categorical variables together.
Hypotheses for Chi-Square Tests
Null states no difference or no association; alternative states a difference in distributions or an association.
Z Procedures vs. Chi-Square Procedures
Use z procedures for two-category proportions and chi-square procedures for variables with multiple categories.
Choosing Among Chi-Square Tests
Use goodness of fit for one sample and one variable, independence for one sample and two variables, and homogeneity for multiple samples and one variable.
Null Hypothesis for Goodness of Fit
States that one population distribution matches a stated or theoretical categorical distribution.
Null Hypothesis for Homogeneity
States that multiple populations share the same distribution of a categorical variable.
Null Hypothesis for Independence
States that two categorical variables are not associated in the population.
Notes
Chi-Square Goodness of Fit Test
Tests whether one sample's categorical distribution matches a stated or theoretical distribution.
Chi-Square Test for Independence
Tests whether two categorical variables are associated in one population from one sample.
Chi-Square Test for Homogeneity
Tests whether categorical distributions are the same across two or more populations or treatments.
One-Way Table vs. Two-Way Table
One-way tables summarize one categorical variable; two-way tables summarize two categorical variables together.
Hypotheses for Chi-Square Tests
Null states no difference or no association; alternative states a difference in distributions or an association.
Z Procedures vs. Chi-Square Procedures
Use z procedures for two-category proportions and chi-square procedures for variables with multiple categories.
Choosing Among Chi-Square Tests
Use goodness of fit for one sample and one variable, independence for one sample and two variables, and homogeneity for multiple samples and one variable.
Null Hypothesis for Goodness of Fit
States that one population distribution matches a stated or theoretical categorical distribution.
Null Hypothesis for Homogeneity
States that multiple populations share the same distribution of a categorical variable.
Null Hypothesis for Independence
States that two categorical variables are not associated in the population.