Comparison
Z-Test vs T-Test: Which Hypothesis Test to Use?
Statistics · Comparison · By DailyTools Editorial Team · July 31, 2026 · 3 min read
Use a z-test when population σ is known or n is large. Use a t-test when σ is estimated from the sample — common in practice.
Statistics
Hypothesis tests for means ask whether sample evidence supports a claimed population mean. The z-test uses the standard normal distribution when population standard deviation σ is known or sample size is large. The t-test uses Student's t-distribution when σ is unknown and estimated by sample standard deviation s — the usual situation in practice. Choosing incorrectly affects p-values and critical regions, especially for small samples.
Quick comparison
Z-test vs t-test
| Factor | Z-test | T-test |
|---|---|---|
| Population σ | Known (or large n approximation) | Unknown — estimated by s |
| Test statistic | z = (x̄ − μ₀) / (σ/√n) | t = (x̄ − μ₀) / (s/√n) |
| Reference distribution | Standard normal Z | Student's t (df = n − 1) |
| Small sample n | Risky unless data nearly normal | Designed for small samples |
| Critical values | Z tables (e.g. ±1.96 at α=0.05) | Wider t critical values — heavier tails |
| Typical use | Large surveys, known process σ | Lab experiments, small samples |
When σ is truly known
Industrial processes with long calibration history may treat σ as known. Then z = (x̄ − μ₀)/(σ/√n) and compare to z critical values. The Z-Test Calculator implements one-sample z-tests under this assumption.
The usual case: estimate σ with s
Most research estimates σ using sample standard deviation s. Extra uncertainty inflates tail probabilities — t-distribution has heavier tails than normal. The T-Test Calculator handles one- and two-sample cases with appropriate degrees of freedom.
Large n convergence
As n grows, t approaches z. Rule of thumb n ≥ 30 often suffices for z approximation when data are not heavily skewed. For n = 5, t critical at 95% is 2.78 vs z = 1.96 — a meaningful difference.
Z-score vs z-test
A z-score standardizes one observation: z = (x − μ)/σ. A z-test uses the sampling distribution of x̄. The Z-Score Calculator standardizes values; hypothesis tests compare test statistics to critical values or compute p-values.
Use cases
- Testing whether a sample mean differs from a specification (t-test if σ unknown)
- Quality control with known process standard deviation (z-test)
- Large poll or A/B test with known population variance estimate (z-test)
- Small psychology or biology experiments (t-test)
- Comparing two group means with unequal sample sizes (two-sample t-test)
- Standardizing exam scores before comparison (z-score, not hypothesis test)
Pros and cons
Z-test
Pros
- Simple standard normal critical values
- Appropriate when σ truly known
- Good large-sample approximation
- Foundation for proportion z-tests
Cons
- Misleading if σ unknown and n small
- Assumes normal sampling distribution of mean
- Rarely justified in exploratory research
T-test
Pros
- Accounts for estimated σ uncertainty
- Appropriate default for small samples
- Heavier tails — conservative with unknown σ
- Extensions for two-sample and paired data
Cons
- Requires t tables or software by df
- Assumes approximate normality (especially small n)
- Converges to z only as n increases
Frequently asked questions
Can I always use t instead of z?
Yes — t is safer when σ is estimated. With known σ and large n, results nearly match.
What is degrees of freedom?
For one-sample t, df = n − 1. More df means t closer to z.
Do I need normality?
Both assume approximate normality of the sample mean. Large n helps by Central Limit Theorem; small n needs roughly normal data.
Is a z-score the same as a z-test?
Related but different. Z-score standardizes one value; z-test uses x̄ and standard error for hypothesis testing.
Explore Statistics module · See our calculation methodology · Editorial policy