I was reading "We Don’t Quite Know What We Are Talking About When We Talk About Volatility" by Goldstein and Taleb, and I was trying to quickly verify numerically the relation between mean deviation and standard deviation.

However, I get that 0.8 is the ratio between mean deviation and variance, not mean deviation and standard deviation. See code example below.

Can anybody explain to me what I am doing wrong?

import numpy as np

n = 10000
x = np.random.normal(0, 1, size=[n, 1])
sum(abs(x)) / sum(x ** 2)  # approx 0.8
sum(abs(x)) / sum(x ** 2) ** 0.5  # approx 80

enter image description here


1 Answer 1


There's a small typo,

Mean absolute deviation, with 0 mean = sum(abs(x))/n

Standard deviation, with 0 mean = np.sqrt(sum(x ** 2))/np.sqrt(n)

So when you divide MAD over SD you should use:

sum(abs(x)) / (np.sqrt(n) * np.sqrt(sum(x ** 2)))

which gives 0.8 as expected


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.