![]() |
VOOZH | about |
Winsorization is the process of replacing the extreme values of statistical data in order to limit the effect of the outliers on the calculations or the results obtained by using that data. The mean value calculated after such replacement of the extreme values is called winsorized mean.
For example, 90% winsorization means the replacement of the top 5% and bottom 5% of the data. The top 5% of the data is replaced by the value of the data at the 95th percentile and the value of the bottom 5% of the data is replaced by the value of the data at the 5th percentile.
Input:
Output:
A numeric array whose values at the upper end and at the lower end are winsorized as defined by the user.
Example #1:
Let us see an example where outliers are present on both the upper end and the lower end of the data.
Output:
Output:
👁 ImageNow, we winsorize the array by 10% i.e. we winsorize 5% of the highest values and 5% of the lowest value of the array:
Output:
Output:
In this case, there is only a slight change in the mean value of the data.
Now, let us see an example where outliers are present only at one end of the data.
Output:
Output:
Output:
Output:
In this case, there is a significant difference in the mean value.