Key Takeaways
- Tests mean difference using known population standard deviation.
- Requires large sample size, typically 30 or more.
- Compares sample mean to population or two population means.
- Use t-test if population standard deviation is unknown.
What is Z-Test?
A Z-test is a statistical hypothesis test used to determine if there is a significant difference between a sample mean and a known population mean or between two population means. It calculates a Z-score based on the standard normal distribution under the null hypothesis, relying on known population variance and large sample sizes.
This test is fundamental in data analytics for making inferences about populations from sample data.
Key Characteristics
The Z-test has specific conditions and features that distinguish it from other hypothesis tests:
- Known population standard deviation: Unlike the t-test, the Z-test requires the population variance to be known.
- Large sample size: Typically, the sample size should be 30 or more to satisfy the Central Limit Theorem.
- Normal distribution assumption: Data should be approximately normally distributed, though large samples reduce this requirement.
- Types of tests: Includes one-sample, two-sample, and tests for proportions.
- Uses p-value: Results are often interpreted using a p-value to decide on rejecting the null hypothesis.
How It Works
The Z-test calculates a standardized Z-statistic by subtracting the population mean from the sample mean and dividing by the standard error, which accounts for known population variance and sample size. This Z-score is then compared against critical values from the standard normal distribution to assess significance.
You begin by stating the null and alternative hypotheses, choosing a significance level (commonly 0.05), and computing the Z-statistic. If the absolute Z exceeds the critical value or the associated p-value is below the threshold, you reject the null hypothesis.
Examples and Use Cases
Z-tests are widely applicable across industries for validating hypotheses about population parameters:
- Airlines: Companies like Delta might use Z-tests to compare average customer satisfaction scores before and after a service change.
- Stock analysis: Investors researching large-cap stocks can apply Z-tests to evaluate differences in average returns across sectors.
- Market research: When assessing proportions, such as customer preference rates, a Z-test for proportions can determine if observed differences are statistically significant.
Important Considerations
While the Z-test is powerful for large samples with known variance, it is not appropriate for small sample sizes or unknown population standard deviation—situations where the t-test is preferred. Additionally, independence of observations and random sampling are critical assumptions.
For beginners exploring statistical tests, you may find our guide on best ETFs for beginners useful for understanding data-driven investment decisions informed by hypothesis testing.
Final Words
Z-tests provide a precise way to compare sample means when population variance is known and samples are large. Next, apply a Z-test to your data only if these conditions hold; otherwise, consider alternative methods like the t-test.
Frequently Asked Questions
A Z-test is a statistical method used to determine if there is a significant difference between a sample mean and a known population mean or between two population means, based on the standard normal distribution.
Use a Z-test when the population standard deviation is known and the sample size is large (typically 30 or more). If the population standard deviation is unknown or the sample size is small, a T-test is more appropriate.
The main types of Z-tests include the one-sample Z-test to compare a sample mean to a population mean, the two-sample Z-test to compare means from two populations, and the Z-test for proportions to compare sample proportions with population proportions.
Key assumptions include knowing the population standard deviation, having a sufficiently large sample size (usually 30 or more), random and independent sampling, and approximately normal data distribution or large enough samples to apply the Central Limit Theorem.
The Z-statistic is calculated by subtracting the population mean from the sample mean, then dividing by the population standard deviation divided by the square root of the sample size: Z = (x̄ - μ) / (σ / √n).
First, state your null and alternative hypotheses. Next, choose a significance level (like 0.05), compute the Z-statistic, find the critical value or p-value from Z-tables, and finally decide to reject or fail to reject the null hypothesis based on these values.
Yes, the Z-test for proportions compares a sample proportion to a known population proportion or between two sample proportions to see if there is a significant difference.

