T Test vs Z Test: When to Use Each Test

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 How.com.vn 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
  1. How.com.vn English: Take a look at these key differences between the z test and t test.
    • 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.
  2. Advertisement
Section 2 of 5:

Z Test

Download Article
  1. How.com.vn English: Step 1 Use the z statistic to carry out hypothesis testing.
    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. How.com.vn English: Step 2 Make a decision.
    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. How.com.vn English: Step 1 Use the t statistic to carry out hypothesis testing.
    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. How.com.vn English: Step 2 Make a decision.
    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. How.com.vn English: Step 1 Check out this example of a z test problem.
    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%.
  2. How.com.vn English: Step 2 Set up the hypothesis.
    • null hypothesis:
    • alternative hypothesis:
  3. How.com.vn English: Step 3 Calculate the sample standard error.
  4. How.com.vn English: Step 4 Calculate the z statistic.
  5. How.com.vn English: Step 5 Find the p-value and interpret the results.
    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.
  6. Advertisement
Section 5 of 5:

T Test Example

Download Article
  1. How.com.vn English: Step 1 Check out this example of a t test problem.
    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%.
  2. How.com.vn English: Step 2 Set up the hypothesis.
    • null hypothesis:
    • alternative hypothesis:
  3. How.com.vn English: Step 3 Calculate the estimated standard error.
  4. How.com.vn English: Step 4 Calculate the t statistic.
  5. How.com.vn English: Step 5 Find the p-value and interpret the results.
    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.
  6. Advertisement

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      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

      How.com.vn English: Grace Imson, MA
      Written by:
      Math Teacher
      This article was written by Grace Imson, MA and by How.com.vn staff writer, Kyle Smith. Grace Imson is a math teacher with over 40 years of teaching experience. Grace is currently a math instructor at the City College of San Francisco and was previously in the Math Department at Saint Louis University. She has taught math at the elementary, middle, high school, and college levels. She has an MA in Education, specializing in Administration and Supervision from Saint Louis University. This article has been viewed 21,963 times.
      1 votes - 80%
      Co-authors: 3
      Updated: March 30, 2023
      Views: 21,963
      Categories: Mathematics
      Thanks to all authors for creating a page that has been read 21,963 times.

      Did this article help you?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement