Selecting a Categorical Procedure
Đã giới thiệuWhich categorical procedure?
- For categorical data, choose among proportion $z$-procedures and chi-square tests.
- The decision hinges on how many variables and how many samples.
- Get those right and the procedure follows.
- This skills lesson ties Units 6 and 8 together.
Count the variables and samples
- One variable, one sample, matched against a claimed distribution → goodness-of-fit.
- One variable, several separate samples → homogeneity.
- Two variables, one sample → independence.
- A single proportion (two categories, one sample) can also be a one-proportion $z$-test.

Choosing a categorical inference procedure
Chi-square vs. two-proportion z
- Comparing two groups on a two-category variable? Two valid options overlap here.
- A two-proportion $z$-test works and gives a direction (one-sided possible).
- A chi-square test of homogeneity also works (a $2\times2$ table) but is only non-directional.
- For a directional two-group proportion question, prefer the $z$-test.
Implement and communicate
- State hypotheses, check conditions, compute the statistic and p-value, conclude in context.
- Name the procedure explicitly and justify why it fits the data.
- Word the conclusion to match the test (fit / difference / association).
- Clear communication is graded as heavily as the arithmetic.
Two questions pick the categorical procedure: how many VARIABLES, and how many SAMPLES. One variable vs. a claimed distribution → goodness-of-fit; one variable across several samples → homogeneity; two variables in one sample → independence. Chi-square is never directional — if you need a one-sided claim about two proportions, use the two-proportion $z$-test instead.
"Do three schools have the same distribution of favorite sport?"
- Variables: one (favorite sport). Samples: three (separate schools).
- One variable, several samples → chi-square test of homogeneity.
- (Had it been "is sport related to gender in one survey?", → independence.)
Pick a categorical procedure by number of variables and number of samples: goodness-of-fit (one variable vs. a distribution), homogeneity (one variable, several samples), independence (two variables, one sample), or a proportion $z$-procedure. Implement fully and communicate the reasoning and conclusion in context.
Write from goodness of fit
- There is one categorical variable.
- There is one random sample, and several category proportions are claimed.
Which procedure fits?
Goodness of fit checks one variable against claimed proportions.
Which procedure is this?
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
One categorical variable in one sample is goodness of fit.
Categorical data to analyze
Count the variables and samples to pick the right test.
One categorical variable checked against a claimed distribution (one sample) calls for a...
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
One variable vs. a distribution → goodness-of-fit.
Three separately-sampled schools compared on one variable calls for a...
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
One variable, several samples → homogeneity.
Two variables recorded in ONE sample calls for a...
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
Two variables, one sample → independence.
A chi-square test can give a one-sided (directional) conclusion.
Độ khó 1/5 · 100 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
Chi-square is never directional — use a two-proportion z-test for that.
Order the two questions that pick a categorical procedure, then the action.
Độ khó 3/5 · 200 xu + một phần thưởng nhỏ cho lần hoàn thành đầu tiên trong ngày
Variables, then samples, then run the procedure.