Skip to main content

Module robust

Module robust 

Source
Expand description

Robust / exploratory estimators — location and spread measures that resist outliers, the EDA complement to the mean/variance in super::descriptive. They reuse the descriptive median/quantile kernels (no re-implementation).

Functions§

iqr
Interquartile range Q3 − Q1 (the 0.75 and 0.25 quantiles). None if empty.
median_abs_deviation
Median absolute deviation median(|xᵢ − median(x)|). With scaled = true, multiplied by 1.4826 so it is a consistent estimator of the standard deviation for normal data. None if empty.
trimmed_mean
Trimmed mean: drop a proportion (in [0, 0.5)) of the data from each end and average the rest. proportion = 0 is the ordinary mean. None if empty or proportion is out of range.
winsorized_mean
Winsorized mean: clamp the lowest/highest proportion of the data to the boundary values (rather than dropping them), then average. None if empty or out of range.