Welch's t test

From Wikipedia, the free encyclopedia
Jump to: navigation, search


In statistics, Welch's t-test (or Welch-Aspin Test) is a two-sample location test, and is used to check the hypothesis that two populations have equal means. Welch's t-test is an adaptation of Student's t-test, and is intended for use when the two samples have possibly unequal variances.[1] These tests are often referred to as "unpaired" or "independent samples" t-tests, as they are typically applied when the statistical units underlying the two samples being compared are non-overlapping. Welch's t-test is is an approximate solution to the Behrens–Fisher problem. It is sometimes referred to as the "Two-sample unpooled t-test for unequal variances" but "Welch's t-test" is preferred for brevity.

Formulas[edit]

Welch's t-test defines the statistic t by the following formula:


t \quad = \quad {\; \overline{X}_1 - \overline{X}_2 \; \over \sqrt{ \; {s_1^2 \over N_1} \; + \; {s_2^2 \over N_2} \quad }}\,

where \overline{X}_{i}, s_{i}^{2} and N_{i} are the ith sample mean, sample variance and sample size, respectively. Unlike in Student's t-test, the denominator is not based on a pooled variance estimate.

The degrees of freedom \nu  associated with this variance estimate is approximated using the Welch–Satterthwaite equation:


\nu \quad  \approx \quad 
 {{\left( \; {s_1^2 \over N_1} \; + \; {s_2^2 \over N_2} \; \right)^2 } \over
 { \quad {s_1^4 \over N_1^2 \nu_1} \; + \; {s_2^4 \over N_2^2 \nu_2 } \quad }}

Here \nu_i = N_i-1, the degrees of freedom associated with the ith variance estimate.

Statistical test[edit]

Once t and \nu have been computed, these statistics can be used with the t-distribution to test the null hypothesis that the two population means are equal (using a two-tailed test), or the alternative hypothesis that one of the population means is greater than or equal to the other (using a one-tailed test). In particular, the test will yield a p-value which might or might not give evidence sufficient to reject the null hypothesis.

This method also does not give exactly the nominal rate, but is generally not too far off.[citation needed] However, if the population variances are equal, or if the samples are rather small and the population variances can be assumed to be approximately equal, it is more accurate to use Student's t-test.[2]

Software implementations[edit]

As this is a widely used method, there are implementations in common statistical packages.

Language/Program Function Notes
Python scipy.stats.ttest_ind(a, b, axis=0, equal_var=False) See [1]
R t.test(data1,data2,alternative="greater",var.equal=F)

See also[edit]


References[edit]

  1. ^ Welch, B. L. (1947). "The generalization of "Student's" problem when several different population variances are involved". Biometrika 34 (1–2): 28–35. doi:10.1093/biomet/34.1-2.28. MR 19277. 
  2. ^ Daniel Borcard, Lecture Note Appendix: t-test with Welch correction, excerpt from Legendre, P. and D. Borcard. Statistical comparison of univariate tests of homogeneity of variances.
Further reading