Download Article

Hypothesis testing with z and t statistics

Download Article

What is the difference really between z and t tests? The main thing is that t tests are used when you don’t know the population variance! You use the Student’s t distribution instead of the standard normal distribution. This wikiHow article compares the t test to the z test, goes over the formulas for t and z, and walks through a couple examples. We'll cover one-sample z and t tests, comparing their key differences.

Things You Should Know

  • The main difference is that the t test is used when population variance is unknown.
  • Calculate the z statistic using the formula
  • Calculate the t statistic using
Section 1 of 5:

Key Differences

Download Article
    • We don’t know the population variance in t testing, while we do know it in z testing.
    • The z test uses a normal distribution while the t test uses the Student's t distribution.
    • Degrees of freedom are needed in t testing, not in z testing.
    • The z statistic is calculated with the standard error. The t statistic uses the estimated standard error.
    • The z test is used for testing proportions when np > 10 and n(1 - p) > 10. The t test is not used for proportion testing.
  1. Advertisement
Section 2 of 5:

Z Test

Download Article
  1. The z statistic uses a sampling distribution. Then, it turns it into a standard normal distribution. To calculate the z statistic, use this formula:
    • where
      • is the sample mean
      • is the population mean
      • is the sample standard error
      • is the population standard deviation
      • is the sample size
  2. If the calculated z statistic (also called z score ) is greater than the critical z value, you reject the null hypothesis and have significant evidence supporting the alternative hypothesis.
  3. Advertisement
Section 3 of 5:

T Test

Download Article
  1. The t statistic uses a sampling distribution. Then, it turns it into the t distribution. To calculate the t statistic, use this formula:
    • where
      • is the sample mean
      • is the population mean
      • is the estimated standard error
      • is the sample standard deviation
      • is the sample size
  2. If the calculated z statistic is greater than the critical z value, you reject the null hypothesis and have significant evidence supporting the alternative hypothesis.
  3. Advertisement
Section 4 of 5:

Z Test Example

Download Article
  1. Our population of interest is students who have taken College Class 101 with Dr. Professor. We know that all of Dr. Professor’s past students have averaged 85% on the final, with a standard deviation of 5%. Now we’re interested in seeing if Dr. Professor’s most recent class of 25 students has done significantly better than all her previous classes. The average on the final this year was an 87%, with a standard deviation of 4%.
    • null hypothesis:
    • alternative hypothesis:
  2. Using a z table or an online z calculator, you can find that a z statistic of 2 corresponds with a p-value of about 0.02. Because the p-value is smaller than our alpha of 0.05, we have evidence to reject the null hypothesis that the recent class’s improved exam scores are due to chance alone.
  3. Advertisement
Section 5 of 5:

T Test Example

Download Article
  1. This time we’re comparing the final exam grades of Dr. Professor’s most recent class to the average final exam grade of all students in the school. She wants to know if her students scored significantly higher than the average. We don’t know the standard deviation of all the student’s exam scores. Dr. Professor’s class of 25 students averaged 87% with a standard deviation of 4%, and the school-wide average final exam score was 79%.
    • null hypothesis:
    • alternative hypothesis:
  2. Using a t table or an online calculator, you can find that a t statistic of 10, with 24 degrees of freedom, corresponds with a p-value of less than .005, which means we have evidence to reject the null hypothesis that Dr. Professor’s class’s final exam score average is no higher than the school-wide average.
  3. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Tips


      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      Thanks to all authors for creating a page that has been read 22,381 times.

      Did this article help you?

      Advertisement