Let X be a Poisson random variable with mean m. In this paper, we study absolute central moments \(\mathbf{E} |X-a|^r\) about a for naturals r. Explicit representations for such moments may be useful in situations where we want to test whether observations in a large sample are independent Poisson with given means, which is the case, for instance, for some image reconstruction techniques in emission tomography (e.g., see [1, 4]).

An explicit representation for the mean deviation was obtained independently in [3, 7]:

$$\begin{aligned} \mathbf{E}|X-m|=2e^{-m}\frac{m^{\lfloor m \rfloor +1}}{\lfloor m \rfloor !}, \end{aligned}$$

where \(\lfloor \cdot \rfloor\) denotes the floor function.

Kendall ([6], relations (5.21) and (5.22) on p. 121) has showed that for all integers \(r\ge 2\),

$$\begin{aligned} \mathbf{E}(X-m)^r&= m \sum _{k=0}^{r-2} {r-1 \atopwithdelims ()k} \mathbf{E}(X-m)^k, \end{aligned}$$
(1)
$$\begin{aligned} \mathbf{E}(X-m)^{r+1}&= rm \mathbf{E}(X-m)^{r-1} + m\frac{{\rm d}}{{\rm d}m} \mathbf{E}(X-m)^{r}. \end{aligned}$$
(2)

Denote by \(_1\! F_1\) the confluent hypergeometric function of the first kind

$$\begin{aligned} _1\! F_1(\alpha ,\beta ,z)=\sum _{n=0}^\infty \frac{z^n}{n!} \prod _{j=0}^{n-1}\frac{ \alpha + j }{\beta + j}, \end{aligned}$$

where \(\prod _{j=0}^{-1} =1\). Katti [5] has derived the following representation for absolute central moments of X about a for all odd \(r\ge 1\):

$$\begin{aligned} \mathbf{E}|X-a|^r= - \mathbf{E}(X-a)^r + \frac{e^{-m}m^{\lfloor a \rfloor +1}}{ (\lfloor a \rfloor +1)! } G^{(r)}(0,0), \end{aligned}$$
(3)

where

$$\begin{aligned} G(\beta ,t)=\exp \{ t(\lfloor a \rfloor - a+\beta +1)\} \ _1\! F_1(\beta +1, \beta +\lfloor a \rfloor +2,m e^t), \end{aligned}$$

\(G^{(r)}(\beta ,t)\) is its r-th partial derivative with respect to t, which, for \(t=0\), can be computed by the recurrence formula

$$\begin{aligned} G^{(s+1)}(\beta ,0)&= (\lfloor a \rfloor - a+\beta +1) G^{(s)}(\beta , 0) +\frac{m(\beta +1)}{ \beta + \lfloor a \rfloor +2} G^{(s)}(\beta +1,0) \end{aligned}$$

for \(s= 1,2,\ldots\), where

$$\begin{aligned} G^{(0)}(\beta ,0):=G(\beta ,0)= {}_1\! F_1(\beta +1, \beta +\lfloor a \rfloor +2,m ) . \end{aligned}$$

The main goal of this paper is to suggest a simpler recurrence formula for absolute central moments of X about a.

Define the sign function

$$\begin{aligned} \mathrm{sign} (y)= {\left\{ \begin{array}{ll} -1 &\quad \text{ if } y\le 0, \\ 1 &\quad \text{ if } y>0 \end{array}\right. } \end{aligned}$$

and put

$$\begin{aligned} F(b):&= \mathbf{P} (X\le b),\\ C(r,a):&= \mathbf{E} (X-a)^r,\\ D(r,a,b):&= \mathbf{E} (X-a)^r \mathrm{sign} (X-b),\\ B(r,a,f):&= \mathbf{E} (X-a)^r f (X),\\ \end{aligned}$$

where \(0^0=1\) by definition, f is a real-valued function. Here, F(b) is the cumulative distribution function of X, and C(ra) is the r-th central moment about a. The above definition of the sign function is not common for \(y=0\), but is chosen here for the sake of convenience, to provide the equality

$$\begin{aligned} D(0,a,b)=1-2F(b). \end{aligned}$$
(4)

We have

$$\begin{aligned} \mathbf{E} |X-a|^r= {\left\{ \begin{array}{ll} C(r,a) &\quad \text{ if } r \text{ is } \text{ even, } \\ D(r,a,a) &\quad \text{ if } r \text{ is } \text{ odd } . \end{array}\right. } \end{aligned}$$
FormalPara Theorem 1

For all integers \(r\ge 1\) , reals \(b\ge 0\) and a , and functions f such that

\(\mathbf{E}X^r |f(X)|<\infty\) , the following recurrence relations are valid:

$$\begin{aligned} C(r,a)&= (m-a) C(r-1,a) + m \sum _{k=0}^{r-2} {r-1 \atopwithdelims ()k} C(k,a) \end{aligned}$$
(5)
$$\begin{aligned}&= m C(r-1,a-1) - a C(r-1,a), \end{aligned}$$
(6)
$$\begin{aligned}D(r,a,b)&=(m-a) D(r-1,a,b) + m \sum _{k=0}^{r-2} {r-1 \atopwithdelims ()k} D(k,a,b) \nonumber \\&\quad +\,2 (\lfloor b \rfloor +1 - a ) ^{r-1} e^{-m} \frac{ m^{\lfloor b \rfloor +1} }{ \lfloor b \rfloor ! } \end{aligned}$$
(7)
$$\begin{aligned}&= m D(r-1,a-1,b-1) - a D(r-1,a,b), \end{aligned}$$
(8)
$$\begin{aligned} B(r,a,f)&= (m-a) B(r-1,a,f) + m \sum _{k=0}^{r-2} {r-1 \atopwithdelims ()k} B(k,a,f) \nonumber \\&\quad +\,m \sum _{k=0}^{r-1} {r-1 \atopwithdelims ()k} B(k,a,\Delta f), \end{aligned}$$
(9)

where \(0^0=1\) by definition,

$$\begin{aligned} \Delta f(j):=f(j+1)-f(j), \end{aligned}$$

and all the expectations B are finite.

FormalPara Remark 1

The same approach can be used to obtain similar relations for binomial and hypergeometric distributions.

The following statement is a direct consequence of relations (7) and (4).

FormalPara Corollary 1
$$\begin{aligned} \mathbf{E}|X-m|^3&= m(1-2F(m))+ 2\left( (m-\lfloor m \rfloor )^2 + 2 \lfloor m \rfloor +1 \right) e^{-m} \frac{ m^{\lfloor m \rfloor +1} }{ \lfloor m \rfloor ! }, \\ \mathbf{E}|X-m|^5&= \left( 10m^2+m\right) (1-2F(m))+ 2\Big ( (\lfloor m \rfloor +1-m)^4\nonumber \\&\quad \quad +\, 2m\big (2 (m-\lfloor m \rfloor )^2 +7\lfloor m \rfloor +7 -3m\big ) \Big ) e^{-m} \frac{ m^{\lfloor m \rfloor +1} }{ \lfloor m \rfloor ! }. \end{aligned}$$

Notice that the cumulative distribution function F can be calculated, e.g., by the built-in function ppois() in R or by the function scipy.stats.poisson.cdf() in Python.

In order to validate the formulas of the corollary, we ran the following simple simulation. For each considered value of m, we computed \(\mathbf{E} |X-m|^r\) for \(r=3\) or 5: by the formulas of Corollary 1; by direct computation

$$\begin{aligned} \mathbf{E} |X-m|^r \approx \sum _{j=0}^{1,000,000} |j-m|^r \exp \left( -m + j\log m - \mathrm{lfactorial}(j)\right) , \end{aligned}$$
(10)

where the \(\mathrm{lfactorial}\) function is the natural logarithm of factorial; and by the law of large numbers (l.l.n.). In the last case, we calculated, for each value of r and m, 10,000 independent draws of \(\frac{1}{10,000} \sum _{j=1}^{10,000} |X_j-m|^r,\) where \(X_1,X_2,\ldots\) are independent Poisson random variables with mean m; and reported the empirical mean and standard error among the draws. The computations were done in R v. 3.6.3. Thus, 64-bit reals were used, which corresponds to the precision of 15–17 decimal digits. The results are shown in the following table, where the results of exact computations are presented by 16 decimal digits, while the results for the l.l.n. are presented as empirical mean (7 decimal digits) ± standard error (4 decimal digits):

 

\(m=0.1\)

\(m=1.2\)

\(m=12.3\)

\(m=123.4\)

\(r=3\), Corollary 1

0.1018096748360720

2.246710125237284

69.30382763917270

2188.950302642536

\(r=3\), (10)

0.1018096748360720

2.246710125237284

69.30382763917289

2188.950302642802

\(r=3\), l.l.n.

0.1017273 ± 0.00005931

2.245930 ± 0.0007664

69.29764 ± 0.01628

2189.144 ± 0.4905

\(r=5\), Corollary 1

0.2000180967483608

17.09916647992549

3616.415042490471

1087028.898973938

\(r=5\), (10)

0.2000180967483608

17.09916647992548

3616.415042490486

1087028.898974066

\(r=5\), l.l.n.

0.1996778 ± 0.0003536

17.07592 ± 0.01850

3614.712 ± 2.189

1,087,175 ± 531.8

The results of the computations justify the correctness of the formulas of Corollary 1.

FormalPara Proof of Theorem 1

First, let us prove (7). By Proposition 1 in Borisov and Ruzankin [2, p. 1660], we have the equivalences

$$\begin{aligned} \mathbf{E}|(X-a)^r f(X)|<\infty&\Leftrightarrow \mathbf{E}X^r |f(X)|<\infty \ \Leftrightarrow \ \mathbf{E} |\Delta ^r f(X)|<\infty \\&\Leftrightarrow \mathbf{E}X^{r-1} |\Delta f(X)|<\infty \ \Leftrightarrow \ \mathbf{E}|(X-a)^{r-1} \Delta f(X)|<\infty , \end{aligned}$$

where the \(\Leftrightarrow\) sign means “if and only if”, \(\Delta ^r\) means applying the \(\Delta\) operator r times. Hence, all the expectations B in (7) are finite. For \(r\ge 1\), we have

$$\begin{aligned}&e^m B(r,a,f)=\sum _{j=0}^{\infty } \frac{(j-a)^r f(j) m^j}{ j!} = \sum _{j=0}^{\infty } \sum _{k=0}^r {r \atopwithdelims ()k} \frac{j^k (-a)^{r-k} f(j) m^j}{ j!}\nonumber \\&\quad =\ \sum _{j=0}^{\infty } \sum _{k=1}^r {r-1 \atopwithdelims ()k-1} \frac{ j^k (-a)^{r-k} f(j) m^j }{ j! } + \sum _{j=0}^{\infty } \sum _{k=0}^{r-1} {r-1 \atopwithdelims ()k} \frac{ j^k (-a)^{r-k} f(j) m^j }{ j! } \nonumber \\&\quad =\ \sum _{j=0}^{\infty } \frac{ j (j-a)^{r-1} f(j) m^{j} }{ j! } - \sum _{j=0}^{\infty } \frac{a (j-a)^{r-1} f(j) m^{j} }{ j! } \nonumber \\&\quad =\ \sum _{j=0}^{\infty } \frac{ (j+1-a)^{r-1} f(j+1) m^{j+1} }{ j! } - a e^m B(r-1,a,f) \end{aligned}$$
(11)

Analogously, (11) implies (6).

$$\begin{aligned}&= \sum _{j=0}^{\infty } \frac{ (j+1-a)^{r-1} \left( f(j) + \Delta f(j) \right) m^{j+1} }{ j! } - a e^m B(r-1,a,f) \\&= m \sum _{k=0}^{r-1} {r-1 \atopwithdelims ()k} \sum _{j=0}^{\infty } \frac{(j-a)^k \left( f(j) + \Delta f(j) \right) m^j }{ j! } - a e^m B(r-1,a,f) \\&= m \sum _{k=0}^{r-1} {r-1 \atopwithdelims ()k} e^m (B(k,a,f) + B(k,a,\Delta f) ) - a e^m B(r-1,a,f), \end{aligned}$$

which proves (7). \(\square\)

Relation (5) follows immediately from (9) with \(f(j)\equiv 1\).

Let us now prove (7). By (11), for \(r\ge 1\), we have

$$\begin{aligned} e^m D(r,a,b)&= \sum _{j=0}^{\infty } \frac{ (j+1-a)^{r-1} \mathrm{sign} (j+1-b) m^{j+1} }{ j! } - a e^m D(r-1,a,b) \end{aligned}$$
(12)

which proves (8). Notice that \(\mathrm{sign} (j+1-b) \ne \mathrm{sign} (j-b)\) for \(j=\lfloor b \rfloor\) only. Hence, (12) equals

$$\begin{aligned}&= \sum _{j=0}^{\infty } \frac{ (j+1-a)^{r-1} \mathrm{sign} (j-b) m^{j+1} }{ j! } + \frac{ 2 (\lfloor b \rfloor +1 -a ) ^{r-1} m^{\lfloor b \rfloor +1} }{ \lfloor b \rfloor ! } - a e^m D(r-1,a,b)\\&= m \sum _{k=0}^{r-1} {r-1 \atopwithdelims ()k} \sum _{j=0}^{\infty } \frac{(j-a)^k \mathrm{sign} (j-b) m^j }{ j! } + \frac{ 2 (\lfloor b \rfloor +1 -a ) ^{r-1} m^{\lfloor b \rfloor +1} }{ \lfloor b \rfloor ! } - a e^m D(r-1,a,b) \\&= m \sum _{k=0}^{r-1} {r-1 \atopwithdelims ()k} e^m D(k,a,b) + \frac{ 2 (\lfloor b \rfloor +1 -a ) ^{r-1} m^{\lfloor b \rfloor +1} }{ \lfloor b \rfloor ! } - a e^m D(r-1,a,b), \end{aligned}$$

which proves (7).

The theorem is proved.