When conducting a hypothesis test for two population means with known population standard deviations, the normal distribution and a z test are used instead of the t distribution. This approach applies when the population standard deviations, denoted as σ₁ and σ₂, are known values. Unlike the t-test function in Excel, which can directly compute p-values for two means without known standard deviations, the z-test for two means requires manually calculating the test statistic and then finding the p-value using the standard normal distribution.
Consider a scenario where a manufacturing company wants to determine if machine A produces fewer widgets per batch on average than machine B. Given sample data from 30 batches for each machine, and known population standard deviations σ₁ = 9.73 and σ₂ = 5.91, a hypothesis test at a significance level α = 0.05 can be performed.
The null hypothesis (H₀) states that the two population means are equal: \(H_0: \mu_1 = \mu_2\), where \(\mu_1\) and \(\mu_2\) represent the average widgets produced by machines A and B, respectively. The alternative hypothesis (H₁) reflects the company's concern that machine A produces less: \(H_1: \mu_1 < \mu_2\).
To calculate the z test statistic, first find the sample means \(\bar{x}_1\) and \(\bar{x}_2\) using the average function in Excel. For example, if \(\bar{x}_1 = 42.43\) and \(\bar{x}_2 = 45.97\), the numerator of the z formula is the difference between these means:
\[\bar{x}_1 - \bar{x}_2 = 42.43 - 45.97 = -3.54\]The denominator involves the standard errors of the means, calculated using the known population standard deviations and sample sizes (\(n_1 = n_2 = 30\)):
\[\sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}} = \sqrt{\frac{9.73^2}{30} + \frac{5.91^2}{30}} = \sqrt{3.156 + 1.164} = \sqrt{4.32} \approx 2.08\]Thus, the z score is:
\[z = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}} = \frac{-3.54}{2.08} \approx -1.70\]Since the alternative hypothesis is one-sided (\(\mu_1 < \mu_2\)), the p-value corresponds to the cumulative probability to the left of the z score. Using Excel’s NORM.S.DIST function with the z score and cumulative set to TRUE yields a p-value of approximately 0.044.
Comparing the p-value to the significance level α = 0.05, since 0.044 < 0.05, the null hypothesis is rejected. This provides sufficient evidence to conclude that machine A produces fewer widgets on average per batch than machine B.
This method highlights the importance of correctly identifying when to use a z test versus a t test based on knowledge of population standard deviations. It also demonstrates how breaking down the z test formula into smaller components can reduce calculation errors and improve clarity. Excel functions such as AVERAGE and NORM.S.DIST facilitate efficient computation of sample means and p-values, making hypothesis testing more accessible and accurate.
