Hypothesis testing with z and t statistics
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 fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources.
This article has been viewed 21,963 times.
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
Steps
Z Test
- 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
- 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.
- If you’re testing a proportion, check out our guide on performing hypothesis testing for a proportion.
T Test
- 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
- 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.
- We cover two-sample t tests in this guide.
Z Test Example
- 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%.
- Set up the hypothesis.
- null hypothesis:
- alternative hypothesis:
- Calculate the sample standard error.
- Calculate the z statistic.
- 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.
T Test Example
- 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%.
- Set up the hypothesis.
- null hypothesis:
- alternative hypothesis:
- Calculate the estimated standard error.
- Calculate the t statistic.
- 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.
Expert Q&A
Tips
- For general tips, see our article on studying for statistics.Thanks
About This Article
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.
- - 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.