Let $X\sim B(n,p)$. How to calculate the expected value $E[\bar{X}]$,where $\bar{X}=|X-E[X]|$?

120 Views Asked by At

Let $X\sim B(n,p)$. How to calculate the the expected value $E[\bar{X}]$,where $\bar{X}=|X-E[X]|$?

Recently I want to prove that \begin{equation} \begin{aligned} f(n)&=\frac1nE[\bar{X}] = \frac1nE[|X-np|]=\frac1n\sum_{i=0}^{n}[C_n^i p^i (1-p)^{n-i}|i - np|] \end{aligned} \end{equation} is decreasing over $\mathbb{Z}^+$, so need to know how to calculate the expected value $E[\bar{X}]$. Of course, I would also really appreciate it if you know how to prove it.


Edited on July 16, 2022

The previous $f(n)$ missed a coefficient of $\frac1n$. After correction, I can already prove that $f(n)$ is decreasing over $\mathbb{Z}^+$.

The left side of the following figure is the image of $E[\bar{X}]$, and the right side is the image of the current $f(n)$.

figure

1

There are 1 best solutions below

0
On BEST ANSWER

Theorem (de Moivre, 1730): If $X\sim \text{Bin}(n,p)$, then $$ \begin{align}E|X-np| &=2\lceil np\rceil(1-p)\cdot P(X=\lceil np\rceil)\\ &=2\lceil np\rceil\binom{n}{\lceil np\rceil}p^{\lceil np \rceil}(1-p)^{n-\lceil np \rceil+1}.\end{align}$$

See https://www.jstor.org/stable/2245429 for a reference, or this stats.stackexchange answer for a proof.