For example suppose a person wants to test if both tea & coffee are equally popular in a particular town. Then he can take a sample of size say 500 from the town out of which suppose 280 are tea drinkers. To test the hypothesis, he can use Z-test.
Z-Test's for Different Purposes
There are different types of Z-test each for different purpose. Some of the popular types are outlined below:
z test for single proportion is used to test a hypothesis on a specific value of the population proportion.
Statistically speaking, we test the null hypothesis H0: p = p0 against the alternative hypothesis H1: p >< p0 where p is the population proportion and p0 is a specific value of the population proportion we would like to test for acceptance.
The example on tea drinkers explained above requires this test. In that example, p0 = 0.5. Notice that in this particular example, proportion refers to the proportion of tea drinkers.
z test for difference of proportions is used to test the hypothesis that two populations have the same proportion.
For example suppose one is interested to test if there is any significant difference in the habit of tea drinking between male and female citizens of a town. In such a situation, Z-test for difference of proportions can be applied.
One would have to obtain two independent samples from the town- one from males and the other from females and determine the proportion of tea drinkers in each sample in order to perform this test.
z -test for single mean is used to test a hypothesis on a specific value of the population mean.
Statistically speaking, we test the null hypothesis H0: μ = μ0 against the alternative hypothesis H1: μ >< μ0 where μ is the population mean and μ0 is a specific value of the population that we would like to test for acceptance.
Unlike the t-test for single mean, this test is used if n ≥ 30 and population standard deviation is known.
z test for single variance is used to test a hypothesis on a specific value of the population variance.
Statistically speaking, we test the null hypothesis H0: σ = σ0 against H1: σ >< σ0 where σ is the population mean and σ0 is a specific value of the population variance that we would like to test for acceptance.
In other words, this test enables us to test if the given sample has been drawn from a population with specific variance σ0. Unlike the chi square test for single variance, this test is used if n ≥ 30.
Z-test for testing equality of variance is used to test the hypothesis of equality of two population variances when the sample size of each sample is 30 or larger.
Irrespective of the type of Z-test used it is assumed that the populations from which the samples are drawn are normal.