Expectation of Square of Discrete Random Variable

Theorem
Let $X$ be a discrete random variable whose probability generating function is $\map {\Pi_X} s$.

Then the square of the expectation of $X$ is given by the expression:
 * $\expect {X^2} = \map { {\Pi_X}''} 1 + \map { {\Pi_X}'} 1$

where $\map { {\Pi_X}''} 1$ and $\map { {\Pi_X}'} 1$ denote the second and first derivative respectively of the PGF $\map {\Pi_X} s$ evaluated at $1$.

Proof
From Derivatives of Probability Generating Function at One:
 * $\map { {\Pi_X}''} 1 = \expect {X \paren {X - 1} }$

and from Expectation of Discrete Random Variable from PGF:
 * $\map { {\Pi_X}'} 1 = \expect X$

So: