- Introduced by
- Rand R. Wilcox (extending Yuen's trimmed-mean approach)
- Year
- 1970s–2000s
- Type
- Robust parametric mean comparison
- Family
- Classical statistics
What does it do?
The robust one-sample t-test compares a trimmed population location with a hypothesized value mu_0.
It replaces the ordinary mean with a trimmed mean and uses a Winsorized variance in place of the usual sample variance, while keeping the familiar t-test decision rule. It is intended for continuous data that may be skewed or contain outliers.
The intuition behind the method
The classical one-sample t-test can be strongly affected by a few extreme values, because both the mean and the standard deviation are sensitive to outliers. The robust version removes a fixed proportion of the smallest and largest observations before computing the mean. A common choice is 20% from each tail, and 10% is suggested where only mild contamination is expected. The variance is computed from a Winsorized sample, in which the trimmed observations are replaced by the nearest retained values rather than discarded, so the extremes cannot dominate the spread estimate. The test statistic is referred to a t-distribution as an approximation. This reference is a different target and a different reference distribution from those of the classical test, and its accuracy depends on the amount of trimming and the number of untrimmed observations.
History
Yuen (1974) proposed a two-sample trimmed t-statistic for unequal population variances. The paper compared it with the Welch t-test under normality and under long-tailed distributions, and recommended the trimmed t when the underlying distribution is long-tailed or contaminated with outliers. The one-sample procedure described on this page uses the same trimming and Winsorizing ideas, applied to a single sample.
When to use it
Use the robust one-sample t-test when you want to test a location hypothesis about a single continuous variable and the data contain outliers, are skewed, or come from a heavy-tailed distribution, so that the classical mean-based t-test is a poor fit. It is most relevant for small to moderate samples, where a few extreme values can still move the sample mean noticeably. Do not use it when the data are approximately normal with no outliers, because the classical t-test has more power there. Also avoid it when the trimming proportion is chosen after inspecting the data, since this undermines the nominal Type I error rate. If the question concerns the full-population mean rather than a trimmed location, the classical test or another estimator is the more direct choice.
Limitations and considerations
- The trimmed mean estimates a truncated location of the population, not the full-population mean, so the inferential target differs from the classical one-sample t-test.
- Choosing the trimming proportion requires a justification; the common 20% choice may not match the contamination level of a given dataset.
- Under normal, outlier-free data the procedure is less efficient than the classical t-test, because trimming discards information that the mean would use.
- The t-distribution reference is an approximation. Its accuracy depends on h, so results from heavily trimmed small samples should be interpreted with caution.
- Because it is less widely used than the classical test, reviewers may ask for justification of the trimming proportion and of the reference distribution.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- The trimming proportion is a pre-specified tuning parameter that can be reported and justified, rather than an adjustment made after the data are seen.
- Removing a fixed fraction from each tail limits the influence that a small number of extreme observations can have on the location estimate.
- Winsorizing the trimmed observations for the variance keeps information about spread while preventing the extremes from inflating it.
- The output keeps the familiar structure of a t-test, with a test statistic, a reference t-distribution and a confidence interval, which makes results straightforward to compare with classical analyses.
- A bootstrap confidence interval for the trimmed mean can be used alongside the t-approximation.
Applications
- Testing whether a clinical measurement (e.g., blood pressure reduction) differs from a reference value when patient data contain extreme responders.
- Quality control settings where measured product characteristics are occasionally contaminated by machine faults or recording errors.
- Psychometric research comparing a scale score to a normative value when the score distribution is skewed.
- Environmental monitoring where pollutant concentrations follow heavy-tailed distributions and single-site extreme readings are common.
- Pre-post studies where change scores from a single group are compared to zero but the distribution of change is non-normal.
How it works
How it works
State the null hypothesis that the population trimmed mean equals a specified value mu_0 (often zero or a known reference), versus the two-sided alternative that it does not. A directional one-sided alternative is also possible.
Formula
H_0:\ \mu_t = \mu_0 \quad H_1:\ \mu_t \neq \mu_0
Sort the n observations and remove the lowest g and highest g values, where g equals the floor of the trimming proportion gamma times n. A common choice is gamma = 0.20, removing 20% from each tail. The trimmed mean is computed from the remaining h = n - 2g values. Choose gamma before the data are examined, based on prior knowledge of how much contamination to expect, and not on the observed results.
Formula
\bar{X}_t = \frac{1}{h}\sum_{i=g+1}^{n-g} X_{(i)},\quad h = n - 2g,\quad g = \lfloor \gamma n \rfloorThe variance is not computed from the retained values alone. Instead the sample is Winsorized: each trimmed low value is replaced by the smallest retained value and each trimmed high value by the largest retained value, giving the modified values W_i, with W-bar their mean. The variance formula then uses the deviations of the W_i from W-bar, so spread information from the trimmed tails is kept while their leverage is removed.
Formula
s_w^2 = \frac{1}{n-1}\sum_{i=1}^{n}(W_i - \bar{W})^2The statistic divides the difference between the trimmed mean and mu_0 by a scale term built from the Winsorized standard deviation, with an effective sample size that depends on n and gamma. The reference distribution is a t-distribution with h - 1 degrees of freedom, where h is the number of untrimmed observations. The scale term is an asymptotic approximation to the standard error of the trimmed mean rather than an exact expression. The resulting p-values and intervals are therefore approximate, and their accuracy depends on h and on the shape of the data.
Formula
t_t = \frac{\bar{X}_t - \mu_0}{s_w / (\sqrt{n}\,(1-2\gamma))}Reject H0 if the absolute value of the test statistic exceeds the critical value of the t-distribution at h - 1 degrees of freedom and the chosen significance level. The procedure assumes that the observations are independent and identically distributed and that gamma is fixed in advance. When h is small or the trimming is heavy, check the t-based result against a bootstrap interval for the trimmed mean. Report the trimmed mean, the trimming proportion gamma and the value of h. A confidence interval should be obtained by a method that has been checked for trimmed means, such as the bootstrap described above.
Formula
\text{reject } H_0 \text{ if } |t_t| > t_{\alpha/2,\,h-1}Common pitfalls
- Selecting the trimming proportion after examining the data (data-dredging) invalidates the nominal Type I error rate.
- Confusing the trimmed-mean hypothesis (a truncated location) with the full-population mean hypothesis tested by the classical t-test.
- Using a fixed gamma without checking whether the data contain outliers or heavy tails; without them, the procedure gives up efficiency for little benefit.
- Failing to report the trimming proportion and the resulting number of untrimmed observations h, which makes results difficult to reproduce.
- With small samples, trimming removes a large share of the observations, leaving few values for estimation, so the test can lose power.
Frequently asked questions
How is this different from the Wilcoxon signed-rank test?
The Wilcoxon signed-rank test is a nonparametric test that works with ranks, and under symmetry it addresses the population median. The robust one-sample t-test tests a trimmed mean and refers its statistic to a t-distribution approximation. The trimmed mean and the population median are different location targets, and they coincide only when the distribution is symmetric. For skewed data, the two tests therefore answer different questions.
What trimming proportion should I choose?
A common choice is 20% from each tail (gamma = 0.20). 10% is suggested where prior knowledge indicates only mild outlier contamination. Decide the proportion before the data are analysed, justify it from prior knowledge of the data, and report it together with the resulting number of untrimmed observations h. No validated cut-off is given here for choosing between values.
Does the test work for small samples?
The trimmed approach is intended for small to moderate samples, but trimming removes a fixed share of each tail, so small samples leave few untrimmed observations and a small h. In that case power can fall substantially. No validated minimum value of h is given on this page, so check h against the chosen gamma before planning the test.
Can I combine trimming with bootstrapping?
Bootstrap confidence intervals for the trimmed mean can be used alongside the t-approximation, rather than relying only on the t-distribution reference. Their accuracy depends on the sample size and the shape of the distribution, so check them rather than assume they are better.
When should I stick to the classical one-sample t-test?
When there is good reason to believe the data are approximately normal with no serious outliers, for example from earlier studies or from a normality check on an adequate sample, the classical t-test is more efficient and its target, the full-population mean, is easier to communicate.
Related methods
Sources
Wilcox, R. R. (2012). Introduction to Robust Estimation and Hypothesis Testing (3rd ed.). Academic Press.
ISBN: 978-0123869838Yuen, K. K. (1974). The two-sample trimmed t for unequal population variances. Biometrika, 61(1), 165–170.
Open DOI reference