Let $X$ be a random variable with Poisson distribution of parameter $\lambda= 1$, show that $E\left(\left|X-1\right|\right)=\frac{2}{e}$

751 Views Asked by At

I used the definition of absolute value to say that $$\left|X-1\right|=\begin{cases} X-1,\text{ if }X-1\geq 0\\ 1-X,\text{ if }X-1< 0 \end{cases}$$

So, I concluded that

\begin{align*}E\left(\left|X-1\right|\right)&=E\left(X-1\right)+E\left(1-X\right)\\ &=0\end{align*}

And that is wrong. How should I do it?

2

There are 2 best solutions below

0
On BEST ANSWER

You can use the fact that $E_X[|X-1|] = \sum_{k=0}^\infty |k-1|P(X=k)$. Therefore: $$ E_X[|X-1|] = \sum_{k=0}^\infty |k-1|\cdot \frac{e^{-\lambda}\cdot \lambda^k}{k!} = \sum_{k=0}^\infty |k-1|\cdot \frac{e^{-1}}{k!} = e^{-1} + \sum_{k=1}^\infty(k-1)\frac{e^{-1}}{k!}= $$ $$ = e^{-1} + \sum_{k=1}^\infty k\frac{e^{-1}}{k!}\ - \sum_{k=1}^\infty \frac{e^{-1}}{k!}=$$ $$= e^{-1} + e^{-1}\sum_{k=1}^\infty \frac{1}{(k-1)!}\ - e^{-1}\sum_{k=1}^\infty \frac{1}{k!} = e^{-1}+1-e^{-1}(e - 1) = \frac{2}{e} $$

0
On

Let $Y=|X-1|$. Then, $X=0 \Rightarrow Y=1$ and $X=k \Rightarrow Y=k-1$ if $k=1,2,\dots$. So the distribution of $Y$ is: $$P(Y=k)= \begin{cases} P(Y=k) = P(X=k+1) \qquad \text{ if }k \ne 1 \\ P(Y=1) = P(X=0)+P(X=2) \end{cases} $$

We only have to average: $$ E(Y)=\sum_{k=0}^\infty k P(Y=k)=P(Y=1)+\sum_{k=2}^\infty k P(Y=k) \\ = P(X=0)+P(X=2)+\sum_{k=2}^\infty k P(X=k+1) \\ = P(X=0)+P(X=2)+\sum_{k=3}^\infty (k-1) P(X=k) \\ =P(X=0)+P(X=2)+\sum_{k=3}^\infty k P(X=k)-\sum_{k=3}^\infty P(X=k) \\ =P(X=0)+P(X=2)+\sum_{k=0}^\infty k P(X=k)-P(X=1)-2\,P(X=2)\\ -\sum_{k=0}^\infty P(X=k) +P(X=0)+P(X=1)+P(X=2)\\ =2\,P(X=0)+\lambda-1 $$

All this manipulation was to avoid remembering the probability function of the Poisson distribution :)

Addition: now I notice that if we stop before the last line, the formula would be valid for any distribution with nonnegative integer values: $$ E(|X-1|)=2 P(X=0)+E(X)-1 $$