A z-test for proportions helps decide whether sample data provide strong evidence about a population proportion. It is used when outcomes fall into two categories, such as success or failure, yes or no, or defective or not defective. The test compares an observed sample proportion to a hypothesized value, or compares two sample proportions to each other.
It matters because many real decisions in science, medicine, business, and polling are based on proportions.
Understanding Statistics: The z-Test for Proportions
The central idea is random variation. Even if a population rate really matches a claimed rate, a sample will rarely match it exactly. The z score measures how far the sample result lies from the claim after allowing for the variation expected from the sample size.
A positive score means the observed proportion is above the claim. A negative score means it is below. Scores near zero are ordinary under the null model.
Scores far from zero are less ordinary. The p-value describes how likely results at least this far from the claim would be if the null model were true.
A z-test works best when the data come from a random sample or a properly randomized experiment. Each observation should be independent. For example, if students in one friendship group influence each other's answers, their responses may not act like independent data.
When sampling without replacement, the sample should usually be less than ten percent of the population. There must also be enough expected successes and expected failures. A common rule uses at least ten of each, based on the claimed proportion.
With very small counts or extremely rare outcomes, the normal curve approximation can be inaccurate. Another method, such as an exact binomial test, may be more suitable.
For two groups, the test asks whether the difference between their observed rates could reasonably arise from sampling variation alone. Under the null model, both groups are treated as having one shared population rate. That is why the calculation uses a pooled proportion.
It combines the success counts and total counts from both samples to estimate that shared rate. Pooling is used for the test because the null model says there is no true difference. It is not usually used when making a confidence interval for the size of the difference.
Students should notice whether groups were randomly assigned in an experiment or merely observed in a survey. Random assignment supports a cause and effect conclusion. An observational comparison can show an association, though other differences between the groups may explain it.
The chosen significance level sets the standard for evidence. A level of five percent means accepting a five percent chance of rejecting a true null model in the long run. A small p-value is evidence against the null model, not proof that the alternative is true.
A large p-value does not prove that there is no difference. It can mean the sample was too small to detect a real difference. Practical importance matters too.
A tiny difference can produce a small p-value when the sample is huge, while a meaningful difference may not be statistically significant in a small study. Always report the sample proportions, the sample sizes, and the size of the difference alongside the test decision.
Key Facts
- One-proportion hypotheses: H0: p = p0 and Ha: p < p0, p > p0, or p != p0.
- One-proportion test statistic: z = (p-hat - p0) / sqrt(p0(1 - p0) / n).
- Two-proportion hypotheses: H0: p1 = p2 and Ha: p1 < p2, p1 > p2, or p1 != p2.
- Pooled proportion for a two-proportion z-test: p-hat pooled = (x1 + x2) / (n1 + n2).
- Two-proportion test statistic: z = (p1-hat - p2-hat) / sqrt(p-hat pooled(1 - p-hat pooled)(1/n1 + 1/n2)).
- Decision rule: reject H0 when the p-value is less than or equal to alpha, and fail to reject H0 when the p-value is greater than alpha.
Vocabulary
- Population proportion
- The true fraction p of an entire population that has a certain characteristic.
- Sample proportion
- The observed fraction p-hat = x/n of a sample that has a certain characteristic.
- Null hypothesis
- The default claim H0 that the population proportion equals a stated value or that two population proportions are equal.
- P-value
- The probability, assuming H0 is true, of getting a test statistic as extreme as or more extreme than the observed one.
- Significance level
- The cutoff alpha for deciding when evidence is strong enough to reject the null hypothesis.
Common Mistakes to Avoid
- Using p-hat instead of p0 in the one-proportion standard error is wrong because the null distribution must be built using the proportion claimed by H0.
- Forgetting to pool in a two-proportion z-test is wrong when H0 says p1 = p2 because the test assumes one common proportion under the null hypothesis.
- Using a two-tailed p-value for a one-tailed alternative is wrong because the shaded rejection area must match the direction stated in Ha.
- Running a z-test when expected counts are too small is wrong because the normal approximation may be inaccurate unless counts such as np0 and n(1 - p0) are large enough.
Practice Questions
- 1 A company claims that 60% of customers prefer its new design. In a random sample of 150 customers, 78 prefer the new design. Test H0: p = 0.60 against Ha: p < 0.60 at alpha = 0.05. Find z, estimate the p-value, and state the conclusion.
- 2 Group A has 64 successes out of 200 trials, and Group B has 90 successes out of 250 trials. Test H0: p1 = p2 against Ha: p1 != p2 at alpha = 0.05 using a two-proportion z-test. Compute the pooled proportion, z-statistic, and conclusion.
- 3 A poll about support for a policy uses a random sample, but only 6 people in the sample oppose the policy. Explain why a z-test for a proportion may not be appropriate and what condition is being violated.