The t-test for independent groups

The $t$-test for independent groups is used to verify the hypothesis about the equality of means of an analysed variable in 2 populations.

Basic assumptions:

Hypotheses:

\begin{array}{cc}
\mathcal{H}_0: & \mu_1=\mu_2,\\
\mathcal{H}_1: & \mu_1\ne\mu_2.
\end{array}

where:

$\mu_1$, $\mu_2$ – means of an analysed variable of the 1st and the 2nd population.

The test statistic is defined by: \begin{displaymath}
t=\frac{\displaystyle{\overline{x}_1-\overline{x}_2}}{\displaystyle{\sqrt{\frac{(n_1-1)sd_1^2+(n_2-1)sd_2^2}{n_1+n_2-2}\left(\frac{1}{n_1}+\frac{1}{n_2}\right)}}},
\end{displaymath}

where:

$\overline{x}_1, \overline{x}_2 $ – means of an analysed variable of the 1st and the 2nd sample,

$n_1, n_2 $ – the 1st and the 2nd sample size,

$sd_1^2, sd_2^2 $ – variances of an analysed variable of the 1st and the 2nd sample.

The test statistic has the t-Student distribution with $df=n_1+n_2-2$ degrees of freedom.

The p-value, designated on the basis of the test statistic, is compared with the significance level $\alpha$:

\begin{array}{ccl}
$ if $ p \le \alpha & \Longrightarrow & $ reject $ \mathcal{H}_0 $ and accept $ 	\mathcal{H}_1, \\
$ if $ p > \alpha & \Longrightarrow & $ there is no reason to reject $ \mathcal{H}_0. \\
\end{array}

Note:

\begin{displaymath}
SD_p=\sqrt{\frac{(n_1-1)sd_1^2+(n_2-1)sd_2^2}{n_1+n_2-2}},
\end{displaymath}

\begin{displaymath}
SE_{\overline{x}_1-\overline{x}_2}=\displaystyle{\sqrt{\frac{(n_1-1)sd_1^2+(n_2-1)sd_2^2}{n_1+n_2-2}\left(\frac{1}{n_1}+\frac{1}{n_2}\right)}}.
\end{displaymath}

Standardized effect size.

The Cohen's d determines how much of the variation occurring is the difference between the averages.

\begin{displaymath}
	d=\left|\frac{\overline{x}_1-\overline{x}_2}{SD_p}\right|
\end{displaymath}.

When interpreting an effect, researchers often use general guidelines proposed by Cohen 1) defining small (0.2), medium (0.5) and large (0.8) effect sizes.

The settings window with the t- test for independent groups can be opened in Statistics menu→Parametric testst-test for independent groups or in ''Wizard''.

If, in the window which contains the options related to the variances, you have choosen:

Note

Calculations can be based on raw data or data that are averaged like: arithmetic means, standard deviations and sample sizes.

EXAMPLE (cholesterol.pqs file)

Five hundred subjects each were drawn from a population of women and a population of men over 40 years of age. The study concerned the assessment of cardiovascular disease risk. Among the parameters studied is the value of total cholesterol. The purpose of this study will be to compare men and women as to this value. We want to show that these populations differ on the level of total cholesterol and not only on the level of cholesterol broken down into its fractions.

The distribution of age in both groups is a normal distribution (this was checked with the Lilliefors test). The mean cholesterol value in the male group was $\overline{x}_1=201.1$ and the standard deviation $sd_1=47.6$, in the female group $\overline{x}_2=191.5$ and $sd_2=43.5$ respectively. The Fisher-Snedecor test indicates small but statistically significant ($p=0.0434$) differences in variances. The analysis will use the Student's t-test with Cochran-Cox correction

Hypotheses:

$\begin{array}{cl}
\mathcal{H}_0: & $The average total cholesterol of the female population is different from$\\
&$the average total cholesterol of the male population,$\\
\mathcal{H}_1: & $The average total cholesterol of the female population equals$ \\
&$the average total cholesterol of the male population.$
\end{array}$

Comparing $p=0.0009$ with a significance level $\alpha=0.05$ we find that women and men in Poland have statistically significant differences in total cholesterol values. The average Polish man over the age of 40 has higher total cholesterol than the average Polish woman by almost 10 units.

1)
Cohen J. (1988), Statistical Power Analysis for the Behavioral Sciences, Lawrence Erlbaum Associates, Hillsdale, New Jersey