Often in biology, we wish to compare the means of two treatments or populations. In many cases, the distributions of values of the two populations overlap to one degree. We can use statistics to determine if those populations are different. A very useful test for such applications is the t-test (sometimes referred to as Student’s t-test after the statistician who developed the test). To introduce this test, let’s compare the heights of men and women in the United States. We can’t measure the height of every adult in the United States so we take a sample of the population and use statistics to allow us to make inferences about the whole population from a sample of that population. The null hypothesis in this case is: women and men in the United States are equally tall, on average. To test the hypothesis, we gather data from 10 men and women, chosen randomly. The heights of men and women overlap broadly although the tallest individuals are men and the shortest are women.

Student developed the t-test to allow us to assign a probability level to describe the likelihood that the null hypothesis is true. The calculation is straightforward, requiring us to calculate both the mean of each population and a measure of the variation of each mean.

Here is the formula for calculating t:

t = (X_{1} – X_{2})/(s_{p})((1/n_{1} + 1/n_{2})^{0.5}

where X_{1 and }X_{2} are the means of the two populations and n_{1} and n_{2} are the sample sizes of each population. Finally, sp is the pooled standard deviation. To calculate this number we first calculate the pooled variance:

s_{p}^{2} = [(n_{1} – 1)s_{1}^{2} + (n_{2} – 1)s _{2}^{2}]/(n_{1} + n _{2} -2)

where n_{1} and n_{2} are the sample sizes of the two groups, and s_{1}^{2} and s_{2}^{2} are the sample variances of the two groups. Take the square root of s_{p}^{2} to calculate s_{2} in the equation for t. For the example above, the calculation of t gives a value of 2.791. Now we can consult a table of critical values of t, analagous to searching for the critical values of the chi-squared test. Here is a portion of a table of critical values of t:

degrees of freedom/probability |
0.10 |
0.05 |
0.01 |
0.001 |

16 | 1.746 | 2.120 | 2.921 | 4.015 |

17 | 1.740 | 2.110 | 2.898 | 3.965 |

18 | 1.734 | 2.101 | 2.878 | 3.922 |

19 | 1.729 | 2.093 | 2.861 | 3.883 |

20 | 1.725 | 2.086 | 2.845 | 3.850 |

The degrees of freedom for our example is 18 (10 samples for women + 10 samples for men – 2). If we scroll across the line for 18 degrees of freedom, we can find that our observed value of t lies between the critical values of 2.101 and 2.878. That means that the probability of finding the differences we saw between the two populations is between 0.05 and 0.01 if there was no difference in height between women and men. Because the p-value for our test is less than 0.05, we reject the null hypothesis of no difference between women’s height and men’s height and infer that men are taller than women. With this statistical test, we are able to make inferences about all humans based on a small sub-sample. That is power!