<s>
Winsorizing	B-Language
or	O
winsorization	B-Language
is	O
the	O
transformation	O
of	O
statistics	O
by	O
limiting	O
extreme	O
values	O
in	O
the	O
statistical	O
data	O
to	O
reduce	O
the	O
effect	O
of	O
possibly	O
spurious	O
outliers	O
.	O
</s>
<s>
The	O
effect	O
is	O
the	O
same	O
as	O
clipping	B-Algorithm
in	O
signal	O
processing	O
.	O
</s>
<s>
A	O
typical	O
strategy	O
is	O
to	O
set	O
all	O
outliers	O
to	O
a	O
specified	O
percentile	O
of	O
the	O
data	O
;	O
for	O
example	O
,	O
a	O
90%	O
winsorization	B-Language
would	O
see	O
all	O
data	O
below	O
the	O
5th	O
percentile	O
set	O
to	O
the	O
5th	O
percentile	O
,	O
and	O
data	O
above	O
the	O
95th	O
percentile	O
set	O
to	O
the	O
95th	O
percentile	O
.	O
</s>
<s>
The	O
data	O
below	O
the	O
5th	O
percentile	O
lies	O
between	O
−40	O
and	O
−5	O
,	O
while	O
the	O
data	O
above	O
the	O
95th	O
percentile	O
lies	O
between	O
101	O
and	O
1053	O
(	O
pertinent	O
values	O
shown	O
in	O
bold	O
)	O
;	O
accordingly	O
,	O
a	O
90%	O
winsorization	B-Language
would	O
result	O
in	O
the	O
following	O
:	O
</s>
<s>
After	O
winsorization	B-Language
the	O
mean	O
has	O
dropped	O
to	O
nearly	O
half	O
its	O
previous	O
value	O
,	O
and	O
is	O
consequently	O
more	O
in	O
line	O
with	O
the	O
data	O
it	O
represents	O
.	O
</s>
<s>
Python	B-Language
can	O
winsorize	B-Language
data	O
using	O
SciPy	B-Application
library	O
:	O
</s>
<s>
R	B-Language
can	O
winsorize	B-Language
data	O
using	O
the	O
DescTools	O
package	O
:	O
</s>
<s>
Note	O
that	O
winsorizing	B-Language
is	O
not	O
equivalent	O
to	O
simply	O
excluding	O
data	O
,	O
which	O
is	O
a	O
simpler	O
procedure	O
,	O
called	O
trimming	O
or	O
truncation	O
,	O
but	O
is	O
a	O
method	O
of	O
censoring	O
data	O
.	O
</s>
<s>
More	O
formally	O
,	O
they	O
are	O
distinct	O
because	O
the	O
order	B-General_Concept
statistics	I-General_Concept
are	O
not	O
independent	O
.	O
</s>
<s>
Winsorization	B-Language
is	O
a	O
used	O
in	O
the	O
survey	O
methodology	O
context	O
in	O
order	O
to	O
"	O
trim	O
"	O
extreme	O
survey	O
non-response	O
weights	O
.	O
</s>
