AP Statistics

Unit 3

Inference for Categorical Data: Proportions

15 topics · 53 practice questions · Free response

Notes

Confidence intervals for $p$

Point estimate $\pm$ margin of error:

$$\hat p \pm z^*\sqrt{\frac{\hat p(1 - \hat p)}{n}}$$
  • Conditions: random sample, 10% condition ($n \le 10\%$ of the population), large counts ($n\hat p \ge 10$ and $n(1 - \hat p) \ge 10$).
  • $z^* = 1.645$ for 90%, $1.96$ for 95%, $2.576$ for 99%.
  • Interpretation: "We are 95% confident that the interval from ___ to ___ captures the true proportion of [context]."
  • Confidence level meaning: if we took many samples and built an interval from each, about 95% of them would capture $p$.
  • Larger $n$ makes the margin of error smaller; higher confidence makes it bigger.

Significance tests for $p$

1. State: $H_0: p = p_0$ and $H_a: p >, <, \ne p_0$, with $\alpha$ and a definition of $p$. 2. Plan: one-sample $z$ test; check conditions using $p_0$. 3. Do: $\displaystyle z = \frac{\hat p - p_0}{\sqrt{p_0(1 - p_0)/n}}$ and the p-value. 4. Conclude: if p-value $< \alpha$, reject $H_0$; there is convincing evidence for $H_a$. Otherwise fail to reject.

  • p-value: the probability of getting a result at least as extreme as the one observed, assuming $H_0$ is true.
  • Type I error: reject a true $H_0$ (probability $\alpha$). Type II error: fail to reject a false $H_0$. Power $= 1 - P(\text{Type II})$; it goes up with larger $n$ or larger $\alpha$.

Two proportions

  • Interval: $\displaystyle (\hat p_1 - \hat p_2) \pm z^*\sqrt{\frac{\hat p_1(1 - \hat p_1)}{n_1} + \frac{\hat p_2(1 - \hat p_2)}{n_2}}$.
  • Test of $H_0: p_1 = p_2$ uses the pooled proportion $\displaystyle \hat p_c = \frac{x_1 + x_2}{n_1 + n_2}$.
  • If an interval for $p_1 - p_2$ contains 0, there's no convincing evidence of a difference.

Chi-square tests for two-way tables

  • Homogeneity: several populations or treatments, one categorical variable. Independence: one sample, two categorical variables.
  • Expected count $\displaystyle = \frac{\text{row total} \times \text{column total}}{\text{table total}}$; all expected counts should be at least 5.
  • $\displaystyle \chi^2 = \sum \frac{(\text{observed} - \text{expected})^2}{\text{expected}}$ with $df = (\text{rows} - 1)(\text{columns} - 1)$.

Topics in this unit

Each topic has its own short notes and practice.

Practice

In a random sample of 400 voters, 220 support a measure. What is $\hat p$?
Which change makes a confidence interval narrower?
A 95% confidence interval for $p$ is (0.42, 0.50). What is the margin of error?
What does a p-value of 0.03 mean?
A Type I error in testing whether a new drug works better than the old one would be:
A 95% interval for $p_1 - p_2$ is $(-0.03, 0.08)$. What can you conclude?
A chi-square test for a table with 3 rows and 4 columns has how many degrees of freedom?
Which increases the power of a test?

Free response

Write your answer first, then open the scoring guide.

Free-response question

A company claims 20% of its customers buy a warranty. In a random sample of 250 customers, 38 bought one. Is this convincing evidence that fewer than 20% buy a warranty? Use $\alpha = 0.05$.

(a) State the hypotheses and check the conditions.

Show the answer and scoring guide

$H_0: p = 0.20$, $H_a: p < 0.20$, where $p$ is the true proportion of all customers who buy a warranty. Random sample; 250 is less than 10% of all customers (assumed); $250(0.2) = 50 \ge 10$ and $250(0.8) = 200 \ge 10$.

Check off the points you earned:

(b) Calculate the test statistic and p-value.

Show the answer and scoring guide

$\displaystyle \hat p = \frac{38}{250} = 0.152$. $\displaystyle z = \frac{0.152 - 0.20}{\sqrt{0.2(0.8)/250}} = \frac{-0.048}{0.0253} \approx -1.90$. p-value $\approx 0.029$.

Check off the points you earned:

(c) State a conclusion in context.

Show the answer and scoring guide

Because $0.029 < 0.05$, reject $H_0$. There is convincing evidence that fewer than 20% of all the company's customers buy a warranty.

Check off the points you earned: