Show
When it comes to statistical tests, z-test and t-test are two of the most commonly used. But what is the difference between z-test and t-test? And when should you use Z-test vs T-test? In this blog post, we will answer all these questions and more! We will start by explaining the difference between z-test and t-test in terms of their formulas. Then we will go over some examples so that you can see how each test is used in practice. As data scientists, it is important to understand the difference between z-test and t-test so that you can choose the right test for your data. Let’s get started!
Difference between Z-test and T-testZ-test is a statistical hypothesis testing technique which is used to test the null hypothesis in relation to the following given that the population’s standard deviation is known and the data belongs to normal distribution:
Z = (X̄ – µ)/SE = (X̄ – µ)/σ/√n, , where SE is the standard error, X̄ is the sample mean, µ is the population mean, σ is the population standard deviation and the n is the sample size
T-test is a statistical hypothesis technique which is used to test the null hypothesis in relation to the following given the population standard deviation is unknown, data belongs to normal distribution, and the sample size is small (size less than 30)
T = (X̄ – μ) / SE = (X̄ – μ) / S/√n, where SE is the standard error, X̄ is the sample mean, µ is the population mean, S is the sample standard deviation and the n is the sample size. Note the difference between the Z-statistics and T-statistics in one-sample Z-test and one-sample T-test in relation to usage of population standard deviation σ in case of Z-test while sample standard deviation, S in case of T-test.
Other differences between the Z-test and T-test are the following:
When to use Z-test vs T-test?The following is a simplistic diagram which specifies when to use Z-test vs T-test: Note some of the following in the above diagram:
SummaryThe z-test and t-test are different statistical hypothesis tests that help determine whether there is a difference between two population means or proportions. The z-statistic is used to test for the null hypothesis in relation to whether there is a difference between the populations means or proportions given the population standard deviation is known, data belongs to normal distribution, and sample size is larger enough (greater than 30). T-tests are used when the population standard deviation is unknown, the data belongs to normal distribution and the sample size is small (lesser than 30).
I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. For latest updates and blogs, follow us on Twitter. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking Ajitesh KumarI have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. For latest updates and blogs, follow us on Twitter. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking When n ≥ 30 and the population standard deviation is known what is appropriate distribution?If n≥30 n ≥ 30 , use the z-distribution.
When n less than 30 and the population standard deviation is not known what is the appropriate distribution?Also note that if the population standard deviation is known, the sampling distribution will still be a t-distribution if and only if the sample size is less than 30. Otherwise, the distribution is a standard normal distribution or z-distribution.
When the sample size is less than 30 and population standard deviation is known?Z-tests are closely related to t-tests, but t-tests are best performed when the data consists of a small sample size, i.e., less than 30. Also, t-tests assume the standard deviation is unknown, while z-tests assume it is known.
Which distribution will you use when sample size is less than 30?The T-distribution
To compute a confidence interval for a mean when the sample size is less than 30, one should use an appropriate “t-score” instead a Z score.
|