No menu items!

One sample Z test

-

The one sample Z test is used to check whether the mean of a single population is equal to a particular value or not. The null hypothesis for our test is that the population mean is equal to the given value.

For example, suppose that we claim that the mean height of people of a given population is equal to 168cm. We will use the one sample Z test in order to test this hypothesis.

Procedure to carry out the one sample Z test:

  1. Formulate the null hypothesis as H_0: \mu=\mu_0.
  2. Depending on the situation formulate the alternative hypothesis H1 as: \mu\neq \mu_0 \text{ (Two sided alternative hypothesis)} \mu\geq \mu_0 \text{ or }\mu\leq \mu_0 \text{ (One sided alternative hypothesis)}
  3. Decide the level of significance \alpha for the test. We usually take \alpha = 5\%
  4. Calculate the value of the test statistic using the formula, \text{ Test Statistic Z} = \frac{|\bar{x}-\mu_0|}{\sigma/\sqrt{n}}
  5. Find the Z table value – Z_\alpha for one sided test and Z_{\alpha/2} for two sided test.
  6. If the value of the test statistic exceeds the table value we reject the null hypothesis and accept the alternative hypothesis.
  7. If the value of the test statistic is less than the table value we accept the null hypothesis and conclude that the population mean is equal to \mu_0

Example of a one sample Z test:

It is claimed that the mean height of people of a given population is equal to 168cm. If we draw a sample of size 100, the average height of people in the sample is 171cm with a standard deviation of 3cm. Test whether the mean height of the population is greater than 168cm or not at a 5% level of significance.

Solution: We have the null hypothesis H_0: \mu=168 vs alternative hypothesis H_1: \mu\geq 168

Given \bar{x}=171cm , \bar{\mu_0}=168cm, n=100, \sigma=3cm

We calculate the value of the test statistic using the above formula,

\text{ Test Statistic Z} = \frac{|171- 168|}{3/\sqrt{100}} = 10

And, Z table value = Zα = Z0.05 = 1.64 (Since the alternative hypothesis is one sided)

Since the test statistic is greater than the table value we reject the null hypothesis and conclude that the mean height of the population is greater than 168cm.

One sample Z test using software:

  1. We can carry out the one sample Z test in excel using the Z.TEST function in excel.
  2. We can also carry out the Z test in R software by using the z.test command.

Hey 👋

I'm currently pursuing a Ph.D. in Maths. Prior to this, I completed my master's in Maths & bachelors in Statistics.

I created this website for explaining maths and statistics 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

Previous articleTwo Sample Z test
Next articleBinomial Expansion

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent comments