Computing a two-sample Z statistic

1.6k Views Asked by At

I need some help in my statistics class. How to compute Z of the given are two different sample mean, total number of two sample and the population standard deviation. What I know is that in the formula, sample variance is needed. Is the population standard deviation same with sample variance? Or is there any other way to solve this? Thank you for your answers!

1

There are 1 best solutions below

0
On

It seems you are trying to make sense of the so-called two-sample Z test. I will show the formula for $Z$ and how to compute it.

Information about the formula. For that test we have two independent samples from different normal populations $\mathsf{Norm}(\mu_1, \sigma_1)$ and $\mathsf{Norm}(\mu_2, \sigma_2),$ where the population means $\mu_1$ and $\mu_2$ are unknown and their standard deviations $\sigma_1$ and $\sigma_2$ are known.

We want to test the null hypothesis $H_0: \mu_1 = \mu_2$ against the alternative $H_a: \mu_1 \ne \mu_2.$

Data are summarized as sample means $\bar X_1 = \frac{1}{n_1} \sum_{i=1}^{n_1} X_{1i}$ and $\bar X_2 = \frac{1}{n_2} \sum_{i=1}^{n_2} X_{2i}.$

Structure of the formula. The numerator of the test statistic $Z$ is the difference $\bar X_1 - \bar X_2$ of the sample means, which is an estimate of the difference $\mu_1 - \mu_2$ of the population means. And the denominator is the standard deviation of the numerator (sometimes called the 'standard error'). So the $Z\text{-statistic}$ is $$Z = \frac{\bar X_1 - \bar X_2}{\sqrt{\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}}}.$$ This formula may seem impossibly complicated, but it's entirely manageable if we take the numerator and denominator step-by-step as shown in the example below.

You reject the null hypothesis at the 5% level of significance if $|Z|\ge 1.96$ and do not reject if $-1.96 < Z < 1.96.$

Computation of the formula--Numerical Example. For example, suppose we have $n_1 = 10$ observations from the first population with $\bar X_1 = 27.9$ and $\sigma_1 = 3.$ Also, suppose we have $n_2 = 12$ observations from the second population with $\bar X_2 = 23.4$ and $\sigma_2 = 4.$

Then the numerator of $Z$ is $\bar X_1 - \bar X_2 = 27.9 - 23.4 = 4.5.$

The denominator is as follows. Notice that the formula uses population variances $\sigma_1^2 = 9$ and $\sigma_2^2 = 16.$ Above we were given the population standard deviations $\sigma_1 = 3$ and $\sigma_2 = 4,$ so we must square the standard deviations when computing the denominator. $$\sqrt{\frac{9}{10} + \frac{16}{12}} = \sqrt{2.2333} = 1.494.$$

Finally, $Z = 4.5/1.494 = 3.012.$

Conclusion. Because $|Z| = 3.012 \ge 1.96,$ we reject $H_0$ and conclude that the population means differ.