An outlier is a data point whose distance from the bulk of the observations is statistically unusual.
Outliers stem from multiple root causes, which must be diagnosed before deciding how to treat them.
Measurement errors arise from faulty hardware sensors, network dropouts, or software calculation bugs.
Data entry errors occur when human operators type misplaced decimal points or accidental keystrokes.
Sampling errors happen when observations from an unintended population accidentally contaminate the study sample.
Alternatively, legitimate extreme variability represents genuine real-world events, such as catastrophic weather or financial crashes.
Treating genuine outliers as errors risks stripping the most valuable insights from an analytical investigation.
Outliers exert heavy leverage on parameter estimation, pulling the mean, variance, and regression slopes toward themselves.
For example, in ordinary least squares regression, squared error penalties amplify the influence of distant points.
Standard detection methods include z-scores for bell-shaped data and the interquartile range rule for skewed distributions.
When handling confirmed data entry errors, analysts can correct the recording using original source documentation.
If correction is impossible, erroneous points can be deleted, provided the removal is logged transparently.
For genuine outliers, transformation techniques like logarithms compress wide ranges and reduce their distorting leverage.
Another approach is winsorisation, which caps extreme values at a predetermined percentile like the ninety-ninth percentile.
Outliers should never be removed automatically without understanding why they occurred and assessing their operational impact.