MUniversity of Minnesota OneStop | Directories | Search U of M

Two Sample t-Test


To compare responses from two groups. These two groups can come from different experimental treatments, or different natural "populations".


  • each group is considered to be a sample from a distinct population
  • the responses in each group are independent of those in the other group
  • the distributions of the variable of interest are normal

How It Works

  1. The null hypothesis is that the two population means are equal to each other. To test the null hypothesis, you need to calculate the following values: xs.gif (974 bytes)(the means of the two samples), s12, s22 (the variances of the two samples), n1, n2 (the sample sizes of the two samples), and k (the degrees of freedom).

T-test formula

  1. Compute the t-statistic.

T-test statistic

  1. Compare the calculated t-value, with k degrees of freedom, to the critical t value from the t distribution table at the chosen confidence level and decide whether to accept or reject the null hypothesis.

*Reject the null hypothesis when: calculated t-value > critical t-value

  1. Note: This procedure can be used when the distribution variances from the two populations are not equal, and the sample sizes are not equal.