AP Syllabus focus:
‘Calculate the test statistic for the difference in two sample proportions using the formula: z = (p̂1 - p̂2) - 0 / √(p̂c(1 - p̂c)/n1 + p̂c(1 - p̂c)/n2), where p̂c is the pooled sample proportion (p̂c = (n1p̂1 + n2p̂2) / (n1 + n2)), n1 and n2 are the sample sizes, and 0 is the hypothesized difference in population proportions (usually 0). This statistic follows the standard normal distribution under the null hypothesis.’
This section explains how to compute the test statistic for comparing two population proportions, focusing on the z-statistic structure, pooled proportion logic, and variance estimation.
Understanding the Purpose of the Test Statistic
The test statistic measures how far the observed difference between two sample proportions departs from the value predicted by the null hypothesis, expressed in standardized units. For AP Statistics, this process enables students to determine whether the data provide statistical evidence of a difference between two population proportions.
The test statistic relies on the sampling distribution of the difference in sample proportions, which, under appropriate conditions, is approximately normal.

The normal distribution here illustrates the null model for the difference in two proportions, centered at zero, with shaded tails indicating areas as extreme as the observed statistic. The example uses medication response data, which extends beyond but aligns with the general concept of a null distribution for standardized test statistics. Source.
Components Required for Calculating the Test Statistic
Before computing the test statistic, several quantities must be identified because each reflects how sample information is combined to estimate the variability expected under the null hypothesis.
Sample Proportions
Each sample provides a sample proportion, denoted p̂₁ and p̂₂, representing the proportion of individuals in each sample exhibiting the categorical outcome of interest. These values describe the observed differences that the test statistic evaluates.
Pooled Proportion
Because the null hypothesis assumes no difference between population proportions, a pooled estimate of the shared proportion is required.
Pooled Proportion: A combined estimate of the population proportion calculated under the assumption that both samples come from populations with the same true proportion.
This pooled value provides the basis for computing the expected standard deviation under the null hypothesis and ensures consistency with the assumption that the populations do not differ.
Computing the Pooled Proportion
The pooled proportion p̂c is computed using counts of successes and total sample sizes from both groups. This produces a weighted estimate that reflects all available data.
EQUATION
= Pooled sample proportion
= Individual sample proportions
= Sample sizes for groups 1 and 2
The pooled proportion is essential because it determines the standard error used in the denominator of the test statistic.
Structure of the Test Statistic
The z-statistic for two proportions compares the observed difference to the hypothesized difference and expresses that comparison in standard deviation units.
Standard Error of the Difference in Proportions
The standard error quantifies expected variation in the difference of sample proportions when the null hypothesis is true. It uses the pooled proportion to represent the assumed equal population proportion.
EQUATION
= Standard error of the difference in sample proportions
Understanding the standard error is crucial because it contextualizes how much random sampling variation is expected, allowing the test statistic to standardize the observed difference.
Formula for the Test Statistic
The test statistic incorporates the observed difference, the hypothesized difference, and the standard error. Under the null hypothesis, the hypothesized difference is typically zero.
EQUATION
= Test statistic following the standard normal distribution under
This z-value indicates how many standard deviations the observed difference lies from the expected difference under the null hypothesis.

The figure illustrates how a z-score corresponds to an area under the standard normal curve, highlighting how standardized test statistics are interpreted for probability-based decisions. The SAT-score context is specific to the source but visualizes the same principles applied in significance testing for proportions. Source.
Interpreting the Test Statistic
Once calculated, the test statistic becomes the basis for evaluating evidence against the null hypothesis.
Relationship to the Null Distribution
The null distribution is the theoretical distribution of the test statistic assuming the null hypothesis is true. Because the standardized statistic follows a normal model, extreme values provide evidence that the observed difference is unlikely to have occurred due to sampling variation alone.

This normal curve represents the reference distribution for standardized statistics, including the two-proportion z statistic when conditions for normality are met. It shows how likely different standardized values are under the null hypothesis, providing context for interpreting extremity. Source.
Key Points for AP Students
The test statistic compares observed data to what is expected under no population difference.
The pooled proportion ensures consistency with the null hypothesis.
A larger absolute z-value indicates stronger evidence against the null hypothesis.
These points emphasize that calculating the test statistic is central to determining whether two categorical populations differ meaningfully.
FAQ
The pooled proportion is used because the null hypothesis states that the two population proportions are equal. Under this assumption, combining the samples provides a single best estimate of the shared population value.
This pooled estimate ensures that the standard error reflects variation expected when no true difference exists, making the test statistic consistent with the null hypothesis framework.
The test statistic becomes more influenced by the larger sample because it contributes more weight to the pooled proportion and affects the standard error more strongly.
When sample sizes differ greatly:
• The group with the larger sample tends to dominate the pooled estimate.
• The variability of the difference in proportions decreases due to increased precision in the larger sample.
• Extremely unbalanced samples may reduce interpretative clarity, even when technically valid.
A small observed difference leads to a small numerator in the test statistic, which often results in a z-value close to zero.
When the z-value is near zero:
• The result indicates that the observed difference is well within the range expected due to sampling variation.
• The corresponding p-value will be large, offering little evidence against the null hypothesis.
• Even small differences may appear meaningful only with very large sample sizes.
It is technically possible, but the calculation may be unstable because the pooled proportion and standard error depend on variability within each sample.
Problems arise when:
• A sample proportion of 0 or 1 indicates no variability in that sample.
• The standard error may become extremely small, inflating the test statistic artificially.
In practice, such cases usually require caution, alternative methods, or adjusted techniques such as adding a small correction.
Rounding can influence the precision of both the pooled proportion and the standard error, potentially altering the final z-value slightly.
To minimise issues:
• Retain at least four decimal places for intermediate values.
• Perform rounding only at the final step when reporting results.
• Small rounding differences rarely affect conclusions unless the test statistic is extremely close to a decision threshold.
Practice Questions
Question 1 (1–3 marks)
A researcher takes two independent random samples to compare the proportion of customers satisfied with Service A and Service B. The sample proportion for Service A is 0.72 from a sample of 150 customers, and the sample proportion for Service B is 0.65 from a sample of 160 customers.
State the formula for the test statistic used to compare two population proportions under the null hypothesis that the proportions are equal.
Question 1
• 1 mark for writing the numerator as (p-hat1 − p-hat2) minus the hypothesised difference, usually 0.
• 1 mark for stating that the denominator is the standard error based on the pooled proportion.
• 1 mark for presenting the complete structure:
z = [(p-hat1 − p-hat2) − 0] / sqrt[p-c(1 − p-c)(1/n1 + 1/n2)].
Question 2 (4–6 marks)
A school wants to investigate whether the proportion of students who prefer online learning differs between Year 10 and Year 11. An independent random sample of 90 Year 10 students finds that 54 prefer online learning. A separate random sample of 110 Year 11 students finds that 51 prefer online learning.
(a) Calculate the sample proportions for each year group.
(b) Compute the pooled proportion required for the test statistic under the null hypothesis that the population proportions are equal.
(c) Using the pooled proportion, write the full expression (you do not need to simplify numerically) for the z test statistic that compares the two proportions.
Question 2
(a)
• 1 mark for correct p-hat1: 54/90 = 0.60.
• 1 mark for correct p-hat2: 51/110 = 0.4636 (or 0.464 if rounded).
(b)
• 1 mark for correctly forming the pooled proportion expression:
p-c = (n1 p-hat1 + n2 p-hat2) / (n1 + n2).
• 1 mark for correctly substituting values:
p-c = (90 × 0.60 + 110 × 0.4636) / 200.
(c)
• 1 mark for writing the correct numerator: (p-hat1 − p-hat2) − 0.
• 1 mark for writing the correct denominator using the pooled proportion:
sqrt[p-c(1 − p-c)(1/90 + 1/110)].
