Two-sample t-test vs two-proportion z-test
By Jude Wallis · Published
Both tests compare two independent groups. The two-sample t-test compares means of a quantitative response, such as scores or hours. The two-proportion z-test compares proportions of a categorical response with two outcomes, such as pass or fail. The type of response variable decides.
This page spans two units of the Fall 2026 AP Statistics course. The two-proportion z-test is Unit 3 topics 3.12 and 3.13, and the two-sample t-test is Unit 4 topics 4.9 and 4.10. Choosing between them comes down to whether the response variable is categorical or quantitative.
Two-sample t-test vs two-proportion z-test: the short answer
The two tests answer the same kind of question, whether two groups differ, for two kinds of data.
When each individual contributes a number, such as a test score, a height, or a reaction time, the groups are summarized by means and you run a two-sample t-test on .
When each individual contributes a category with two outcomes, such as passed or failed, the groups are summarized by proportions and you run a two-proportion z-test on .
Look at what was recorded for one individual. A measurement points to the t-test. A yes or no points to the z-test. The words "average" and "mean" in a problem signal means, and "percent," "proportion," and "how many out of" signal proportions.
The two-sample t-test
The parameter is the difference between two population means, , and the null hypothesis is . The test statistic is
Each group supplies three numbers: a sample size, a sample mean ("x-bar"), and a sample standard deviation . The p-value comes from a distribution with degrees of freedom supplied by technology.
Conditions: two independent random samples or a randomized experiment; each sample at most 10% of its population when sampling without replacement; and both sample sizes at least 30, or both populations stated to be approximately normal, or no strong skew or outliers in a smaller sample.
The reference curve is because the population standard deviations are unknown and each one is estimated by a sample standard deviation. That extra estimation adds uncertainty, and the heavier tails of the curve account for it.
The two-proportion z-test
The parameter is the difference between two population proportions, , and the null hypothesis is . The test statistic is
where and ("p-hat") are the sample proportions and is the combined, or pooled, proportion of successes. Each group supplies two numbers: a count of successes and a sample size. The p-value comes from the standard normal distribution, which has no degrees of freedom.
Conditions: two independent random samples or a randomized experiment; the 10% condition when sampling without replacement; and large counts, meaning , , , and are all at least 10.
The standard error is pooled because the null hypothesis says the two proportions are equal, so the best estimate of that shared value uses both samples together. A proportion also has no separate standard deviation to estimate: once a value of is assumed, the spread of follows from it. The setup is covered in one-proportion vs two-proportion z-test.
The differences side by side
| Feature | Two-sample t-test | Two-proportion z-test |
|---|---|---|
| Response variable | Quantitative | Categorical with two outcomes |
| Parameter | ||
| Summary from each group | , , | and a count of successes |
| Numerator | ||
| Standard error | ||
| Pooled in the test | No | Yes |
| Reference distribution | , with df from technology | Standard normal |
| Size condition | in each group, or normal populations, or no strong skew or outliers | At least 10 expected successes and failures in each group |
Both statistics are a difference divided by a standard error, and both null hypotheses set the difference to 0. Every row that differs traces back to the first one: the type of response variable.
When to use which
Start with the response variable for a single individual.
- If it is a number you could average, and the question is about a typical value, use the two-sample t-test.
- If it is one of two categories, and the question is about how common one category is, use the two-proportion z-test.
Then confirm that the two groups are independent. Both tests need two separate groups of individuals. Paired quantitative data go to a one-sample t-test on the differences.
A quantitative variable can be turned into a categorical one, and the test changes with it. Exam scores are quantitative, so comparing mean scores is a t-test. "Scored 70 or above" is a yes or no for each student, so comparing pass rates from the same exam is a z-test. The two analyses answer different questions and can reach different conclusions.
If the categorical response has three or more outcomes, neither test fits and a chi-square test for homogeneity is the tool, as chi-square tests explained covers. The wider decision is laid out in which statistical test to use.
The classic mix-up and how to avoid it
The usual error is choosing the test from the word "two" or from the sample sizes and skipping the data type. Averages, standard deviations, and units such as points, minutes, or grams signal a t-test. Counts out of a total and percentages signal a z-test. A problem that gives and cannot be a proportion test, and a problem that gives "63 of 120" has no to put into a t statistic.
Three related slips follow from blurring the two:
- Using a critical value or degrees of freedom for proportions. Proportion tests use the standard normal curve.
- Checking the wrong condition. Large counts belongs to proportions. Sample size 30, or a normal population, belongs to means.
- Pooling the wrong test. The two-proportion test pools . The two-sample t-test in this course does not pool the standard deviations, as pooled or not on a two-sample t-test explains.
To avoid all of them, write the parameter in symbols before anything else. Writing or forces the choice, and the correct formula, curve, and conditions follow from it.
One experiment, pass rates: a two-proportion z-test
In an experiment, 300 students are randomly assigned, 150 to a new study app and 150 to the standard review packet. On the unit exam, 90 app students and 72 packet students pass. Test at whether the pass rates differ.
Identify the response. Each student either passed or did not, a categorical variable with two outcomes, so compare proportions with a two-proportion z-test.
State the hypotheses: and , where and are the true pass rates for students like these using the app and using the packet.
Sample proportions: and .
Pooled proportion: .
Check conditions: treatments were randomly assigned; the expected counts are and in each group, all at least 10.
Standard error: .
Test statistic: .
Two-sided p-value from the standard normal curve: 0.0371. Since , reject .
and the p-value is 0.0371. Reject : there is convincing evidence that the pass rate differs between the app and the packet for students like these. The data were counts of a yes or no outcome, so the test used proportions, a pooled standard error, and the normal curve.
The same experiment, exam scores: a two-sample t-test
In the same experiment, the exam scores themselves are recorded. App group: , , . Packet group: , , . Test at whether the mean scores differ.
Identify the response. Each student contributes a score, a quantitative variable, so compare means with a two-sample t-test.
State the hypotheses: and , where and are the true mean exam scores for students like these using the app and using the packet.
Check conditions: treatments were randomly assigned, and both group sizes are 150, which is at least 30.
Variance terms: and .
Standard error: .
Test statistic: .
Degrees of freedom from technology: 296.77. The two-sided p-value is 0.0140. Since , reject .
with 296.77 degrees of freedom and a p-value of 0.0140. Reject : there is convincing evidence that the mean exam score differs between the app and the packet for students like these. The same students produced a z-test when the response was pass or fail and a t-test when it was the score.
Frequently asked questions
How do I tell means from proportions in a word problem?
Ask what was recorded for one individual. A number with units, summarized by an average and a standard deviation, means a t-test for means. A category with two outcomes, summarized by a count or percent, means a z-test for proportions.
Why does one test use z and the other use t?
A test for means has to estimate each population standard deviation with a sample standard deviation, and the distribution accounts for that extra uncertainty. A test for proportions has no separate standard deviation to estimate, because the spread of a sample proportion is determined by the proportion itself, so the standard normal curve is used.
Can I use a two-proportion z-test when there are three categories?
No. A two-proportion z-test needs a response with two outcomes, success or failure. With three or more categories, compare the groups with a chi-square test for homogeneity, which handles the whole distribution of a categorical variable at once.