Statistics Dictionary

To see a definition, select a term from the dropdown text box below. The statistics dictionary will display the definition, plus links to related web pages.

Select term:

Two-Sample t-Test

A two-sample t-test is used to test the difference (d0) between two population means. A common application is to determine whether the means are equal.

Here is how to use the test.

  • Define hypotheses. The table below shows three sets of null and alternative hypotheses. Each makes a statement about the difference d between the mean of one population μ1 and the mean of another population μ2. (In the table, the symbol ≠ means " not equal to ".)

    Set Null hypothesis Alternative hypothesis Number of tails
    1 μ1 - μ2 = d μ1 - μ2 ≠ d 2
    2 μ1 - μ2 > d μ1 - μ2 < d 1
    3 μ1 - μ2 < d μ1 - μ2 > d 1


  • Specify significance level. Often, researchers choose significance levels equal to 0.01, 0.05, or 0.10; but any value between 0 and 1 can be used.

  • Find degrees of freedom. The degrees of freedom (DF) is:

    DF = (s12/n1 + s22/n2)2 / { [ (s12 / n1)2 / (n1 - 1) ] + [ (s22 / n2)2 / (n2 - 1) ] }

    If DF does not compute to an integer, round it off to the nearest whole number. Some texts suggest that the degrees of freedom can be approximated by the smaller of n1 - 1 and n2 - 1; but the above formula gives better results.

  • Compute test statistic. The test statistic is a t statistic (t) defined by the following equation.

    t = [ (x1 - x2) - d ] / sqrt[(s12/n1) + (s22/n2)]

    where x1 is the mean of sample 1, x2 is the mean of sample 2, d is the hypothesized difference between population means, s1 is the standard deviation of sample 1, s2 is the standard deviation of sample 2, and n1 is the size of sample 1, and n2 is the size of sample 2.

  • Compute P-value. The P-value is the probability of observing a sample statistic as extreme as the test statistic. Since the test statistic is a t statistic, use the t Distribution Calculator to assess the probability associated with the t statistic, having the degrees of freedom computed above.

  • Evaluate null hypothesis. The evaluation involves comparing the P-value to the significance level , and rejecting the null hypothesis when the P-value is less than the significance level.

The two-sample t-test can be used when the population variances are equal or unequal, and with large or small samples.

See also:   Hypothesis Test for the Difference Between Means