In
statistics, Welch's ''t''-test, or unequal variances ''t''-test, is a two-sample
location test which is used to test the hypothesis that two
populations
Population typically refers to the number of people in a single area, whether it be a city or town, region, country, continent, or the world. Governments typically quantify the size of the resident population within their jurisdiction using a ...
have equal means. It is named for its creator,
Bernard Lewis Welch
Bernard Lewis Welch (1911–29 December 1989) was a British statistician and educator. He is known for creating Welch's t-test.
Biography
Born in 1911 in Sunderland in County Durham, the youngest of four brothers, Welch was educated
at the Bed ...
, is an adaptation of
Student's ''t''-test,
and is more reliable when the two samples have unequal variances and possibly unequal sample sizes.
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. Given that Welch's ''t''-test has been less popular than Student's ''t''-test
[ and may be less familiar to readers, a more informative name is "Welch's unequal variances ''t''-test" — or "unequal variances ''t''-test" for brevity.][
]
Assumptions
Student's ''t''-test assumes that the sample means being compared for two populations are normally distributed, and that the populations have equal variances. Welch's ''t''-test is designed for unequal population variances, but the assumption of normality is maintained.[ Welch's ''t''-test is an approximate solution to the Behrens–Fisher problem.
]
Calculations
Welch's ''t''-test defines the statistic ''t'' by the following formula:
:
:
where and are the sample mean
The sample mean (or "empirical mean") and the sample covariance are statistics computed from a sample of data on one or more random variables.
The sample mean is the average value (or mean value) of a sample of numbers taken from a larger po ...
and its standard error
The standard error (SE) of a statistic (usually an estimate of a parameter) is the standard deviation of its sampling distribution or an estimate of that standard deviation. If the statistic is the sample mean, it is called the standard error ...
, with denoting the corrected sample standard deviation, and sample size
Sample size determination is the act of choosing the number of observations or replicates to include in a statistical sample. The sample size is an important feature of any empirical study in which the goal is to make inferences about a populatio ...
.
Unlike in Student's ''t''-test, the denominator is ''not'' based on a pooled variance estimate.
The degrees of freedom
Degrees of freedom (often abbreviated df or DOF) refers to the number of independent variables or parameters of a thermodynamic system. In various scientific fields, the word "freedom" is used to describe the limits to which physical movement or ...
associated with this variance estimate is approximated using the Welch–Satterthwaite equation
In statistics and uncertainty analysis, the Welch–Satterthwaite equation is used to calculate an approximation to the effective degrees of freedom of a linear combination of independent sample variances, also known as the pooled degrees of free ...
:
:
This expression can be simplified when :
:
Here, is the degrees of freedom associated with the ''i''-th variance estimate.
The statistic is approximately from the ''t''-distribution since we have an approximation of the chi-square distribution. This approximation is better done when both and are larger than 5.[Yates, Moore, and Starnes, The Practice of Statistics, 3rd ed., p. 792. Copyright 2008 by W.H. Freeman and Company, 41 Madison Avenue, New York, NY 10010]
Statistical test
Once ''t'' and '''' have been computed, these statistics can be used with the ''t''-distribution to test one of two possible null hypotheses:
* that the two population means are equal, in which a two-tailed test is applied; or
* that one of the population means is greater than or equal to the other, in which a one-tailed test is applied.
The approximate degrees of freedom are real number
In mathematics, a real number is a number that can be used to measurement, measure a ''continuous'' one-dimensional quantity such as a distance, time, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small var ...
s and used as such in statistics-oriented software, whereas they are rounded down to the nearest integer in spreadsheets.
Advantages and limitations
Welch's ''t''-test is more robust than Student's ''t''-test and maintains type I error rates close to nominal for unequal variances and for unequal sample sizes under normality. Furthermore, the power of Welch's ''t''-test comes close to that of Student's ''t''-test, even when the population variances are equal and sample sizes are balanced.[ Welch's ''t''-test can be generalized to more than 2-samples,] which is more robust than one-way analysis of variance In statistics, one-way analysis of variance (abbreviated one-way ANOVA) is a technique that can be used to compare whether two sample's means are significantly different or not (using the F distribution). This technique can be used only for numeri ...
(ANOVA).
It is ''not recommended'' to pre-test for equal variances and then choose between Student's ''t''-test or Welch's ''t''-test. Rather, Welch's ''t''-test can be applied directly and without any substantial disadvantages to Student's ''t''-test as noted above. Welch's ''t''-test remains robust for skewed distributions and large sample sizes. Reliability decreases for skewed distributions and smaller samples, where one could possibly perform Welch's ''t''-test.
Examples
The following three examples compare Welch's ''t''-test and Student's ''t''-test. Samples are from random normal distributions using the R programming language
R is a programming language for statistical computing and graphics supported by the R Core Team and the R Foundation for Statistical Computing. Created by statisticians Ross Ihaka and Robert Gentleman, R is used among data miners, bioinforma ...
.
For all three examples, the population means were and .
The first example is for unequal but near variances (, ) and equal sample sizes (). Let A1 and A2 denote two random samples:
:
:
The second example is for unequal variances (, ) and unequal sample sizes (, ). The smaller sample has the larger variance:
:
The third example is for unequal variances (, ) and unequal sample sizes (, ). The larger sample has the larger variance:
:
Reference p-values were obtained by simulating the distributions of the ''t'' statistics for the null hypothesis of equal population means (). Results are summarised in the table below, with two-tailed p-values:
Welch's ''t''-test and Student's ''t''-test gave identical results when the two samples have similar variances and sample sizes (Example 1). But note that even if you sample data from populations with identical variances, the sample variances will differ, as will the results of the two t-tests. So with actual data, the two tests will almost always give somewhat different results.
For unequal variances, Student's ''t''-test gave a low p-value when the smaller sample had a larger variance (Example 2) and a high p-value when the larger sample had a larger variance (Example 3). For unequal variances, Welch's ''t''-test gave p-values close to simulated p-values.
Software implementations
See also
* Student's ''t''-test
* ''Z''-test
* Factorial experiment
In statistics, a full factorial experiment is an experiment whose design consists of two or more factors, each with discrete possible values or "levels", and whose experimental units take on all possible combinations of these levels across all ...
* One-way analysis of variance In statistics, one-way analysis of variance (abbreviated one-way ANOVA) is a technique that can be used to compare whether two sample's means are significantly different or not (using the F distribution). This technique can be used only for numeri ...
* Hotelling's two-sample T-squared statistic, a multivariate extension of Welch's ''t''-test
References
{{Reflist, 30em
Statistical approximations
Statistical tests