Coefficient recovery and factorial moments of a probability generating function (source code)

= Coefficient recovery and factorial moments of a probability generating function
{title2=$p_k=G_X^{(k)}(0)/k!$}

<Coefficient extraction> recovers every <probability mass>:
$$
p_k=\frac{G_X^{(k)}(0)}{k!},\qquad k=0,1,2,\ldots.
$$
Indeed, <termwise differentiation of a power series> is valid inside $|s|<1$; evaluating the $k$th <derivative> at zero kills every term except $p_ks^k$. Thus two <probability generating functions> with the same <coefficients> describe the same <probability distribution>, without any finite-<moment> assumption.

At one, approach along the real line from below. For each positive integer $r$, <termwise differentiation of a power series> followed by the <monotone convergence theorem> gives the <factorial moment>
$$
G_X^{(r)}(1-):=\lim_{s\uparrow1}G_X^{(r)}(s)=\mathbb E[(X)_r],\qquad (X)_r=X(X-1)\cdots(X-r+1).
$$
For integer $X<r$, set $(X)_r=0$. The limit may be infinite; it is a finite boundary value only when the corresponding <factorial moment> is finite. In particular, a finite first <moment> gives
$$
\mathbb E[X]=G_X'(1-),
$$
and a finite second <moment> gives
$$
\operatorname{Var}(X)=G_X''(1-)+G_X'(1-)-\bigl(G_X'(1-)\bigr)^2.
$$
The <variance> formula follows from $X^2=X(X-1)+X$. These are boundary limits of <derivatives>; they do not assert that the <probability generating function> extends smoothly through one.

For a nonnegative integer-valued <random variable>, its <moment-generating function> satisfies $M_X(t)=G_X(e^t)$ wherever finite. The guaranteed <probability generating function> domain therefore supplies finite values for real $t\leq0$; it does not guarantee positive <exponential moments> or a finite <moment-generating function> on a neighborhood of zero. Bounded nonnegative integer-valued <random variables> have polynomial <probability generating functions>, but their convenient behavior is not a general existence theorem.