No menu items!

One Sample Test (T and Z test)


The one sample test is used to test the equality of mean by using the normal distribution (Z test) in case of large samples and by using the T distribution (T test) in case of small samples. Other than the fact that the distribution used to calculate the critical value is different, the procedure for both of these tests is the same.

Procedure to carry out the single sample test for testing equality of means:

  • Formulate the null hypothesis as H0:µ=µ0 vs the alternative hypothesis H1: µ≠µ0(two sided) or µ<µ0/µ>µ0(one sided).
  • Decide whether the sample size is large (more than 30) or small(less than 30).
  • Calculate the value of the test statistic using the formula,

Test statistic= (x̄- µ0)/(s/√n) where,

x̄ is the sample mean, µ0 is the assumed mean value, s is the standard deviation and n is the sample size.

  • In case the sample size is small, use the t table to find the table value for n-1 degrees of freedom and given level of significance.
  • In case the sample is large, use the Z table to find the critical Z value at 5% level of significance.
  • Compare the test statistic and table values. Accept the null hypothesis if the test statistic is lesser than the table value, otherwise reject the null hypothesis.


The mean height obtained from a random sample of size 100 is 64 inches and standard deviation for the sample is 3 inches. Test the hypothesis that mean height of the population is 67 inches at 5% level of significance.

Solution: We formulate the null hypothesis as H0:µ=67 vs the alternative hypothesis H1: µ≠67.

Here n=100 and since the sample size greater the 30, the sample size is large and hence we apply the Z test.

Now the test statistic is Z= (x̄- µ0)/(s/√n)=  64-67/0.3.

So absolute value of test statistic Z= 10

The critical Z value for two sided test at 5% level of significance = 1.96

Since test statistic exceeds critical value we reject the null hypothesis and conclude that the heioght of the population is not 67 inches.

Hey 👋

I have always been passionate about statistics and mathematics education.

I created this website to explain mathematical and statistical concepts in the simplest possible manner.

If you've found value from reading my content, feel free to support me in even the smallest way you can.

Share this article

Recent posts

Popular categories

Recent comments