A z-test is a statistical method used to determine whether there is a significant difference between the means of two groups or whether a sample mean significantly differs from a known population mean. It is based on the assumption that the sampling distribution of the sample mean is normally distributed, especially when the sample size is large (typically n≥30).
Key Concepts of the Z-Test
Z-Score:
The z-score measures how many standard deviations an element is from the mean. It is calculated as:
z=σ/nxˉ−μ
Where:
xˉ: Sample mean
μ: Population mean
σ: Population standard deviation
n: Sample size
Assumptions:
The data should be normally distributed, or the sample size should be large enough for the Central Limit Theorem to apply.
The population standard deviation (σ) is known.
Types of Z-Tests
One-Sample Z-Test:
Used to determine whether the mean of a single sample is significantly different from a known population mean.
Hypotheses:
Null hypothesis (H0): The sample mean is equal to the population mean (xˉ=μ).
Alternative hypothesis (Ha: The sample mean is not equal to the population mean (xˉ=μ).
Two-Sample Z-Test:
Used to compare the means of two independent samples.
Hypotheses:
Null hypothesis (H0): The means of the two samples are equal (μ1=μ2).
Alternative hypothesis (Ha): The means of the two samples are not equal (μ1=μ2).
The formula for the z-score in a two-sample z-test is:
z=n1σ12+n2σ22xˉ1−xˉ2
Where:
xˉ1,xˉ2: Sample means
σ1,σ2: Population standard deviations
n1,n2: Sample sizes
Steps to Conduct a Z-Test
State the Hypotheses:
Define the null and alternative hypotheses.
Collect Data:
Gather the necessary sample data.
Calculate the Z-Score:
Use the appropriate formula based on whether it’s a one-sample or two-sample test.
Determine the Critical Value:
Use a z-table (standard normal distribution table) to find the critical z-value based on the desired significance level (α), typically 0.05 for a 95% confidence level.
Make a Decision:
Compare the calculated z-score to the critical z-value:
If ∣z∣>zcritical: Reject the null hypothesis.
If ∣z∣≤zcritical: Fail to reject the null hypothesis.
Example of a One-Sample Z-Test
Scenario:
A factory claims that the average lifespan of its light bulbs is 1000 hours. A quality control manager tests a sample of 40 bulbs and finds an average lifespan of 970 hours with a population standard deviation of 120 hours. Is there enough evidence to reject the factory's claim at the 0.05 significance level?
State the Hypotheses:
H0:μ=1000 (the average lifespan is 1000 hours)
Ha:μ=1000 (the average lifespan is not 1000 hours)
Collect Data:
Sample mean (xˉ=970), population standard deviation (σ=120), sample size (n=40).
Calculate the Z-Score:
z=120/40970−1000=19−30≈−1.58
Determine the Critical Value:
For a two-tailed test at α=0.05, the critical z-values are approximately ±1.96.
Make a Decision:
Since −1.58 is within the range [−1.96,1.96], we fail to reject the null hypothesis. There is not enough evidence to conclude that the average lifespan is different from 1000 hours.
Conclusion
The z-test is a powerful statistical tool for hypothesis testing when the population standard deviation is known and sample sizes are sufficiently large. By following the structured steps of formulating hypotheses, calculating z-scores, and making decisions based on critical values, researchers can effectively test claims and make data-driven conclusions.