diff --git a/doc/source/intro_robuststats.md b/doc/source/intro_robuststats.md index f8e58f3c..e410c5e1 100644 --- a/doc/source/intro_robuststats.md +++ b/doc/source/intro_robuststats.md @@ -30,14 +30,14 @@ used as a robust measure of central tendency. The median is used by default in the alignment routines of {ref}`coregistration` and {ref}`biascorr`. +(robuststats-nmad)= + ### Dispersion The [statistical dispersion](https://en.wikipedia.org/wiki/Statistical_dispersion) represents the spread of a sample, and is core to the analysis of sample precision (see {ref}`intro`). It is typically measured by the [standard deviation](https://en.wikipedia.org/wiki/Standard_deviation). However, very much like the mean, the standard deviation is a measure sensitive to outliers. -(robuststats-nmad)= - The median equivalent of a standard deviation is the normalized median absolute deviation (NMAD), which corresponds to the [median absolute deviation](https://en.wikipedia.org/wiki/Median_absolute_deviation) scaled by a factor of ~1.4826 to match the dispersion of a normal distribution. It has been shown to provide more robust measures of dispersion with outliers when working with DEMs (e.g., [Höhle and Höhle (2009)](https://doi.org/10.1016/j.isprsjprs.2009.02.003)). diff --git a/examples/advanced/plot_standardization.py b/examples/advanced/plot_standardization.py index 34fbe26d..b0128f34 100644 --- a/examples/advanced/plot_standardization.py +++ b/examples/advanced/plot_standardization.py @@ -99,7 +99,7 @@ # %% # We perform a scale-correction for the standardization, to ensure that the spread of the data is exactly 1. -# The NMAD is used as a robust measure for the spread (see :ref:`robuststats-nmad`). +# The NMAD is used as a robust measure for the spread (see :ref:`robuststats-nmad`). print(f"NMAD before scale-correction: {nmad(z_dh.data):.1f}") scale_fac_std = nmad(z_dh.data) z_dh = z_dh / scale_fac_std