# Mdm of the Poisson distribution

[ilmath]\newcommand{\P}[2][]{\mathbb{P}#1{\left[{#2}\right]} } \newcommand{\Pcond}[3][]{\mathbb{P}#1{\left[{#2}\!\ \middle\vert\!\ {#3}\right]} } \newcommand{\Plcond}[3][]{\Pcond[#1]{#2}{#3} } \newcommand{\Prcond}[3][]{\Pcond[#1]{#2}{#3} }[/ilmath]

TODO: Link with Poisson distribution page

## Statement

Let [ilmath]X\sim[/ilmath][ilmath]\text{Poi} [/ilmath][ilmath](\lambda)[/ilmath] for some [ilmath]\lambda\in\mathbb{R}_{>0} [/ilmath]. [ilmath]X[/ilmath] may take any value in [ilmath]\mathbb{N}_0[/ilmath]

We will show that

I have confirmed this experimentally in Experimental evidence for the Mdm of the Poisson distribution

Recall the Mdm is defined as:

• $\text{Mdm}(X):\eq\mathbb{E}\Big[\ \big\vert X-\mathbb{E}[X]\big\vert\ \Big]$

[ilmath]\newcommand{\LHS}[0]{ {\text{Mdm}(X)} } [/ilmath]

## Calculation

• $\text{Mdm}(X):\eq\mathbb{E}\Big[\ \big\vert X-\mathbb{E}[X]\big\vert\ \Big]$$:\eq\sum^\infty_{k\eq 0}\big\vert X-\mathbb{E}[X]\big\vert\cdot\P{X\eq k}$
$\eq e^{-\lambda}\ \sum^\infty_{k\eq 0}\frac{\lambda^k}{k!}\big\vert k-\mathbb{E}[X]\big\vert$ $\eq e^{-\lambda}\ \sum^\infty_{k\eq 0}\frac{\lambda^k}{k!}\big\vert k-\lambda\big\vert$
• Note that:
1. if [ilmath]k\ge \lambda\ \implies\ k-\lambda\ge 0\ \implies\ \vert k-\lambda\vert \eq k-\lambda[/ilmath]
2. if [ilmath]k\le \lambda\ \implies\ k-\lambda\le 0\ \implies \lambda-k\ge 0\ \implies \vert k-\lambda\vert \eq \lambda-k[/ilmath]
• Define the following two values:
1. [ilmath]u:\eq\text{RoundDownToInt}(\lambda)[/ilmath][Note 1] (also known as the floor function[Note 2] and
2. [ilmath]v:\eq u+1[/ilmath][Note 3]
• This means we have [ilmath]u\le \lambda[/ilmath] and [ilmath]v\ge \lambda[/ilmath], specifically, we have the following two cases:
1. if [ilmath]k\le u[/ilmath] and as [ilmath]u\le \lambda[/ilmath] we see [ilmath]k\le \lambda[/ilmath] and
2. if [ilmath]k> u[/ilmath] then [ilmath]k \ge u+1\eq v \ge\lambda[/ilmath] so [ilmath]k\ge \lambda[/ilmath]
• Now, from above: $\LHS{}\eq e^{-\lambda}\ \sum^\infty_{k\eq 0}\frac{\lambda^k}{k!}\big\vert k-\lambda\big\vert$
$\eq e^{-\lambda}{\left[\frac{\lambda^0}{0!}\big\vert 0-\lambda\vert \ +\ \sum^\infty_{k\eq 1}\frac{\lambda^k}{k!}\big\vert k-\lambda\big\vert\right]}$
$\eq e^{-\lambda}{\left[\lambda\ +\ \sum^u_{k\eq 1}\frac{\lambda^k}{k!}\big\vert k-\lambda\big\vert\ +\ \sum^\infty_{k\eq v}\frac{\lambda^k}{k!}\big\vert k-\lambda\big\vert \right]}$ with the understanding that if [ilmath]u\eq 0[/ilmath] that the sum from [ilmath]k\eq 1[/ilmath] to [ilmath]u[/ilmath] evaluates to [ilmath]0[/ilmath], obviously
• Notice now that:
1. For the first sum, where [ilmath]1\le k\le u[/ilmath] (specifically that [ilmath]k\le u[/ilmath]) we have [ilmath]k\le \lambda[/ilmath]
• and that from further above we noticed if [ilmath]k\le \lambda[/ilmath] then [ilmath]\big\vert k-\lambda\big\vert \eq \lambda-k[/ilmath]
2. For the second sum, where [ilmath]k > u [/ilmath] that this meant [ilmath]k\ge \lambda[/ilmath]
• and that from further above we noticed if [ilmath]k\ge\lambda[/ilmath] then [ilmath]\big\vert k-\lambda\big\vert\eq k-\lambda[/ilmath], so
• $\LHS{}\eq e^{-\lambda}{\left[\lambda\ +\ \sum^u_{k\eq 1}\frac{\lambda^k}{k!}\big\vert k-\lambda\big\vert\ +\ \sum^\infty_{k\eq v}\frac{\lambda^k}{k!}\big\vert k-\lambda\big\vert \right]}$
$\eq e^{-\lambda}{\left[\lambda\ +\ \sum^u_{k\eq 1}\frac{\lambda^k}{k!}(\lambda-k)\ +\ \sum^\infty_{k\eq v}\frac{\lambda^k}{k!}( k-\lambda)\right]}$
• we now expand these sums:
$\eq e^{-\lambda}{\Bigg[\lambda\ +\ \overbrace{\sum^u_{k\eq 1}\frac{\lambda^{k+1} }{k!}\ -\ \sum^u_{k\eq 1}\frac{k\lambda^k}{k!} }^\text{first sum}\ +\ \overbrace{\sum^\infty_{k\eq v}\frac{k\lambda^k}{k!}-\sum^\infty_{k\eq v}\frac{\lambda^{k+1} }{k!} }^\text{second sum}\ \Bigg]}$
$\eq e^{-\lambda}{\left[\lambda\ +\ \lambda{\left(\sum^u_{k\eq 1}\frac{\lambda^k}{k!}\ -\ \sum^\infty_{k\eq v}\frac{\lambda^k}{k!}\right)}\ +\ {\left( \sum^\infty_{k\eq v}\frac{\lambda^k}{(k-1)!}\ -\ \sum^u_{k\eq 1}\frac{\lambda^k}{(k-1)!}\right)}\right]}$, by grouping the terms and factorising where we can
$\eq e^{-\lambda}{\left[\lambda\ +\ \lambda{\left(\sum^u_{k\eq 1}\frac{\lambda^k}{k!}\ -\ \sum^\infty_{k\eq v}\frac{\lambda^k}{k!}\right)}\ +\ {\left( \sum^\infty_{k\eq v-1}\frac{\lambda^{k+1} }{k!}\ -\ \sum^{u-1}_{k\eq 0}\frac{\lambda^{k+1} }{k!}\right)}\right]}$[Note 4] by reindexing the latter two sums
$\eq e^{-\lambda}{\left[\lambda\ +\ \lambda{\left(\sum^u_{k\eq 1}\frac{\lambda^k}{k!}\ -\ \sum^\infty_{k\eq v}\frac{\lambda^k}{k!}\right)}\ +\ \lambda{\left( \sum^\infty_{k\eq v-1}\frac{\lambda^{k} }{k!}\ -\ \sum^{u-1}_{k\eq 0}\frac{\lambda^{k} }{k!}\right)}\right]}$
$\eq \lambda e^{-\lambda}{\left[1\ +\ {\left(\sum^u_{k\eq 1}\frac{\lambda^k}{k!}\ -\ \sum^\infty_{k\eq v}\frac{\lambda^k}{k!}\right)}\ +\ {\left( \sum^\infty_{k\eq v-1}\frac{\lambda^{k} }{k!}\ -\ \sum^{u-1}_{k\eq 0}\frac{\lambda^{k} }{k!}\right)}\right]}$
• For convienence let us assign the sums letters:
• $\eq \lambda e^{-\lambda}{\Bigg[1\ +\ \underbrace{\sum^u_{k\eq 1}\frac{\lambda^k}{k!} }_\text{A}\ -\ \underbrace{\sum^\infty_{k\eq v}\frac{\lambda^k}{k!} }_\text{B}\ +\ \underbrace{\sum^\infty_{k\eq v-1}\frac{\lambda^{k} }{k!} }_\text{C}\ -\ \underbrace{\sum^{u-1}_{k\eq 0}\frac{\lambda^{k} }{k!} }_\text{D} \Bigg]}$
• Now we combine the sums:
• $\LHS{}\eq\lambda e^{-\lambda}{\Bigg[1+\underbrace{\sum^{u-1}_{k\eq 1}\frac{\lambda^k}{k!}+\frac{\lambda^u}{u!} }_\text{A}\ -\ \underbrace{\sum_{k\eq v}^\infty \frac{\lambda^k}{k!} }_\text{B}\ +\ \underbrace{ \frac{\lambda^{v-1} }{(v-1)!}\ +\ \sum^\infty_{k\eq v}\frac{\lambda^k}{k!} }_\text{C}\ -\ \underbrace{ \frac{\lambda^0}{0!}\ -\ \sum^{u-1}_{k\eq 1}\frac{\lambda^k}{k!} }_\text{D} \Bigg]}$
$\eq \lambda e^{-\lambda}{\Bigg[ 1\ -\ \frac{\lambda^0}{0!} \ +\ \frac{\lambda^u }{u!} \ +\ \frac{\lambda^{v-1} }{(v-1)!} \Bigg]}$ - as the sum above in [ilmath]\text{ A }[/ilmath] cancels with the sum part of [ilmath]\text{ D }[/ilmath], and [ilmath]\text{ B }[/ilmath] cancels with the sum part of [ilmath]\text{ C }[/ilmath]
$\eq \lambda e^{-\lambda}{\left[ 1-1+2\frac{\lambda^u}{u!} \right]}$ - using that [ilmath]v-1\eq u[/ilmath] and tidying up
$\eq 2\lambda e^{-\lambda}\frac{\lambda^u}{u!}$
• Thus we see $\text{Mdm}(X)\eq 2\lambda e^{-\lambda}\frac{\lambda^u}{u!}$

## Notes

1. Recall [ilmath]\lambda>0[/ilmath], this means [ilmath]u\ge 0[/ilmath] and thus [ilmath]u\in\mathbb{N}_0[/ilmath]
2. Which is sometimes written:
• TODO: It's [n] but with the bottom or top notches removed from the square brackets?
3. Notice:
• If [ilmath]\lambda[/ilmath] is not [ilmath]\in\mathbb{N}_{\ge 0} [/ilmath] then [ilmath]u+1\eq\text{RoundUpToInt}(\lambda)[/ilmath], so [ilmath]u+1\eq v\ge \lambda[/ilmath]
• If [ilmath]\lambda[/ilmath] is in [ilmath]\mathbb{N}_{\ge 0} [/ilmath] then [ilmath]u\eq\lambda[/ilmath] and [ilmath]v\eq u+1> u\eq \lambda[/ilmath] so [ilmath]v > \lambda[/ilmath]
• Notice [ilmath]\big(v > \lambda\big)\implies\big(v\ge \lambda\big)[/ilmath]
So either way, [ilmath]v\ge \lambda[/ilmath]
4. Note that the third sum should have "[ilmath]\infty-1[/ilmath]" as its upper index, however remember that when a sum is to [ilmath]\infty[/ilmath] this is actually a limit, it was in this case:
• $\lim_{n\rightarrow\infty}\left(\sum^n_{k\eq v}\cdots\right)$
and became
• $\lim_{n\rightarrow\infty}\left(\sum^{n-1}_{k\eq v-1}\cdots\right)$

## References

1. Alec's own work, I actually kept muddling it up on paper so this page IS the reference!