8.2 Inference for Two Independent Sample Means

Suppose we have two independent samples of quantitative data.  If there is no apparent relationship between the means, our parameter of interest is the difference in means, μ12 with a point estimate of \overline{X}_1}-\overline{X}_2}.

The comparison of two population means is very common. A difference between the two samples depends on both the means and their respective standard deviations. Very different means can occur by chance if there is great variation among the individual samples. In order to account for the variation, we take the difference of the sample means, and divide by the standard error in order to standardize the difference.  We know that when conducting an inference for means, the sampling distribution we use (Z or t) depends on our knowledge of the population standard deviation.

Both Population Standard Deviations Known (Z)

Even though this situation is not likely since the population standard deviations are rarely known, we will begin demonstrating these ideas under the ideal circumstances.  If we know both mean’s sampling distributions are normal, the sampling distribution for the difference between the means is normal and both populations must be normal.  We can combine the standard errors of each sampling distribution to get a standard error of:

\sqrt{\frac{{\left({\sigma }_{1}\right)}^{2}}{{n}_{1}}+\frac{{\left({\sigma }_{2}\right)}^{2}}{{n}_{2}}}

So the sampling distribution of \overline{X}_1}-\overline{X}_2} assuming we know both standard deviations is approximately:

\text{N}\left({\mu }_{1}-{\mu }_{2},\sqrt{\frac{{\left({\sigma }_{1}\right)}^{2}}{{n}_{1}}+\frac{{\left({\sigma }_{2}\right)}^{2}}{{n}_{2}}}\right)

Therefore the Z test statistic would be:

z=\frac{\left({\overline{x}}_{1}-{\overline{x}}_{2}\right)-\left({\mu }_{1}-{\mu }_{2}\right)}{\sqrt{\frac{{\left({\sigma }_{1}\right)}^{2}}{{n}_{1}}+\frac{{\left({\sigma }_{2}\right)}^{2}}{{n}_{2}}}}

Our confidence interval would be of the form:

(PE-MoE, PE+MoE)

Where our point estimate is:

\overline{X}_1}-\overline{X}_2}

And the Margin of error is made up of:

  • MoE=\left({z}_{\frac{\alpha }{2}}\right)\left(SE),
  • {z}_{\frac{\sigma }{2}} is the z critical value with area to the right equal to \frac{\alpha }{2}
  • and SE is \sqrt{\frac{{\left({\sigma }_{1}\right)}^{2}}{{n}_{1}}+\frac{{\left({\sigma }_{2}\right)}^{2}}{{n}_{2}}}

Since we rarely know one population’s standard deviation, much less two, the only situation where we might consider using this in practice is for two very large samples

Both Population Standard Deviations UnKnown (t)

Most likely we will not know the population standard deviations, but we can estimate them using the two sample standard deviations from our independent samples.  In this case we will use a t sampling distribution with standard error:

\sqrt{\frac{\left({s}_{1}{\right)}^{2}}{{n}_{1}}+\frac{\left({s}_{2}{\right)}^{2}}{{n}_{2}}}

Assumptions for the Difference in Two Independent Sample Means

Recall we need to be able to assume an underlying normal distribution and no outliers or skewness in order to use the t distribution.  We can relax these assumptions as our sample sizes get bigger and can typically just use the Z for very large sample sizes.

The remaining question is what do we do for degrees of freedom when comparing two groups?  One method requires a somewhat complicated calculation but if you have access to a computer or calculator this isn’t an issue.  We can find a precise df for two independent samples as follows:

df=\frac{{\left(\frac{{\left({s}_{1}\right)}^{2}}{{n}_{1}}+\frac{{\left({s}_{2}\right)}^{2}}{{n}_{2}}\right)}^{2}}{\left(\frac{1}{{n}_{1}-1}\right){\left(\frac{{\left({s}_{1}\right)}^{2}}{{n}_{1}}\right)}^{2}+\left(\frac{1}{{n}_{2}-1}\right){\left(\frac{{\left({s}_{2}\right)}^{2}}{{n}_{2}}\right)}^{2}}

NOTES: The df are not always a whole number, you usually want to round down.  It is not necessary to compute this by hand. Find a reliable technology to do this.  

If you are working on your own without access to technology, the above formula could be daunting.  Another method is to use a conservative estimate of the df: 
min{n1-1, and n2-1}

Hypothesis Tests for the Difference in Two Independent Sample Means

Recall the steps to a hypothesis test never change.  When our parameter of interest is μ1we are often interested in an effect between the two groups.  In order to show an effect, we will have to first assume there is no difference by stating it in the Null Hypothesis as:

Ho: μ12=0 OR Ho: μ12

Ha: μ12 (<, >, ≠) 0 OR Ho: μ1 (<, >, ≠) μ2

The t test statistic is calculated as follows:

\frac{\text{(}{\overline{x}}_{1}-{\overline{x}}_{2}\text{)}-\text{(}{\mu }_{1}-{\mu }_{2}\text{)}}{\sqrt{\frac{{\text{(}{s}_{1}\text{)}}^{2}}{{n}_{1}}+\frac{{\text{(}{s}_{2}\text{)}}^{2}}{{n}_{2}}}}
where:
  • s1 and s2, the sample standard deviations, are estimates of σ1 and σ2, respectively.
  • {\overline{x}}_{1} and {\overline{x}}_{2} are the sample means. μ1 and μ2 are the population means.  (Note: that in the null we are typically assuming μ12=0)

Confidence Intervals for the Difference in Two Independent Sample Means

Once we have identified we have a difference in a hypothesis test, we may want to estimate it.  Our Confidence Interval would be of the form:

(PE-MoE, PE+MoE)

Where our point estimate is:

\overline{X}_1}-\overline{X}_2}

And the MoE is made up of:

  • MoE=\left({t}_{\frac{\alpha }{2}}\right)\left(SE),
  • {t}_{\frac{\sigma }{2}} is the t critical value with area to the right equal to \frac{\alpha }{2}
  • and SE is \(\sqrt{\frac{\left({s}_{1}{\right)}^{2}}{{n}_{1}}+\frac{\left({s}_{2}{\right)}^{2}}{{n}_{2}}}\)
definition

License

Icon for the Creative Commons Attribution-ShareAlike 4.0 International License

Significant Statistics Copyright © 2020 by John Morgan Russell, OpenStaxCollege, OpenIntro is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book