T-Test Vs Z-Test In Hypothesis Testing
What is the difference between z-test and t test in hypothesis testing?
Here’s a comparison between T-test and Z-test:
1. A t-test and a z-test are both statistical tests used to compare the means of two groups.
However, there are some key differences between the two.
The t-test is used when the sample size is small (less than 30) or when the population standard deviation is unknown.
It makes use of the t-distribution, which is a probability distribution that is similar to the standard normal distribution (z-distribution) but has heavier tails.
2. The z-test, on the other hand, is used when the sample size is large or when the population standard deviation is known. It makes use of the standard normal distribution (z-distribution).
The test statistic for the t-test is calculated using sample mean, sample standard deviation, and sample size.
On the other hand, the test statistic for the z-test is calculated using population mean, population standard deviation, and sample size.
3. P-values and critical values also differ between the t-test and z-test. `P-value for t-test is calculated from t-distribution table` whereas for z-test it is calculated from z-distribution table. And Critical values also differ accordingly.
In summary, the t-test is more flexible but less powerful than the z-test. When in doubt, it's safer to use a t-test.
That’s it for today’s DS Bit.
👉If you have any questions regarding this post, you can reply to this email and I’ll get back to you as soon as possible.
👉If you’re feeling stuck in your data science learning journey and need advice, get on a call with me by scheduling it below: