MaizePrepSTATS 250
Exam 1 · Lec 06

The z-test for a proportion

Theory-based tests for π\pi: hypotheses, the null standard deviation, the success-failure check with π0\pi_0, interpreting z and the p-value, and three-part conclusions.

30 min

Key ideas

Null standard deviation

π0(1−π0)/n\sqrt{\pi_0(1-\pi_0)/n}: how much π^\hat\pi would wiggle if H0H_0 were true. A test assumes H0H_0, so it uses π0\pi_0, not π^\hat\pi.

Sample size condition

nπ0≥10n\pi_0 \ge 10 and n(1−π0)≥10n(1-\pi_0) \ge 10, using the null value. Using π^\hat\pi can wrongly pass or fail the check.

Test statistic

"The observed sample proportion of [context] is |z| null standard deviations above/below the hypothesized value π0\pi_0." The sign comes from π^−π0\hat\pi-\pi_0, not from HaH_a.

p-value definition (three ideas)

(1) Assuming H0H_0 is true, in context; (2) a statistic as extreme as or more extreme than the one observed, in the direction of HaH_a; (3) its probability.

Conclusion (three elements)

(1) The strength of evidence; (2) the parameter and its population; (3) the direction of HaH_a. Always phrased about HaH_a, even when the p-value is large.

Two-sided p-values

Shade both tails: double the one-tail area beyond ∣z∣|z|. Switching to a one-sided HaH_a halves it only if the new direction matches the data.

Formulas

z-statistic
z=π^−π0π0(1−π0)/nz=\frac{\hat\pi-\pi_0}{\sqrt{\pi_0(1-\pi_0)/n}}
On the help card.
p-values in R
pnorm(z, 0, 1, lower.tail = FALSE)or2×pnorm(-|z|, 0, 1)\texttt{pnorm(z, 0, 1, lower.tail = FALSE)}\quad\text{or}\quad 2\times\texttt{pnorm(-|z|, 0, 1)}
Right-tailed, and two-sided.

Three spreads that look alike

NameFormulaUsesWhen
Standard deviationπ(1−π)/n\sqrt{\pi(1-\pi)/n}true π\pidescribing sampling variability when π\pi is known
Null standard deviationπ0(1−π0)/n\sqrt{\pi_0(1-\pi_0)/n}null value π0\pi_0hypothesis tests (z)
Standard errorπ^(1−π^)/n\sqrt{\hat\pi(1-\hat\pi)/n}sample π^\hat\piconfidence intervals (Exam 2)
Worked example

Phone payments at one station

A transit agency reports that 45% of riders pay by phone. A station manager suspects the rate is higher at her station. In a random sample of 400 riders there, 204 paid by phone. Test her claim.

> phat <- 204 / 400
> z <- (phat - 0.45) / sqrt(0.45 * 0.55 / 400)
> z
[1] 2.412091
> pnorm(z, 0, 1, lower.tail = FALSE)
[1] 0.007930666
  1. Parameter and hypotheses: π\pi = the true proportion of riders at this station who pay by phone. H0:π=0.45H_0: \pi = 0.45 versus Ha:π>0.45H_a: \pi > 0.45.

  2. Condition with $\pi_0$: 400(0.45)=180400(0.45) = 180 and 400(0.55)=220400(0.55) = 220, both at least 10.

  3. Statistic: π^=0.51\hat\pi = 0.51; null SD =0.45⋅0.55/400≈0.0249= \sqrt{0.45 \cdot 0.55/400} \approx 0.0249; z≈2.41z \approx 2.41: the sample proportion is about 2.41 null SDs above 0.45.

  4. p-value: right tail, about 0.0079. Assuming 45% of riders at this station pay by phone, there is about a 0.79% chance of a sample proportion of 0.51 or higher in a sample of 400.

  5. Conclusion: p≤0.01p \le 0.01.

Answer

Very strong evidence that the true proportion of riders at this station who pay by phone is greater than 0.45.

Check yourself

1
Lec 06

Four planned one-proportion z-tests. Select every plan whose sample is large enough for the z-test.

2
Lec 06

For H0:π=0.70H_0: \pi = 0.70 versus Ha:π<0.70H_a: \pi < 0.70 about the share of a clinic's patients who arrive on time, the test gives z=−1.9z = -1.9. A student writes: "The observed proportion of on-time patients is 1.9 standard errors below 0.70." What, if anything, needs fixing?

3
Lec 06

A two-sided z-test gives z=2.1z = 2.1. In R, pnorm(-2.1, 0, 1) returns 0.0179. What is the p-value?

4
Lec 06

Testing H0:π=0.50H_0: \pi = 0.50 with a random sample of 100 gives π^=0.58\hat\pi = 0.58. Compute the z-statistic. Give the exact value (or 2 decimal places).

Math shortcuts are on for STATS 250. Type ^ then digits for powers, _ then digits for subscripts.
5
Lec 06

A z-test of H0:π=0.25H_0: \pi = 0.25 versus Ha:π≠0.25H_a: \pi \ne 0.25 about city residents who bike to work gives p = 0.07. Select every element a complete STATS 250 conclusion needs.

6
Lec 06

Quantity A: the p-value of a right-tailed z-test with π^=0.56\hat\pi = 0.56, π0=0.50\pi_0 = 0.50 and n=200n = 200. Quantity B: the p-value with the same π^\hat\pi and π0\pi_0 but n=400n = 400.

7
Lec 06

A test of H0:π=0.03H_0: \pi = 0.03 versus Ha:π≠0.03H_a: \pi \ne 0.03 about the defect rate of a factory's phone screens gives π^=0.01\hat\pi = 0.01 and p = 0.04. Which conclusion is correct?

MaizePrep is an independent study resource. It is not affiliated with, sponsored by, or endorsed by the University of Michigan. Course names and numbers are used only to describe which class the material covers. Every practice question is original, written in the style of the course.