Z-TEST
The z-test is a hypothesis test to determine if a single observed mean is significantly different (or greater or less than) the mean under the null hypothesis, µhypo when you know the standard deviation of the population.
Get Nehra Vikas’s stories in your inbox
Join Medium for free to get updates from this writer.
It’s a statistical check to see if what you observed is meaningfully different from what you expected, using the knowledge of overall variability in the data.
Z-test is the most commonly used statistical tool in research methodology, with it being used for studies where the sample size is large (n>30).
When to use the z test:
- Normal distribution of data
- All data points are independent
- Standard deviation is known
- Sample Size ≥ 30
- Equal sample variance
Standard deviation for sample distribution = Population Standard Deviation / √n
Types of Z Test in Hypothesis Testing:
- Z-test for Means
- Z-test for Proportions
Steps to Perform a Z-Test for Means:
- State the Hypotheses:
- Null Hypothesis (H₀): Assumes there’s no difference between the sample mean and the population mean .
- Alternative Hypothesis (H₁): Suggests that there is a difference (e.g., the sample mean is not equal to, greater than, or less than the population mean).
One-sample z-test is used to compare the sample mean with the population mean. In other words, it checks whether the sample belongs to the given population using Z-statistics.
Two-Sample Z Test for means:
A Two-Sample Z-Test for Means is a statistical method used to compare the averages (means) of two different groups to see if they are significantly different from each other.
Z Test for Proportions
- Single Proportion: When you want to compare the proportion of a particular outcome in a sample to a known population proportion.
- Two Proportions: When you want to compare the proportions of a particular outcome between two independent groups.
- Z-Test for Means: This test compares the average of a sample to a known population mean, or it compares the means of two different samples to determine if they differ significantly.
- Z-Test for Proportions: This test evaluates if a sample proportion differs from a known population proportion, or if the proportions from two different samples are significantly different from each other.









