Statistics
Textbooks
Boundless Statistics
Other Hypothesis Tests
The t-Test
Statistics Textbooks Boundless Statistics Other Hypothesis Tests The t-Test
Statistics Textbooks Boundless Statistics Other Hypothesis Tests
Statistics Textbooks Boundless Statistics
Statistics Textbooks
Statistics
Concept Version 5
Created by Boundless

Calculations for the t-Test: Two Samples

The following is a discussion on explicit expressions that can be used to carry out various t-tests.

Learning Objective

  • Calculate the t value for different types of sample sizes and variances in an independent two-sample t-test


Key Points

    • A two-sample t-test for equal sample sizes and equal variances is only used when both the two sample sizes are equal and it can be assumed that the two distributions have the same variance.
    • A two-sample t-test for unequal sample sizes and equal variances is used only when it can be assumed that the two distributions have the same variance.
    • A two-sample t-test for unequal (or equal) sample sizes and unequal variances (also known as Welch's t-test) is used only when the two population variances are assumed to be different and hence must be estimated separately.

Terms

  • pooled variance

    A method for estimating variance given several different samples taken in different circumstances where the mean may vary between samples but the true variance is assumed to remain the same.

  • degrees of freedom

    any unrestricted variable in a frequency distribution


Full Text

The following is a discussion on explicit expressions that can be used to carry out various t-tests. In each case, the formula for a test statistic that either exactly follows or closely approximates a t-distribution under the null hypothesis is given. Also, the appropriate degrees of freedom are given in each case. Each of these statistics can be used to carry out either a one-tailed test or a two-tailed test.

Once a t-value is determined, a p-value can be found using a table of values from Student's t-distribution. If the calculated p-value is below the threshold chosen for statistical significance (usually the 0.10, the 0.05, or 0.01 level), then the null hypothesis is rejected in favor of the alternative hypothesis.

Independent Two-Sample T-Test

Equal Sample Sizes, Equal Variance

This test is only used when both:

  • the two sample sizes (that is, the number, n, of participants of each group) are equal; and
  • it can be assumed that the two distributions have the same variance.

Violations of these assumptions are discussed below. The t-statistic to test whether the means are different can be calculated as follows:

$t=\frac { { \bar { X } }_{ 1 }-{ \bar { X } }_{ 2 } }{ { S }{ x }_{ 1 }{ x }_{ 2 }\cdot \sqrt { \frac { 2 }{ n } } }$,

where

${ S }{ x }_{ 1 }{ x }_{ 2 }=\sqrt { \frac { 1 }{ 2 } \left( { S }^{ 2 }{ x }_{ 1 }+{ S }^{ 2 }{ x }_{ 2 } \right) }$.

Here, ${ S }{ x }_{ 1 }{ x }_{ 2 }$ is the grand standard deviation (or pooled standard deviation), 1 = group one, 2 = group two. The denominator of t is the standard error of the difference between two means.

For significance testing, the degrees of freedom for this test is 2n − 2 where n is the number of participants in each group.

Unequal Sample Sizes, Equal Variance

This test is used only when it can be assumed that the two distributions have the same variance. The t-statistic to test whether the means are different can be calculated as follows:

$t=\frac { { \bar { X } }_{ 1 }-{ \bar { X } }_{ 2 } }{ { S }{ x }_{ 1 }{ x }_{ 2 }\cdot \sqrt { \frac { 1 }{ { n }_{ 1 } } +\frac { 1 }{ { n }_{ 2 } } } }$,

where .

Pooled Variance

This is the formula for a pooled variance in a two-sample t-test with unequal sample size but equal variances.

${ S }{ x }_{ 1 }{ x }_{ 2 }$ is an estimator of the common standard deviation of the two samples: it is defined in this way so that its square is an unbiased estimator of the common variance whether or not the population means are the same. In these formulae, n = number of participants, 1 = group one, 2 = group two. n − 1 is the number of degrees of freedom for either group, and the total sample size minus two (that is, n1 + n2 − 2) is the total number of degrees of freedom, which is used in significance testing.

Unequal (or Equal) Sample Sizes, Unequal Variances

This test, also known as Welch's t-test, is used only when the two population variances are assumed to be different (the two sample sizes may or may not be equal) and hence must be estimated separately. The t-statistic to test whether the population means are different is calculated as:

$t=\frac { { \bar { X } }_{ 1 }-{ \bar { X } }_{ 2 } }{ { s }_{ { \bar { X } }_{ 1 }-{ \bar { X } }_{ 2 } } }$

where .

Unpooled Variance

This is the formula for a pooled variance in a two-sample t-test with unequal or equal sample sizes but unequal variances.

Here s2 is the unbiased estimator of the variance of the two samples, ni = number of participants in group i, i=1 or 2. Note that in this case ${ { s }_{ { \bar { X } }_{ 1 }-{ \bar { X } }_{ 2 } } }^{ 2 }$ is not a pooled variance. For use in significance testing, the distribution of the test statistic is approximated as an ordinary Student's t-distribution with the degrees of freedom calculated using:

.

Welch–Satterthwaite Equation

This is the formula for calculating the degrees of freedom in Welsh's t-test.

This is known as the Welch–Satterthwaite equation. The true distribution of the test statistic actually depends (slightly) on the two unknown population variances.

[ edit ]
Edit this content
Prev Concept
Calculations for the t-Test: One Sample
Multivariate Testing
Next Concept
Subjects
  • Accounting
  • Algebra
  • Art History
  • Biology
  • Business
  • Calculus
  • Chemistry
  • Communications
  • Economics
  • Finance
  • Management
  • Marketing
  • Microbiology
  • Physics
  • Physiology
  • Political Science
  • Psychology
  • Sociology
  • Statistics
  • U.S. History
  • World History
  • Writing

Except where noted, content and user contributions on this site are licensed under CC BY-SA 4.0 with attribution required.