Comparing the means between two independent groups.

1k Views Asked by At

Assuming that we are dealing with a normal distribution.

I have two different groups and I want to compare the means between this two independent groups.

Group 1 has $ \bar X_1 =2.60$, and I have calculated the Standard deviation from that sample which is $\sigma_1= 0.56$;

Group 2 has $ \bar X_2 =1.30 $, I have calculated the Standard deviation from the sample $\sigma_2= 1.02$;

The sample size for both are $n=12$.

a) Using parametric tests I need to know whether the mean is lower in the second group than in the first group. By $t$-distribution tables I need to know the approximate $p$-value for this.

b) Find $95\%$ CI for the difference in the mean the two groups.


My work:

a) I am not sure how to do that but I think I can use this formula:

\begin{align*} z&= \frac{\mu_1-\mu_2}{\sqrt{\sigma_1^2/n_1+\sigma_2^2/n_2}}\\ &= \frac{2.60-1.30}{\sqrt{\frac{0.56^2}{12}+\frac{1.02^2}{12}}}\\ &=3.9 \end{align*} and then $$P(z>3.9)=1-0.999952=0.0000048,$$ so the $p$-value is $0.0000048$. Because $p <0.001$ there is a strong difference between the two groups.

But I am not really sure.

b) I did:

formula: $$\mu_1-\mu_2 \pm(1.96)\sqrt{\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}}$$

$ \mu_1-\mu_2=2.60-1.30=1.3$

$95\%$CI=$1.3 \pm(1.96)\sqrt{\frac{0.56^2+1.02^2}{12}} =$
$ 1.3\pm (0.65)\to$ that gives the interval $(0.65 ,1.96)$.
So, the confidence interval is $$95\% \text{ CI}=(0.65 ,1.96)$$

Can anyone let me know if I am doing it correctly?

1

There are 1 best solutions below

7
On BEST ANSWER

In the current version of the question, we have sample sizes $n_1 = n_2 = 12,$ sample means $\bar X_1 = 2.60,\, \bar X_2 = 1.30,$ and $known$ population standard deviations $\sigma_1 = 0.56,\, \sigma_2 = 1.02.$

(a) This is an unlikely situation in practice, but perhaps a useful problem on the two-sample z-test. The z-statistic is $$ Z = \frac{\bar X_1 - \bar X_2}{\sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2}} = \frac{1.03}{0.3359} = 3.87.$$ So your numerical computation for the statistic $Z$ is correct.

From what you say, you are testing $H_0: \mu_1 = \mu_2$ against the one-sided alternative $H_a: \mu_1 > \mu_2.$ At the 5% level, we reject $H_0$ in favor of $H_a$ if $Z > 1.645,$ where 1.645 cuts area 5% from the right hand tail of the standard normal curve.

The P-value is the probability $$P(Z > 3.87) = 1 - 0.9999456 = 0.0000544 = 5.441768 \times 10^{-05},$$ from software Within rounding error, this is the same as your result. This indicates that we could reject $H_0$ at a fixed significance level much smaller than 5%.

(b) You seem to want a 95% $two$-side confidence interval for the difference $\mu_1 - \mu_2$ in population means. That computation gives $1.3 \pm 1.96(0.3359)$ or $1.3 \pm 0.66.$ This is the interval $(0.64, 1.96).$ Again, this numerical result is in substantial agreement with your result (although your formula is incorrectly written in terms of population parameters).

[The number 1.96 from normal tables is used because 1.96 cuts probability 2.5% from the upper end of the standard normal distribution and -1.96 cuts 2.5% from the lower end, leaving 95% in the middle.]

$Note:$ Back to (a). In practice a more realistic problem would give sample means and sample standard deviations. (It is a rare practical situation in which population means are unknown, but population standard deviations are known.) Below is Minitab printout for this version of part (a). Estimating SDs would make this a two-sample t test. The version shown does not assume population variances to be equal. It is sometimes called the "separate-variances" or the "Welch" two-sample t test.

 MTB > TwoT 12 2.60 .58 12 1.30 1.02.

 Two-Sample T-Test

 Sample   N   Mean  StDev  SE Mean
 1       12  2.600  0.580     0.17
 2       12   1.30   1.02     0.29

 Difference = mu (1) - mu (2)
 Estimate for difference:  1.300

 T-Test of difference = 0 (vs >): 
    T-Value = 3.84  P-Value = 0.001  DF = 17

[The 'equal variances' or 'pooled' version of the test would have the same T-value (owing to equal sample sizes), but then DF = 22 and a slightly different P-value.]

A Welch 95% CI from a related Minitab procedure is $(0.585, 2.015)$.

Very roughly speaking, the smaller P-value and the longer CI can be regarded as 'penalties' for the having to estimate $\sigma_1$ by the sample SD $S_1$ and $\sigma_2$ by the sample SD $S_2$.