# How can you determine if a difference between the means of two samples is significant?

Feb 22, 2016

You form a new statistic which is the difference between the two means which allows you to ask significance questions about it.

#### Explanation:

In this question we want to know about the difference of two means. This is a function of random variables, i.e.

${\mu}_{1 - 2} = {\mu}_{1} - {\mu}_{2}$

or, in our case the function is of the sample means:

${m}_{1 - 2} = {m}_{1} - {m}_{2}$

There are many assumptions that go into the next steps (see this link for details Stat Trek: difference between means ) but for now lets assume that the two distributions we are sampling are approximately normal, and that we only have relatively few sampling points for each (otherwise we would be certain of the values of the means and therefore the difference).

Given this, we can calculate the sample variance of the difference of means from the sample variances of the two samples:

${s}_{1 - 2}^{2} = {s}_{1}^{2} / {n}_{1} + {s}_{2}^{2} / {n}_{2}$

Note that what goes into this calculation is the sample variances divided by the number of points, which is the variance of the calculated means and follows the expected form of the central limit theorem (Variance of sample mean ).

Before we ask questions about the new distribution using t-statistics, we need to know the degrees of freedom which can be approximated from (Welch–Satterthwaite equation ):

$D . F . = {\left({s}_{1}^{2} / {n}_{1} + {s}_{2}^{2} / {n}_{2}\right)}^{2} / \left({\left({s}_{1}^{2} / {n}_{1}\right)}^{2} / \left({n}_{1} - 1\right) + {\left({s}_{2}^{2} / {n}_{2}\right)}^{2} / \left({n}_{2} - 1\right)\right)$

This equation allows for a different significance of each point from the two distributions based on their variance and a different number of samples from each. If the distributions have the same variance and we take the same number of samples, $n$, from each, this simplifies to $D . F . = 2 n - 2$

Given all of these, we can use the students-t distribution to ask questions about the probability of the statistic ${m}_{1 - 2}$ taking on specific values using:

$t = \frac{{m}_{1 - 2} - d}{s} _ \left(1 - 2\right)$

Where d is the proposed distance between the two means.