Statistics • Score 5 Strategy

Chi-Square Tests: Goodness-of-Fit, Homogeneity & Independence Guide: AP Statistics Score 5 for Georgia Tech

AP Statistics Exam Mastery Guide: Chi-Square Tests

Target Institution: Georgia Institute of Technology
Target Score: 5
Georgia Tech Course Equivalent: ISYE 3770: Statistics and Applications (3 Credit Hours)
Accelerated Track: ISYE 3030: Basic Quality Control


1. Introduction & AP Exam Weight

Chi-Square testing ($\chi^2$) constitutes the core of Unit 8: Inference for Categorical Data in the AP Statistics curriculum. Accounting for 2%–5% of the multiple-choice section and serving as a frequent anchor for Free-Response Questions (FRQs)—often integrated into multi-part questions or Question 6 (Investigative Task)—mastery of this topic is mandatory for securing a 5.

On the AP Statistics exam, Chi-Square inference tests whether observed categorical data distributions deviate significantly from expected theoretical distributions or across populations. For aspiring Georgia Tech engineers, this topic represents the empirical bedrock of Industrial and Systems Engineering (ISyE), quality assurance testing, and stochastic process modeling.


2. Deep Concept Breakdown

Chi-Square tests evaluate categorical counts. The unifying test statistic across all three variants is Pearson's Chi-Square statistic:

$$\chi^2 = \sum \frac{(O_i - E_i)^2}{E_i}$$

Where $O_i$ is the observed count in cell $i$, and $E_i$ is the expected count under the null hypothesis $H_0$.

2.1 Theoretical Derivation & Distribution Behavior

The Chi-Square distribution with $k$ degrees of freedom ($\chi^2_k$) is derived from the sum of $k$ independent, squared standard normal random variables $Z_1, Z_2, \dots, Z_k \sim \mathcal{N}(0,1)$:

$$Q = \sum_{i=1}^k Z_i^2 \sim \chi^2_k$$

For a categorical variable with $k$ mutually exclusive outcomes, the counts follow a Multinomial distribution. Under $H_0$, as total sample size $n \to \infty$, the standardized residual for each category:

$$z_i = \frac{O_i - E_i}{\sqrt{E_i}}$$

asymptotically approaches a standard normal distribution $\mathcal{N}(0,1)$. Summing $z_i^2$ across all $k$ categories introduces one linear constraint ($\sum O_i = \sum E_i = n$), removing one degree of freedom. Thus:

$$\chi^2 = \sum_{i=1}^k \frac{(O_i - E_i)^2}{E_i} \sim \chi^2_{k-1}$$

 Chi-Square Distributions for Varying Degrees of Freedom (df)

 Density
   ^
   |   * (df = 2: Exponential-like decay)
   |    *
   |     *
   |      **  (df = 4: Right-skewed peak)
   |     *  *
   |    *     *    *** (df = 8: Approaching normality)
   |   *       *  *   *
   |  *         **     *
   +-------------------------------------------------------->
   0        2        4        6        8       10       12    \chi^2

2.2 Taxonomy of Chi-Square Tests

A major point of assessment on the AP Exam is distinguishing between the three types of Chi-Square tests:

Structural Criteria Goodness-of-Fit (GoF) Test for Homogeneity Test for Independence
Number of Samples 1 Random Sample $\ge 2$ Independent Samples 1 Random Sample
Categorical Variables 1 Variable ($k \ge 2$ categories) 1 Variable evaluated across groups 2 Variables evaluated for association
Null Hypothesis ($H_0$) The categorical distribution matches specified proportions. Distribution of the variable is the same across all populations. There is no association between the two variables in the population.
Degrees of Freedom ($df$) $k - 1$ $(r - 1)(c - 1)$ $(r - 1)(c - 1)$
Expected Count ($E_i$) $E_i = n \cdot p_i$ $E_{r,c} = \frac{\text{Row Total} \times \text{Col Total}}{\text{Table Total}}$ $E_{r,c} = \frac{\text{Row Total} \times \text{Col Total}}{\text{Table Total}}$

2.3 Programmatic Implementation (Python / scipy.stats)

To reinforce mechanics, the following Python script demonstrates how all three tests are executed computationally, verifying calculated expected values and degrees of freedom.

import numpy as np
from scipy import stats

# 1. Chi-Square Goodness-of-Fit Test
observed_gof = np.array([28, 42, 30])  # Observed counts in 3 categories
expected_props_gof = np.array([0.25, 0.50, 0.25])
n_total = np.sum(observed_gof)
expected_gof = n_total * expected_props_gof

chi2_gof, p_val_gof = stats.chisquare(f_obs=observed_gof, f_exp=expected_gof)
df_gof = len(observed_gof) - 1

print(f"--- Goodness-of-Fit ---")
print(f"Chi2: {chi2_gof:.4f} | df: {df_gof} | p-value: {p_val_gof:.4f}\n")

# 2. Chi-Square Test for Two-Way Tables (Homogeneity / Independence)
# Contingency Table: Rows = Groups/Variable A, Cols = Outcomes/Variable B
contingency_table = np.array([
    [45, 35, 20],  # Group 1 / Category A1
    [25, 40, 35]   # Group 2 / Category A2
])

chi2_stat, p_val_two_way, dof_two_way, expected_two_way = stats.chi2_contingency(
    contingency_table, correction=False
)

print(f"--- Two-Way Chi-Square Test (Homogeneity/Independence) ---")
print(f"Chi2 Stat: {chi2_stat:.4f}")
print(f"Degrees of Freedom: {dof_two_way}")
print(f"p-value: {p_val_two_way:.4f}")
print("Expected Counts Table:\n", np.round(expected_two_way, 2))

3. Common AP Exam Pitfalls & Score 5 Scoring Rubric Nuances

To earn a Score 5, responses must meet strict AP scoring criteria (Essentially Correct - E vs. Partially Correct - P). Below are common pitfalls that degrade a score from 5 to 4.

Pitfall 1: Confusing Test for Homogeneity with Test for Independence

Pitfall 2: Incorrect Hypotheses Formulations

Pitfall 3: Inadequate Condition Checking

Score 4 vs. Score 5 Performance Matrix

+------------------------+------------------------------------------+------------------------------------------+
| Evaluation Component   | Score 4 Standard (Partially Correct)     | Score 5 AP Standard (Essentially Correct) |
+------------------------+------------------------------------------+------------------------------------------+
| 1. Hypotheses          | States $H_0/H_a$ non-contextually or     | Fully contextualized in terms of the     |
|                        | uses population parameters ($\mu, p$).   | population distribution or association.  |
+------------------------+------------------------------------------+------------------------------------------+
| 2. Conditions          | States "Counts > 5" without displaying   | Explicitly displays ALL expected counts  |
|                        | the expected values table.               | and verifies $E_i \ge 5$ along with      |
|                        |                                          | Randomness and $10\%$ conditions.        |
+------------------------+------------------------------------------+------------------------------------------+
| 3. Mechanics           | Gives correct $\chi^2$ and $p$-value but | Shows formula setup, gives $\chi^2$, $df$,|
|                        | omits degrees of freedom ($df$).         | and precise $p$-value.                   |
+------------------------+------------------------------------------+------------------------------------------+
| 4. Conclusion          | "Reject $H_0$. There is a difference."   | Compares $p$-value to $\alpha$, rejects   |
|                        | Omits link to $\alpha$ or context.       | $H_0$, and concludes in explicit context.|
+------------------------+------------------------------------------+------------------------------------------+

4. Georgia Tech Placement Pathway

Mastering categorical data analysis opens up specific acceleration pathways within Georgia Tech’s H. Milton Stewart School of Industrial and Systems Engineering (ranked #1 nationally).

  AP Statistics Exam (Score 5)
               │
               ▼
   Waive ISYE 3770 (3 Credits)
   Statistics and Applications
               │
               ▼
 Direct Accelerated Entry Into:
   ISYE 3030 (3 Credits)
   Basic Quality Control
               │
               ▼
 Advanced Engineering Rigor:
   • Shewhart Control Charts (p-charts, c-charts)
   • Chi-Square Goodness-of-Fit for Defect Distributions
   • Stochastic Modeling & Process Capability Assessment

Strategic Placement Breakdown


5. High-Yield Practice Problem & Step-by-Step Solution Checklist

Problem Statement

A senior quality control engineer at a semiconductor manufacturing plant in Atlanta evaluates microchip defect classifications across three parallel fabrication lines (Line A, Line B, Line C). A single random sample of 300 defective microchips is selected from the previous month's production run. Each defective chip is inspected and categorized into one of three primary failure modes: Thermal, Dielectric, or Lithographic.

The observed counts are summarized below:

               Thermal    Dielectric    Lithographic    Total
Line A            35          20             25           80
Line B            45          35             40          120
Line C            20          45             35          100
Total            100         100            100          300
  1. (a) Identify the appropriate statistical test. State the null and alternative hypotheses in context.
  2. (b) Check all necessary conditions for performing this test, displaying the expected counts for each cell.
  3. (c) Calculate the test statistic, degrees of freedom, and the $p$-value.
  4. (d) State an appropriate conclusion at the $\alpha = 0.05$ significance level.
  5. (e) Identify which single cell contributes most to the calculated Chi-Square test statistic. Interpret the directional residual for this cell in context.

Step-by-Step Solution & AP Rubric Checklist

Part (a): Identification and Hypotheses

Part (b): Conditions Verification

  1. Randomness: Stated that a "single random sample of 300 defective microchips" was taken. (Satisfied)
  2. 10% Condition: Sample size $n = 300 \le 10\%$ of all defective microchips produced in a month. (Satisfied)
  3. Expected Counts ($E_i \ge 5$):
    Calculated via $E_{r,c} = \frac{\text{Row Total} \times \text{Column Total}}{\text{Table Total}}$:

$$\begin{aligned} E_{\text{Line A, Thermal}} &= \frac{80 \times 100}{300} = 26.67, & E_{\text{Line A, Dielectric}} &= \frac{80 \times 100}{300} = 26.67, & E_{\text{Line A, Lithographic}} &= \frac{80 \times 100}{300} = 26.67 \ E_{\text{Line B, Thermal}} &= \frac{120 \times 100}{300} = 40.00, & E_{\text{Line B, Dielectric}} &= \frac{120 \times 100}{300} = 40.00, & E_{\text{Line B, Lithographic}} &= \frac{120 \times 100}{300} = 40.00 \ E_{\text{Line C, Thermal}} &= \frac{100 \times 100}{300} = 33.33, & E_{\text{Line C, Dielectric}} &= \frac{100 \times 100}{300} = 33.33, & E_{\text{Line C, Lithographic}} &= \frac{100 \times 100}{300} = 33.33 \end{aligned}$$

Part (c): Mechanics

$$\chi^2 = \sum \frac{(O - E)^2}{E} = \frac{(35 - 26.67)^2}{26.67} + \frac{(20 - 26.67)^2}{26.67} + \dots + \frac{(35 - 33.33)^2}{33.33}$$

$$\chi^2 = 2.602 + 1.668 + 0.105 + 0.625 + 0.625 + 0.000 + 5.331 + 4.086 + 0.084 = 14.426$$

$$df = (r - 1)(c - 1) = (3 - 1)(3 - 1) = 4$$

$$p\text{-value} = P(\chi^2_4 \ge 14.426) \approx 0.0060$$

Part (d): Conclusion

"Because the $p$-value ($0.0060$) is less than the significance level $\alpha = 0.05$, we reject the null hypothesis $H_0$. There is convincing statistical evidence that an association exists between the manufacturing line and the failure mode type in the population of defective microchips."

Part (e): Advanced Residual Interpretation

Aiming for a Score 5 in Statistics?

Secure admission and advanced standing at top institutions like Georgia Tech with elite 1-on-1 AP STEM mentorship.

無料相談・学習プラン診断