HOME

TheInfoList



OR:

Winsorizing or winsorization is the transformation of
statistic A statistic (singular) or sample statistic is any quantity computed from values in a sample which is considered for a statistical purpose. Statistical purposes include estimating a population parameter, describing a sample, or evaluating a hypo ...
s by limiting
extreme value In mathematical analysis, the maxima and minima (the respective plurals of maximum and minimum) of a function, known collectively as extrema (the plural of extremum), are the largest and smallest value of the function, either within a given ran ...
s in the statistical data to reduce the effect of possibly spurious
outliers In statistics, an outlier is a data point that differs significantly from other observations. An outlier may be due to a variability in the measurement, an indication of novel data, or it may be the result of experimental error; the latter are ...
. It is named after the engineer-turned-biostatistician Charles P. Winsor (1895–1951). The effect is the same as
clipping Clipping may refer to: Words * Clipping (morphology), the formation of a new word by shortening it, e.g. "ad" from "advertisement" * Clipping (phonetics), shortening the articulation of a speech sound, usually a vowel * Clipping (publications) ...
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 In statistics, a ''k''-th percentile (percentile score or centile) is a score ''below which'' a given percentage ''k'' of scores in its frequency distribution falls (exclusive definition) or a score ''at or below which'' a given percentage falls ...
of the data; for example, a 90% winsorization would see all data below the 5th percentile set to the 5th percentile, and data above the 95th percentile set to the 95th percentile. Winsorized
estimator In statistics, an estimator is a rule for calculating an estimate of a given quantity based on observed data: thus the rule (the estimator), the quantity of interest (the estimand) and its result (the estimate) are distinguished. For example, the ...
s are usually more
robust Robustness is the property of being strong and healthy in constitution. When it is transposed into a system, it refers to the ability of tolerating perturbations that might affect the system’s functional body. In the same line ''robustness'' ca ...
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: : (N = 20, mean = 101.5) The data below the 5th percentile lies between −40 and −5, while the data above the 95th percentile lies between 101 and 1053 (pertinent values shown in bold); accordingly, a 90% winsorization would result in the following: : (N = 20, mean = 55.65) After winsorization the mean has dropped to nearly half its previous value, and is consequently more in line with the data it represents.
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
can winsorize data using
SciPy SciPy (pronounced "sigh pie") is a free and open-source Python library used for scientific computing and technical computing. SciPy contains modules for optimization, linear algebra, integration, interpolation, special functions, FFT, ...
library : from scipy.stats.mstats import winsorize winsorize( 2, 19, 101, 58, 1053, 91, 26, 78, 10, 13, -40, 101, 86, 85, 15, 89, 89, 28, -5, 41 limits= .05, 0.05 R can winsorize data using the DescTools package: library(DescTools) a<-c(92, 19, 101, 58, 1053, 91, 26, 78, 10, 13, -40, 101, 86, 85, 15, 89, 89, 28, -5, 41) DescTools::Winsorize(a, probs = c(0.05, 0.95))


Distinction from trimming

Note that winsorizing 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 winsorized estimator, the extreme values are instead ''replaced'' by certain percentiles (the trimmed minimum and maximum). Thus a
winsorized mean A winsorized mean is a winsorising, winsorized statistical measure of central tendency, much like the mean and median, and even more similar to the truncated mean. It involves the calculation of the mean after winsorizing -- replacing given part ...
is not the same as a
truncated mean A truncated mean or trimmed mean is a statistical measure of central tendency, much like the mean and median. It involves the calculation of the mean after discarding given parts of a probability distribution or sample at the high and low en ...
. For instance, the 10% trimmed mean is the average of the 5th to 95th percentile of the data, while the 90% winsorized 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: : (N = 18, mean = 56.5) In this case, the winsorized mean can equivalently be expressed as a
weighted average The weighted arithmetic mean is similar to an ordinary arithmetic mean (the most common type of average), except that instead of each of the data points contributing equally to the final average, some data points contribute more than others. The ...
of the truncated mean and the 5th and 95th percentiles (for the 10% winsorized mean, 0.05 times the 5th percentile, 0.9 times the 10% trimmed mean, and 0.05 times the 95th percentile) though in general winsorized statistics need not be expressible in terms of the corresponding trimmed statistic. More formally, they are distinct because the
order statistics In statistics, the ''k''th order statistic of a statistical sample is equal to its ''k''th-smallest value. Together with rank statistics, order statistics are among the most fundamental tools in non-parametric statistics and inference. Impor ...
are not independent.


Uses

Winsorization is a used in the
survey methodology Survey methodology is "the study of survey methods". As a field of applied statistics concentrating on human-research surveys, survey methodology studies the sampling of individual units from a population and associated techniques of survey da ...
context in order to "trim" extreme survey non-response weights. It is also used in the construction of some stock indexes when looking at the range of certain factors (for example growth and value) for particular stocks.MSCI Global Investable Market Value and Growth Index Methodology 2.2.
link
/ref>


See also

*
Trimmed estimator In statistics, a trimmed estimator is an estimator derived from another estimator by excluding some of the extreme values, a process called truncation. This is generally done to obtain a more robust statistic, and the extreme values are considere ...
*
Huber loss Huber is a German surname, German-language surname. It derives from the German word ''Hube'' meaning Hide (unit), hide, a unit of land a farmer might possess, granting them the status of a free tenant. It is in the top ten most common surnames in ...
*
Robust regression In robust statistics, robust regression seeks to overcome some limitations of traditional regression analysis. A regression analysis models the relationship between one or more independent variables and a dependent variable. Standard types of ...


References

* * *


External links

* {{cite web , title=Winsorization , work=R-bloggers , date=June 30, 2011 , url=https://www.r-bloggers.com/winsorization/ Statistical data transformation Robust statistics Articles with example Python (programming language) code Articles with example R code