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.
z=M−musigmaM{\displaystyle z={\frac {M-mu}{sigma_{M}}}} sigmaM=sigman{\displaystyle sigma_{M}={\frac {sigma}{\sqrt {n}}}} where M{\displaystyle M} is the sample mean mu{\displaystyle mu} is the population mean sigmaM{\displaystyle sigma_{M}} is the sample standard error sigma{\displaystyle sigma} is the population standard deviation n{\displaystyle n} is the sample size
If you’re testing a proportion, check out our guide on performing hypothesis testing for a proportion.
t=M−musM{\displaystyle t={\frac {M-mu}{s_{M}}}} sM=SDn{\displaystyle s_{M}={\frac {SD}{\sqrt {n}}}} where M{\displaystyle M} is the sample mean mu{\displaystyle mu} is the population mean sM{\displaystyle s_{M}} is the estimated standard error SD{\displaystyle SD} is the sample standard deviation n{\displaystyle n} is the sample size
We cover two-sample t tests in this guide.
null hypothesis: M<=mu{\displaystyle M<=mu} alternative hypothesis: M>mu{\displaystyle M>mu} alpha=0. 05{\displaystyle alpha=0. 05}
sigmaM=sigman{\displaystyle sigma_{M}={\frac {sigma}{\sqrt {n}}}} sigmaM=525{\displaystyle sigma_{M}={\frac {5}{\sqrt {25}}}} sigmaM=1{\displaystyle sigma_{M}=1}
z=M−musigmaM{\displaystyle z={\frac {M-mu}{sigma_{M}}}} z=87−851{\displaystyle z={\frac {87-85}{1}}} z=2{\displaystyle z=2}
null hypothesis: M<=mu{\displaystyle M<=mu} alternative hypothesis: M>mu{\displaystyle M>mu} alpha=0. 05{\displaystyle alpha=0. 05}
sM=SDn{\displaystyle s_{M}={\frac {SD}{\sqrt {n}}}} sM=425{\displaystyle s_{M}={\frac {4}{\sqrt {25}}}} sM=0. 8{\displaystyle s_{M}=0. 8}
t=M−musM{\displaystyle t={\frac {M-mu}{s_{M}}}} t=87−790. 8{\displaystyle t={\frac {87-79}{0. 8}}} t=10{\displaystyle t=10}