Achievable logo
Achievable blue logo on white background

Z-test and t-test

The z-test and t-test are hypothesis tests that compare a sample mean to a claimed value. The z-test applies when the population standard deviation is known or the sample is large; the t-test applies when it is unknown and estimated from a small sample.

The z-test and t-test are the two workhorse procedures for testing hypotheses about a mean. Both compute a standardized test statistic — how many standard errors the sample mean falls from the hypothesized value — and compare it to a critical value to decide whether to reject the null hypothesis. The difference is which distribution supplies that critical value.

The z-test uses the standard normal distribution. It is appropriate when the population standard deviation σ is known, or when the sample is large enough (commonly n ≥ 30) that the sample standard deviation is a reliable stand-in. Its statistic is z = (x̄ − μ₀) / (σ / √n), where x̄ is the sample mean, μ₀ the hypothesized mean, and n the sample size.

The t-test replaces σ with the sample standard deviation s and uses Student's t-distribution with n − 1 degrees of freedom: t = (x̄ − μ₀) / (s / √n). The t-distribution has heavier tails than the normal, which widens the critical values to account for the extra uncertainty of estimating the standard deviation from limited data. As the sample size grows, the t-distribution converges to the normal, and the two tests give nearly identical answers.

Choosing between them is the tested skill: known σ or large n points to z, unknown σ with a small sample points to t. The FE Mechanical exam covers both tests within its probability and statistics section, including reading critical values and interpreting the reject/fail-to-reject decision.

Key takeaways

  • Both tests standardize the gap between a sample mean and a hypothesized mean to make a reject/fail-to-reject decision.
  • Use the z-test when the population standard deviation is known or the sample is large (roughly n ≥ 30).
  • Use the t-test when the standard deviation is estimated from a small sample; it uses n − 1 degrees of freedom.
  • The t-distribution's heavier tails give more conservative critical values, converging to the normal as n grows.
  • The FE Mechanical exam tests selecting the right test and interpreting the result in hypothesis testing problems.
Achievable blue logo on white background

Where you'll learn this

Z-test and t-test is covered in this Achievable course — jump straight to the textbook sections that teach it, or explore the full course with practice questions and exams:

Achievable blue logo on white background