I have a Binomial random variable $X \sim B(n,p)$. Is there a closed form expression or an upper bound for the variance of the absolute deviation $|X-\mathbb{E}[X]|$ ?


1 Answer 1


Let $\mu_X=E(X)=np$. Call the mean deviation, $E|X-\mu|$, "$m_X$"

$\text{Var}(|X-\mu|) = E(|X-\mu|^2)- (E|X-\mu|)^2 = \text{Var}(X) - m_X^2$.

$\text{Var}(X)$ for a binomial$(n,p)$ is easily obtained to be $np(1-p)$.

$m_X$ for a binomial is given here [1] as:

$2{n\choose {\lfloor np\rfloor+1}}\,(1-p)^{n-\lfloor np\rfloor}\,p^{\lfloor np \rfloor +1}\,(\lfloor np\rfloor +1)$

According to Diaconis and Zabell [2], this result was given by de Moivre; they write it in (essentially) the form

$2v(1-p)\,{n\choose v}p^v(1-p)^{n-v}\,,$

where $v=\lfloor np+1\rfloor$, which is the same result, but in a form that's slightly easier to write and remember.

So it looks like the exact variance is directly available in closed form.

[1] Weisstein, Eric W. "Mean Deviation." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/MeanDeviation.html

[2] Diaconis, P. and Zabell, S. (1991),
"Closed Form Summation for Classical Distributions: Variations on Theme of De Moivre,"
Statistical Science Vol 6, No. 3, 284-302


Your Answer

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

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