Two Sample Z-Test

Comparing two Samples/Populations/Groups/Means/Values

Two-sample Z-Test can be applied when (1) the samples are normally distributed, (2) the standard deviation of the population is known, and (3) the sample is sufficiently large (over 30).

To compare the height of two male populations from the United States and Sweden, a sample of 30 males from each country is randomly selected and the measured heights are provided in Table 3.

Table 3. Height (inches) data for US and Swedish male samples

Currently, the mean and standard deviation for the US and Swedish populations are known as provided in Table 4.

Table 4. US and Sweden Male Population Height Data

Step 1

Hypothesis

Step 2

Method

As the population standard deviation is known, the data is assumed to be normally distributed and the sample size is large enough, the two-sample Z-Test can be applied to analyze the data. The test statistics is calculated as in Equation 3.

Equation 3

MS Excel can be used for performing a two-sample Z-Test.

Step 3

Results

Manual analysis using MS excel is provided in Figure 7

Figure 7. Manual Analysis Results for Two-Sample Z-test Using the Equation in Excel

Statistical Interpretation of the Results

We reject the null hypothesis because the p-value (0.0122) is smaller than the level of significance (0.05). [p-value is the observed probability of the null hypothesis to happen, which is calculated from the sample data using an appropriate method, two-sample Z-Test in this case]

Step 4

Contextual Conclusion

Statistically, US and Swedish male populations are significantly different with respect to the height. [rewrite the accepted hypothesis for an eighth grader without using the statistical jargon such as the p-value, level of significance, etc.]

The next question would be then who is taller or shorter. Both the sample and the population data shows that the Swedish male population is taller than the US male population. However, the alternative hypothesis was written as “Not Equal.” Therefore, to test “the Swedish male population is taller than the US male” or “the US male population is shorter than the Swedish male population,” the hypothesis is written as below.

Now the alternative hypothesis become one-sided. As the one-sided probability is the half of the two-sided probability (p-value), we would still reject the null hypothesis. The new contextual conclusion would be “Statistically, the US male population is significantly shorter than the Swedish male population.” However, making this contextual conclusion for the original “not equal” alternative hypothesis would be wrong………….A common mistake.