Z-Test vs T-Test
Z-Test vs T-Test
Two fundamental hypothesis tests for comparing means. The z-test assumes a known population standard deviation and large samples, while the t-test is designed for small samples or when the population standard deviation is unknown.
Comparison Table
| Feature | Z-Test | T-Test |
|---|---|---|
| Population SD | Known | Unknown (estimated from sample) |
| Sample Size | Large (n > 30 typical) | Any size (especially n < 30) |
| Distribution Used | Standard normal (Z) | t-distribution (heavier tails) |
| Degrees of Freedom | Not applicable | n - 1 (one-sample) |
| Critical Values | Fixed (e.g., 1.96 for 95%) | Vary with degrees of freedom |
Key Differences
- โThe z-test requires a known population standard deviation; the t-test estimates it from the sample.
- โThe t-distribution has heavier tails than the normal distribution, reflecting greater uncertainty with small samples.
- โAs sample size grows, the t-distribution converges to the standard normal distribution, making results nearly identical.
- โThe t-test introduces degrees of freedom, which control the shape of the distribution and the width of confidence intervals.
When to Use Z-Test
- โYou know the population standard deviation from prior research or census data.
- โYour sample size is large (typically n > 30) and you can rely on the Central Limit Theorem.
- โYou are testing proportions (the z-test for proportions is standard practice).
When to Use T-Test
- โThe population standard deviation is unknown and must be estimated from the sample.
- โYour sample size is small (n < 30) and the population is approximately normal.
- โYou are comparing means of two small independent or paired groups.
Common Confusions
- !Assuming a large sample automatically means you must use a z-test (a t-test is still valid and often preferred when sigma is unknown).
- !Believing the t-test only works for small samples (it works for any sample size).
- !Forgetting that the z-test for proportions is a different application than the z-test for means.
FAQs
Common questions about this comparison
As degrees of freedom increase (roughly above 30), the t-distribution closely approximates the standard normal distribution. In practice, with very large samples the two tests yield nearly identical results.
In most practical situations, yes. The t-test makes fewer assumptions because it does not require a known population standard deviation. With large samples the results will match a z-test closely, so defaulting to the t-test is a common and defensible strategy.