Recently I've found a formula relating mean average deviation (MAD) SNR to root mean square (RMS) SNR:

$$\text{SNR}_\text{MAD} = \sqrt{\frac{2}{\pi}} \text{SNR}_\text{RMS} $$

which assumes Gaussian statistics. This is for a definition of MAD something like

$$ \text{MovingAverage}[\ |x - \text{MovingAverage}[x]|\ ]$$

for some signal $x$ measured in the time domain. My question is where does the above SNR formula come from? I'm pretty new to signal processing so maybe there's a very basic reference that describes this. Is there some intuition for why MAD SNR is smaller than RMS SNR?


2 Answers 2


The two main measures of scatter in the Gaussian case are the mean absolute deviation:

$$d_n = 1/n\sum |x_i-\overline{x}|$$

and the mean square deviation:

$$s_n = \sqrt{1/n\sum (x_i-\overline{x})^2}$$

If the random Gaussian noise has deviation $\sigma$, $s_n \to \sigma$ and $d_n \to \sqrt{\frac{2}{\pi}}\sigma$. I don't have the exact references right now, you can find them in Robust Statistical Procedures, 1996, P. Huber, or texts by Hampel, or Rousseeuw, on robusts statistics.

The derivation is OK, let us use the zero-mean case: the expected value of the absolute value of the random variable:

$$E ( | x | ) = \int_{- \infty}^{ \infty} | x | p ( x ) d x$$

then you derive:

$$E(|x|) = 2\int_0^{\infty} \frac x {\sigma\sqrt{2\pi}} e^{-\,\frac {x^2} {2\sigma^2} } dx$$


$$E(|x|) = \left[-\,\sigma \sqrt{\frac 2 {\pi}} e^{-\,\frac {x^2} {2\sigma^2} }\right]_0^{\infty} = \sigma \sqrt{\frac 2 {\pi}}$$

But this is for the mean absolute deviation, I am not sure of the equivalence with the Median Absolute Deviation.


First post here, so apologies for any mistake I will no doubt make. I think I would add more to the existing answer by the excellent Laurent Duval, because the original poster used MAD, which usually refers to "median" rather than "mean". Hereafter, I assume the random variable $x$ has a probability distribution $P$ given by: $$P(x) = \frac{1}{\sqrt{2 \pi}\sigma} \exp\left(-\frac{x^2}{2\sigma^2}\right) \quad\quad \text{i.e. Gaussian distribution with 0 mean}$$ Then, the mean absolute deviation (henceforth: $\mu ad$) is related to $\sigma$ by: $$\mu ad = \sqrt{\frac{2}{\pi}}\sigma$$ as Laurent Duval elegantly demonstrated. On the other hand, the median absolute deviation (henceforth: $mad$) is given by: $$mad \approx 0.6744897\dots \; \sigma$$ I now proceed with a demonstration of the above statement, for the highlighted probability distribution. The case for a Gaussian with non-zero mean is trivial after a change of variables. The absolute deviation $\left| x \right|$ has probability distribution: $$ P(\left| x \right|) = \begin{cases} 2 \, P(x), & \text{if $x \geq 0$} \\ 0, & \text{otherwise} \end{cases}$$ By the definition of median, we can write $mad$ as: $$\int_{-\infty}^{mad} P(\left| x \right|) dx = \frac{1}{2}$$ which using the definition of $P(\left| x \right|)$ simplifies to: $$\int_{-\infty}^{mad} P(\left| x \right|) dx = \int_0^{mad} P(\left| x \right|) dx = \frac{2}{\sqrt{2 \, \pi} \, \sigma} \int_0^{mad} \exp\left(-\frac{x^2}{2\sigma^2}\right) = \frac{1}{2}$$ After a change of variables, this simplifies further to: $$\rm{erf}\left(\frac{mad}{\sqrt{2}\sigma}\right)=\frac{1}{2}$$ yielding: $$mad = \sqrt{2} \, \rm{erf}^{-1}\left(\frac{1}{2}\right) \, \sigma$$ (here $\rm{erf}^{-1}$ is the inverse function, not the reciprocal, e.g. $\rm{erf}^{-1}(0) = 0$). As it turns out: $$\rm{erf}^{-1} \left(\frac{1}{2}\right) \approx 0.4769362\dots$$ which concludes our demonstration.

As for the intuition about why $\mu ad$ and $mad$ are smaller than $rms$, I think that $rms$, by squaring the residuals, adds more weight to the tails of the Gaussian, which $\mu ad$ and $mad$ don't. On the other hand, $mad$ is smaller than $\mu ad$ because the latter weights the probability of each value $x$, $P(\left|x\right|)$, by the value itself, which $mad$ does not.

  • $\begingroup$ I love the $\mathrm{\mu ad}$. Coming back later, though I'd suggest roman for this and the mad, maybe using \mathrm $\endgroup$ Commented Oct 25, 2019 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.