WinsorizedMean
✖
WinsorizedMean

gives the mean of the elements in list after replacing the fraction f of the smallest and largest elements by the remaining extreme values.
gives the mean when the fraction f1 of the smallest elements and the fraction f2 of the largest elements are replaced by the remaining extreme values.
Details

- WinsorizedMean gives a robust estimate of the mean, with more extreme values replaced by less extreme ones.
- The winsorizing fraction is determined by the parameters f1 and f2, which indicate the fraction f1 of the smallest elements and the fraction f2 of the largest elements to be replaced by the remaining extreme values.
- WinsorizedMean[list,{f1,f2}] gives the mean of Clip[list,{z1,z2}] where z1 equals RankedMin[list,1+
], z2 equals RankedMax[list,1+
], and n equals the length of list. »
- WinsorizedMean of a univariate WeightedData data gives the weighted mean of the censored data. »
- WinsorizedMean[{{x1,y1,…},{x2,y2,…},…},f] gives {WinsorizedMean[{x1,x2,…},f],WinsorizedMean[{y1,y2,…},f],…}. »
- WinsorizedMean[dist,{f1,f2}] gives Mean[CensoredDistribution[Quantile[dist,{f1,1-f2}],dist]] for a univariate distribution dist. »

Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Winsorized mean after removing extreme values:

https://wolfram.com/xid/0rkva51lkq6b1p2-cacnen

Winsorized mean after removing the smallest extreme values:

https://wolfram.com/xid/0rkva51lkq6b1p2-clbc5x

Winsorized mean of a list of dates:

https://wolfram.com/xid/0rkva51lkq6b1p2-4gtmue


https://wolfram.com/xid/0rkva51lkq6b1p2-ziof1v

Winsorized mean of a symbolic distribution:

https://wolfram.com/xid/0rkva51lkq6b1p2-b133z2

Scope (11)Survey of the scope of standard use cases
Data (10)
Exact input yields exact output:

https://wolfram.com/xid/0rkva51lkq6b1p2-ug7y2


https://wolfram.com/xid/0rkva51lkq6b1p2-bcry2t

Approximate input yields approximate output:

https://wolfram.com/xid/0rkva51lkq6b1p2-ksx55


https://wolfram.com/xid/0rkva51lkq6b1p2-d02ofx

Winsorized mean of a matrix gives columnwise means:

https://wolfram.com/xid/0rkva51lkq6b1p2-jywoa6

Winsorized mean of a large array:

https://wolfram.com/xid/0rkva51lkq6b1p2-enve04


https://wolfram.com/xid/0rkva51lkq6b1p2-if5yx4

SparseArray data can be used just like dense arrays:

https://wolfram.com/xid/0rkva51lkq6b1p2-2bvdh

https://wolfram.com/xid/0rkva51lkq6b1p2-paeyu

WinsorizedMean of a univariate WeightedData:

https://wolfram.com/xid/0rkva51lkq6b1p2-1jrehm

https://wolfram.com/xid/0rkva51lkq6b1p2-xm2ceq

Compare with the mean of the unweighted data:

https://wolfram.com/xid/0rkva51lkq6b1p2-jcaudl

Winsorized mean of a TimeSeries:

https://wolfram.com/xid/0rkva51lkq6b1p2-tg8p6z

https://wolfram.com/xid/0rkva51lkq6b1p2-ffhpdi

The winsorized mean depends only on the values:

https://wolfram.com/xid/0rkva51lkq6b1p2-fy9fte

Winsorized mean works with data involving quantities:

https://wolfram.com/xid/0rkva51lkq6b1p2-jopin9


https://wolfram.com/xid/0rkva51lkq6b1p2-e8c21s

Compute winsorized mean of dates:

https://wolfram.com/xid/0rkva51lkq6b1p2-b1smxx

https://wolfram.com/xid/0rkva51lkq6b1p2-pa4nmn


https://wolfram.com/xid/0rkva51lkq6b1p2-uok1il

Compute winsorized mean of times:

https://wolfram.com/xid/0rkva51lkq6b1p2-et9bla


https://wolfram.com/xid/0rkva51lkq6b1p2-ztsexm

List of times with different time zone specifications:

https://wolfram.com/xid/0rkva51lkq6b1p2-mrqghz


https://wolfram.com/xid/0rkva51lkq6b1p2-ow7hca


https://wolfram.com/xid/0rkva51lkq6b1p2-qyi2qe

Applications (3)Sample problems that can be solved with this function
Obtain a robust estimate of the location when outliers are present:

https://wolfram.com/xid/0rkva51lkq6b1p2-cexxtn

Extreme values have a large influence on the mean:

https://wolfram.com/xid/0rkva51lkq6b1p2-blrzc0

Simulate a trajectory with heavy-tailed measurement noise:

https://wolfram.com/xid/0rkva51lkq6b1p2-f63fz9
The underlying signal and simulated path with noise:

https://wolfram.com/xid/0rkva51lkq6b1p2-fh1mi1

Smooth the trajectory using a moving WinsorizedMean:

https://wolfram.com/xid/0rkva51lkq6b1p2-l6h0g9

https://wolfram.com/xid/0rkva51lkq6b1p2-brc3ht
Increasing the block size gives a smoother trajectory:

https://wolfram.com/xid/0rkva51lkq6b1p2-bb2lqb

Find a winsorized mean for the heights of children in a class:

https://wolfram.com/xid/0rkva51lkq6b1p2-cevfij

https://wolfram.com/xid/0rkva51lkq6b1p2-fllmtw


https://wolfram.com/xid/0rkva51lkq6b1p2-celepo


https://wolfram.com/xid/0rkva51lkq6b1p2-q53x95

https://wolfram.com/xid/0rkva51lkq6b1p2-fgqfgk


https://wolfram.com/xid/0rkva51lkq6b1p2-cny2bx

Plot the winsorized mean as a function of the fraction parameter:

https://wolfram.com/xid/0rkva51lkq6b1p2-uog0n

https://wolfram.com/xid/0rkva51lkq6b1p2-doz2wp

Properties & Relations (5)Properties of the function, and connections to other functions
A 0% WinsorizedMean is equivalent to Mean:

https://wolfram.com/xid/0rkva51lkq6b1p2-k3hcsh


https://wolfram.com/xid/0rkva51lkq6b1p2-fc96q6

WinsorizedMean approaches Median as f approaches 1/2:

https://wolfram.com/xid/0rkva51lkq6b1p2-dy2d21

https://wolfram.com/xid/0rkva51lkq6b1p2-c30o90


https://wolfram.com/xid/0rkva51lkq6b1p2-ed6bml

WinsorizedMean of a distribution is the mean of its CensoredDistribution:

https://wolfram.com/xid/0rkva51lkq6b1p2-8ys1xn

https://wolfram.com/xid/0rkva51lkq6b1p2-gp2kyl

https://wolfram.com/xid/0rkva51lkq6b1p2-53alj5

Mean of the CensoredDistribution with appropriate bounds:

https://wolfram.com/xid/0rkva51lkq6b1p2-nmlfvu


https://wolfram.com/xid/0rkva51lkq6b1p2-b07aaz


https://wolfram.com/xid/0rkva51lkq6b1p2-ojulil

WinsorizedMean of a sample gives an estimate of the mean of a censored distribution:

https://wolfram.com/xid/0rkva51lkq6b1p2-jcz7or

https://wolfram.com/xid/0rkva51lkq6b1p2-i423fv

https://wolfram.com/xid/0rkva51lkq6b1p2-bo98xv

Mean of the CensoredDistribution with appropriate bounds:

https://wolfram.com/xid/0rkva51lkq6b1p2-mfhhg9


https://wolfram.com/xid/0rkva51lkq6b1p2-bj114x

TrimmedMean drops the data beyond a certain quantile level, then computes the sample mean:

https://wolfram.com/xid/0rkva51lkq6b1p2-cm3s6i

https://wolfram.com/xid/0rkva51lkq6b1p2-nmlm8x

https://wolfram.com/xid/0rkva51lkq6b1p2-dafzaq

WinsorizedMean clips the data beyond a certain quantile level, then computes the sample mean:

https://wolfram.com/xid/0rkva51lkq6b1p2-dsrefj

https://wolfram.com/xid/0rkva51lkq6b1p2-xbwg2

Plot the sorted data against the sample with elements removed and the clipped sample:

https://wolfram.com/xid/0rkva51lkq6b1p2-8mfiah

https://wolfram.com/xid/0rkva51lkq6b1p2-elvj1j

Possible Issues (1)Common pitfalls and unexpected behavior
WinsorizedMean works only with numeric input:

https://wolfram.com/xid/0rkva51lkq6b1p2-g88


Wolfram Research (2017), WinsorizedMean, Wolfram Language function, https://reference.wolfram.com/language/ref/WinsorizedMean.html (updated 2024).
Text
Wolfram Research (2017), WinsorizedMean, Wolfram Language function, https://reference.wolfram.com/language/ref/WinsorizedMean.html (updated 2024).
Wolfram Research (2017), WinsorizedMean, Wolfram Language function, https://reference.wolfram.com/language/ref/WinsorizedMean.html (updated 2024).
CMS
Wolfram Language. 2017. "WinsorizedMean." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/WinsorizedMean.html.
Wolfram Language. 2017. "WinsorizedMean." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/WinsorizedMean.html.
APA
Wolfram Language. (2017). WinsorizedMean. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WinsorizedMean.html
Wolfram Language. (2017). WinsorizedMean. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WinsorizedMean.html
BibTeX
@misc{reference.wolfram_2025_winsorizedmean, author="Wolfram Research", title="{WinsorizedMean}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/WinsorizedMean.html}", note=[Accessed: 07-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_winsorizedmean, organization={Wolfram Research}, title={WinsorizedMean}, year={2024}, url={https://reference.wolfram.com/language/ref/WinsorizedMean.html}, note=[Accessed: 07-June-2025
]}