Proportion
Tests
Master one-sample and two-sample hypothesis tests for proportions: when to use them, how to compute the z-statistic, and how to interpret p-values in biostatistics contexts.
What Is a Proportion?
A proportion is the fraction of a population or sample that has a particular characteristic. We denote the population proportion as \( p \) and the sample proportion as \( \hat{p} \).
Why Test Proportions?
In biostatistics, we constantly ask questions about rates and percentages. Proportion tests give us a formal framework to decide whether observed differences are real or just sampling noise.
Sampling Distribution of \( \hat{p} \)
Under repeated sampling, \( \hat{p} \) follows an approximately normal distribution when the sample size is large enough. This is the foundation for our z-tests.
One-Sample Z-Test for a Proportion
We use the one-sample proportion test to determine whether a sample proportion \( \hat{p} \) differs significantly from a hypothesized value \( p_0 \).
Two-Sample Z-Test for Proportions
When comparing proportions from two independent groups, we test whether the difference \( \hat{p}_1 - \hat{p}_2 \) is significantly different from zero.
One-Sample vs Two-Sample
| One-Sample | Two-Sample | |
|---|---|---|
| Question | Does \( p \) equal a known value \( p_0 \)? | Do \( p_1 \) and \( p_2 \) differ? |
| SE denominator uses | \( p_0 \) (hypothesized) | \( \hat{p} \) (pooled) |
| Number of samples | 1 group | 2 independent groups |
| Typical scenario | Compare to a standard | Compare treatment vs control |
Conditions to Check
Before running a proportion z-test, verify these three conditions are met:
Step-by-Step Procedure
Example 1: One-Sample Test
A hospital claims that 80% of its patients are satisfied. A random sample of 150 patients finds 108 satisfied. Test at \( \alpha = 0.05 \) whether the true rate is less than 80%.
Visualizing Example 1
Example 2: Two-Sample Test
A clinical trial compares a new drug to a placebo. In the drug group (\( n_1 = 200 \)), 56 patients improved. In the placebo group (\( n_2 = 180 \)), 36 patients improved. Test at \( \alpha = 0.05 \) whether the drug has a higher improvement rate.
Example 2: Conclusion
Example 3: Failing to Reject
A public health official claims the smoking rate in a city is \( p_0 = 0.18 \). A random sample of 400 adults finds 78 smokers. Test at \( \alpha = 0.05 \) (two-sided).
Common Mistakes
Summary Comparison
| One-Sample \( z \) | Two-Sample \( z \) | |
|---|---|---|
| Null | \( p = p_0 \) | \( p_1 = p_2 \) |
| Test Statistic | $$ \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}} $$ | $$ \frac{\hat{p}_1 - \hat{p}_2}{\sqrt{\hat{p}(1-\hat{p})(\frac{1}{n_1}+\frac{1}{n_2})}} $$ |
| SE uses | \( p_0 \) | Pooled \( \hat{p} \) |
| Conditions | \( np_0 \geq 10,\; n(1-p_0) \geq 10 \) | Both groups meet success/failure check |
| Decision | Compare \( \text{p-value} \) to \( \alpha \). Reject \( H_0 \) if \( \text{p-value} < \alpha \). | |
Question 1 of 5
In a one-sample proportion test, the standard error in the denominator uses:
Question 2 of 5
A researcher tests \( H_0: p = 0.5 \) vs \( H_a: p > 0.5 \) and finds \( z = 1.96 \). What is the p-value?
Question 3 of 5
In a two-sample proportion test, why do we use a pooled proportion \( \hat{p} \)?
Question 4 of 5
A sample of \( n = 30 \) finds \( \hat{p} = 0.03 \). Testing \( H_0: p = 0.05 \), which condition is violated?
Question 5 of 5
In a two-sample test, \( \hat{p}_1 = 0.35 \), \( n_1 = 100 \), \( \hat{p}_2 = 0.25 \), \( n_2 = 120 \). What is the pooled proportion \( \hat{p} \)?