Winsorising

From Infogalactic: the planetary knowledge core
(Redirected from Winsorizing)
Jump to: navigation, search

Winsorising or Winsorisation is the transformation of statistics by limiting extreme values in the statistical data to reduce the effect of possibly spurious outliers. It is named after the engineer-turned-biostatistician Charles P. Winsor (1895–1951). The effect is the same as clipping in signal processing.

The distribution of many statistics can be heavily influenced by outliers. A typical strategy is to set all outliers to a specified percentile of the data; for example, a 90% Winsorisation would see all data below the 5th percentile set to the 5th percentile, and data above the 95th percentile set to the 95th percentile. Winsorised estimators are usually more robust to outliers than their more standard forms, although there are alternatives, such as trimming, that will achieve a similar effect.

Example

Consider the data set consisting of:

\{92, 19, \mathbf{101}, 58, \mathbf{1053}, 91, 26, 78, 10, 13, \mathbf{-40}, \mathbf{101}, 86, 85, 15, 89, 89, 28, \mathbf{-5}, 41\} \qquad (N = 20, mean = 101.5)

The 5th percentile lies between −40 and −5, while the 95th percentile lies between 101 and 1053. (Values shown in bold.) Then a 90% Winsorisation would result in the following:

\{92, 19, \mathbf{101}, 58, \mathbf{101}, 91, 26, 78, 10, 13, \mathbf{-5}, \mathbf{101}, 86, 85, 15, 89, 89, 28, \mathbf{-5}, 41\} \qquad (N = 20, mean = 55.65)

Python can winsorise data using NumPy and SciPy libraries :

import scipy.stats
import numpy as np
a = np.array([92, 19, 101, 58, 1053, 91, 26, 78, 10, 13, -40, 101, 86, 85, 15, 89, 89, 28, -5, 41])
scipy.stats.mstats.winsorize(a, limits=0.05)

Distinction from trimming

Note that Winsorising is not equivalent to simply excluding data, which is a simpler procedure, called trimming or truncation, but is a method of censoring data.

In a trimmed estimator, the extreme values are discarded; in a Winsorised estimator, the extreme values are instead replaced by certain percentiles (the trimmed minimum and maximum).

Thus a Winsorised mean is not the same as a truncated mean. For instance, the 10% trimmed mean is the average of the 5th to 95th percentile of the data, while the 90% Winsorised mean sets the bottom 5% to the 5th percentile, the top 5% to the 95th percentile, and then averages the data. In the previous example the trimmed mean would be obtained from the smaller set:

\{92, 19, \mathbf{101}, 58, \quad 91, 26, 78, 10, 13, \quad \mathbf{101}, 86, 85, 15, 89, 89, 28, \mathbf{-5}, 41\} \qquad (N = 18, mean = 56.5)

More formally, they are distinct because the order statistics are not independent.

References

  • Hasings, C., Mosteller, F., Tukey, J. W., Winsor, C.P. (1947) Low moments for small samples: a comparative study of order statistics, Annals of Mathematical Statistics, 18, 413–426.
  • W. J. Dixon (1960). Simplified Estimation from Censored Normal Samples, The Annals of Mathematical Statistics, 31, 385–391.
  • J. W. Tukey (1962) The Future of Data Analysis, The Annals of Mathematical Statistics, 33, p. 18


<templatestyles src="Asbox/styles.css"></templatestyles>