AP · College Board
✓ Official Syllabus VerifiedStandards & Rigor ↗
6

Unit 6 · Inference for Categorical Data: Proportions & Chi-Square Tests

📐 AP Statistics Unit 6 — Proportions & Chi-Square Inference Core Mastery  ·  One-sample & two-sample z-intervals for proportions  ·  Significance tests (H₀ vs Hₐ), p-values & pooled p̂_c  ·  Type I error (α), Type II error (β) & statistical power (1 - β)  ·  Chi-square Goodness-of-Fit test (df = k - 1)  ·  Chi-square tests for Independence & Homogeneity (df = (r-1)(c-1))

Comprehensive mastery of Unit 6 · Inference for Categorical Data: Proportions & Chi-Square Tests (Inference for Categorical Data), featuring interactive geometric visualization, first-principles derivations, graded worked examples, and progressive hints.

● Definition 6.1 — Proportion Z-Procedures & Chi-Square Test Statistics

A C\% confidence interval for a population proportion is p hat plus or minus z^*square root of fraction p hat(1-p hat) over n. For categorical frequency tables, the Chi-Square statistic is \[ \chi^2 = \sum \frac{(\text{Observed} - \text{Expected})^2}{\text{Expected}}, \] where \( \text{Expected} = \frac{(\text{Row Total})(\text{Column Total})}{\text{Grand Total}} \) for two-way tables with \( \text{df} = (r - 1)(c - 1) \), valid when all expected counts are \( \ge 5 \).

Observed counts \(O_{ij}\) in a \(3 \times 3\) contingency table (\(\text{df} = 4\)) tested via \(\chi^2 = \sum \frac{(O_{ij} - E_{ij})^2}{E_{ij}}\).
⊙ Interactive Explorer · Z-Interval Margin of Error, Power & Chi-Square Goodness-of-Fit Lab
interactive
Expected Count \(np_0\)\(15.0\)
Standard Error\(0.091\)
Inference ConditionAll Expected Counts ≥ 5

Drag the sliders or directly manipulate the canvas to explore how changes in the parameters govern Unit 6 · Inference for Categorical Data: Proportions & Chi-Square Tests.

Central \(95\%\) capture area bounded by critical values \(z^* = \pm 1.96\) for a one-sample or two-sample proportion interval.
Key Principle 6.1
One-sample & two-sample z-intervals for proportions
Key Principle 6.2
Significance tests (H₀ vs Hₐ), p-values & pooled p̂_c
Key Principle 6.3
Type I error (α), Type II error (β) & statistical power (1 - β)
Key Principle 6.4
Chi-square Goodness-of-Fit test (df = k - 1)
◆ Why It Works — Pooling in Two-Proportion z-Tests vs. Unpooled Intervals

Null Hypothesis Dictates Variance: In a two-proportion significance test of \(H_0: p_1 = p_2\), both samples come from a common proportion \(p\) under \(H_0\), so pooling \(\hat{p}_c = \frac{x_1+x_2}{n_1+n_2}\) yields the best variance estimate. In a confidence interval, no null equality is assumed, so \(\hat{p}_1\) and \(\hat{p}_2\) remain separate.

Worked Example 6.1 — One-Sample z-Interval & Sample Size Planning
Problem. In an SRS of \( n = 400 \) residents, \( 240 \) favor a municipal bond. Construct a \( 95\% \) confidence interval for \( p \), and find the conservative sample size needed for margin of error at most \( 0.03 \) at \( 95\% \) confidence.
▸ Show step-by-step solution

Here \( \hat{p} = \frac{240}{400} = 0.60 \) and \( SE = \sqrt{\frac{0.60(0.40)}{400}} = \frac{0.4899}{20} \approx 0.0245 \). Using \( z^* = 1.96 \): \[ 0.60 \pm 1.96(0.0245) = 0.60 \pm 0.048 = (0.552, 0.648) \] For conservative planning (\( p^* = 0.5 \)): \[ 1.96\sqrt{\frac{0.25}{n}} \le 0.03 \implies \sqrt{n} \ge \frac{1.96(0.5)}{0.03} = 32.67 \implies n \ge 1068 \]

Worked Example 6.2 — One-Sample z-Test for a Population Proportion
Problem. A seed supplier claims \( 90\% \) germination. A botanist plants an SRS of \( 225 \) seeds and observes \( 189 \) germinate. Test \( H_0: p = 0.90 \) vs. \( H_a: p < 0.90 \) at \( \alpha = 0.05 \).
▸ Show step-by-step solution

Sample proportion \( \hat{p} = \frac{189}{225} = 0.84 \). Under \( H_0 \), \( np_0 = 202.5 \ge 10 \), \( n(1-p_0) = 22.5 \ge 10 \), and \( \sigma_0 = \sqrt{\frac{0.90(0.10)}{225}} = \frac{0.30}{15} = 0.02 \). Test statistic: \[ z = \frac{0.84 - 0.90}{0.02} = -3.00 \] Left-tail \( p\text{-value} = P(Z \le -3.00) \approx 0.0013 < 0.05 \), so we reject \( H_0 \): there is convincing evidence the true germination rate is below \( 90\% \).

Worked Example 6.3 — Pooled Two-Proportion z-Test
Problem. In two independent SRSs, \( 48 \) of \( 100 \) patients on Regimen A improved versus \( 32 \) of \( 100 \) on Regimen B. Compute the pooled proportion \( \hat{p}_c \) and the test statistic \( z \) for \( H_0: p_A - p_B = 0 \).
▸ Show step-by-step solution

Pooled proportion: \( \hat{p}_c = \frac{48 + 32}{100 + 100} = 0.40 \). Pooled standard error: \[ SE_c = \sqrt{0.40(0.60)\left(\frac{1}{100} + \frac{1}{100}\right)} = \sqrt{0.0048} \approx 0.0693 \] Thus \( z = \frac{0.48 - 0.32}{0.0693} \approx 2.31 \).

Worked Example 6.4 — Chi-Square Test of Independence: Expected Counts & df
Problem. A \( 3 \times 4 \) contingency table classifies \( N = 200 \) respondents by age bracket (3 rows) and transit mode (4 columns). If Row 1 total is \( 50 \) and Column 2 total is \( 80 \), find the expected count \( E_{12} \) and degrees of freedom.
▸ Show step-by-step solution

Under independence, \[ E_{12} = \frac{\text{Row 1 Total} \times \text{Column 2 Total}}{N} = \frac{50 \times 80}{200} = 20 \] Degrees of freedom: \( \text{df} = (r - 1)(c - 1) = (3 - 1)(4 - 1) = 6 \).

Common Trap — Unit 6 · Inference for Categorical Data: Proportions & Chi-Square Tests

Always verify domain restrictions, non-zero denominators, and large-sample conditions before applying closed-form formulas.

Error Diagnosis — Common AP Statistics Exam Traps vs. Scoring Rubric Method
Common Student TrapWhy It Fails MathematicallyCorrect Exam-Board Method
Writing hypotheses using sample statistics (e.g., \(H_0: \hat{p} = 0.5\) or \(H_0: \bar{x} = 10\))Sample statistics are already known without testing; inference always targets unknown population parameters.Always state hypotheses in terms of population parameters \(p, \mu, \mu_d,\) or \(\beta\) and define them in context.
Interpreting a \(p\)-value as "the probability that \(H_0\) is true"Frequentist \(H_0\) is either true or false, not random; \(p\)-value conditions on \(H_0\) being true.Assuming \(H_0\) is true, the \(p\)-value is the probability of obtaining a sample statistic as extreme or more extreme by chance alone.
Claiming causation from an observational study because \(n\) is largeLarge sample size reduces random error but never removes confounding variables.Only a randomized experiment with random assignment of treatments justifies a cause-and-effect conclusion.
Examiner's Secret — Unit 6 · Inference for Categorical Data: Proportions & Chi-Square Tests

Write explicit method steps (M1) before substituting numerical values so partial credit is secured even if an arithmetic slip occurs.

[Practice 1] If \( \hat{p} = 0.50 \) and \( n = 100 \), find the standard error \( SE_{\hat{p}} \) for a confidence interval.
💡 Hint 1 of 3
Use \( SE_{\hat{p}} = \sqrt{\frac{\hat{p}(1-\hat{p})}{n}} \).
💡 Hint 2 of 3
Compute \( 0.50(0.50)/100 = 0.0025 \).
💡 Hint 3 of 3
Take the square root of \( 0.0025 \).
\( SE_{\hat{p}} = \sqrt{0.0025} = 0.05 \).
[Practice 2] A hypothesis test yields \( p\text{-value} = 0.018 \) at significance level \( \alpha = 0.05 \). State the decision regarding \( H_0 \).
💡 Hint 1 of 3
Compare the \( p\text{-value} \) directly with \( \alpha \).
💡 Hint 2 of 3
Here \( 0.018 < 0.05 \).
💡 Hint 3 of 3
When \( p\text{-value} < \alpha \), reject \( H_0 \).
Since \( 0.018 < 0.05 \), we reject \( H_0 \).
[Practice 3] Find the degrees of freedom for a chi-square test of homogeneity on a \( 4 \times 3 \) two-way table.
💡 Hint 1 of 3
Use \( \text{df} = (r - 1)(c - 1) \).
💡 Hint 2 of 3
Substitute \( r = 4 \) and \( c = 3 \).
💡 Hint 3 of 3
Multiply \( 3 \times 2 \).
\( \text{df} = (4 - 1)(3 - 1) = 3 \times 2 = 6 \).
[Practice 4] Rejecting a true null hypothesis \( H_0 \) is which type of error, and what equals its probability?
💡 Hint 1 of 3
Distinguish Type I (false positive, \( H_0 \) true) from Type II (false negative, \( H_0 \) false).
💡 Hint 2 of 3
Rejecting \( H_0 \) when \( H_0 \) is true is a Type I error.
💡 Hint 3 of 3
Its probability equals the significance level \( \alpha \).
It is a Type I error, and its probability equals the significance level \( \alpha \).
[Practice 5] If the probability of a Type II error is \( \beta = 0.18 \), what is the power of the test?
💡 Hint 1 of 3
Recall \( \text{Power} = 1 - \beta \).
💡 Hint 2 of 3
Substitute \( \beta = 0.18 \).
💡 Hint 3 of 3
Subtract from \( 1 \).
\( \text{Power} = 1 - 0.18 = 0.82 \) (or \( 82\% \)).

Unit 6 · Inference for Categorical Data: Proportions & Chi-Square Tests — 9-Point Investigative Task

9 pts Calculator Active
In a quality-control investigation (Unit 6 · Inference for Categorical Data: Proportions & Chi-Square Tests), a random sample of \(n = 65\) observations yields mean \(\bar{x} = 60\) and standard deviation \(s = 10\), with approximately normal population distribution.
  1. (a)3 pts
    Check the conditions for inference regarding the population mean \(\mu\).
    Scoring Guideline & Justification
    • [M1] Verifies Random & 10% independence condition (2 pt)
    • [A1] Cites Central Limit Theorem since n = 65 >= 30 (1 pt)
  2. (b)3 pts
    Compute the standard error \(\mathrm{SE} = \dfrac{s}{\sqrt{n}}\) rounded to 3 decimal places.
    Scoring Guideline & Justification
    • [M1] Substitutes s = 10 and n = 65 into s/sqrt(n) (2 pt)
    • [A1] Obtains SE = 1.240 (1 pt)
  3. (c)3 pts
    Using the Empirical Rule, state the approximate percentage of population values within \(\pm 1\) standard deviation of \(\mu = 60\).
    Scoring Guideline & Justification
    • [M1] Uses shaded 1-sigma band [50, 70] (1 pt)
    • [A1] States approximately 68% (2 pt)
Complete Worked Solution
(a) Randomization given; CLT holds since \(n = 65 \ge 30\). (b) \(\mathrm{SE} = \frac{10}{\sqrt{65}} \approx 1.240\). (c) By the Empirical Rule, approximately \(68\%\) falls within \([50, 70]\).
📝 Chapter Quiz