statable Statistics for study and research

What to do with skewed data and outliers? (robust procedures: trimmed means, Yuen test, winsorizing)

In brief

A trimmed mean drops a fixed share at both ends of the ordered values (usually 20%) and averages the rest. Extreme values hardly disturb it. The Yuen test compares two groups with trimmed means, the robust analysis of variance several. The result stays a difference of means, with an interval.

Robust or rank test?

Robust instead of a rank test fits when the discussion should stay with means (the difference is given in units of the measure, with an interval) but the data are skewed or contain outliers. The rank test compares only the order of the values; it fits when the measure is only ordinal or the distances between values mean nothing.

How it works in Statable

  1. Run the card "Do groups differ?" or "Has something changed?".
  2. Under the result at "Assumption of a normal distribution" choose "Robust (trimmed means)".
  3. Choose the trimming per side (default 20%). Two groups: Yuen test; paired: Yuen test for paired values; three or more groups: robust analysis of variance with pairwise comparisons.

Reading the result

An example

Tooth growth in guinea pigs (ToothGrowth), orange juice against vitamin C, 30 animals each, 20% trimmed: difference of the trimmed means 5.12, t(33.49) = 2.29, p = .029, interval [0.57, 9.68]. Plant growth (PlantGrowth), three groups: F(2, 9.64) = 8.28, p = .008; adjusted by Hochberg, treatment 1 and 2 differ (p = .007).

Winsorizing as a data step

Under "Edit data" there is "Winsorize": values below the lower and above the upper percentile (default 20% and 80%) are set to these limits. The result goes into a new column, the original column stays. Winsorizing appears in the log. It deletes nothing but changes values and must therefore always be reported: percentiles, limit values and the number of changed values.

  1. Page "Data", "Edit data", then at the top in the group "Change values" choose "Winsorizing".
  2. At "Which column?" choose the number column. At "Lower limit (percentile in %)" and "Upper limit (percentile in %)" enter the limits. At "Name of the new column" give a name.
  3. The preview and the "Notes" show how many values change (below and above) and which limits apply. Then press "Winsorizing". "Undo" in the header takes the step back.

How it is calculated

What is often misunderstood

Trimming is not deleting the outliers from the data: it changes what is compared (the trimmed mean, not the ordinary one). The trimming therefore belongs in the report. With very small groups all procedures remain uncertain.

Reporting the result

Report: why a robust method was used (skewed data, outliers), the trimming per side, the method (Yuen test, paired Yuen test or robust analysis of variance with pairwise comparisons by Hochberg), the group sizes, the difference of the trimmed means with t and degrees of freedom (usually not a whole number), p and 95% interval. If winsorizing was done, percentiles, limit values and the number of changed values belong with it. Also: fix the trimming in advance and do not choose it after the result. Method: Yuen 1974, Biometrika 61, 165-170; Wilcox 2022, Introduction to robust estimation and hypothesis testing (5th ed.); implemented as in the R package WRS2 (Mair & Wilcox 2020, Behavior Research Methods 52, 464-488).

Because of [skewed distribution/outliers] the groups were compared with 20% trimmed means (Yuen test; n₁ = …, n₂ = …): difference of the trimmed means = …, t(…) = …, p = …, 95% CI […, …]. With three or more groups: robust analysis of variance, F(…, …) = …, p = …, pairwise comparisons adjusted by Hochberg. Winsorizing was done at the percentiles … and …; … values were changed.

Sources

Wilcox, R. R. (2022). Introduction to robust estimation and hypothesis testing (5th ed.). Academic Press. Yuen, K. K. (1974). The two-sample trimmed t for unequal population variances. Biometrika, 61, 165-170. Mair, P. & Wilcox, R. (2020). Robust statistical methods in R using the WRS2 package. Behavior Research Methods, 52, 464-488.

Related

Open in Statable