mad(): Mean Absolute Deviation
mad() measures average distance from a central value using absolute deviations. It is a robust, interpretable summary of spread: small values mean observations cluster closely around the chosen center.
Reading dispersion
Unlike variance, MAD does not square deviations, so extreme observations have less influence. It is useful for data quality checks and comparing consistency. Pair it with mean() or median() according to the intended center.
Use std() for standard deviation, abs() for individual deviations, and size() to ensure a data collection is nonempty. Missing values and units should be handled before analysis.