Skewness of Geometric Distribution/Formulation 2

Theorem
Let $X$ be a discrete random variable with the geometric distribution with parameter $p$ for some $0 < p < 1$.
 * $\map X \Omega = \set {0, 1, 2, \ldots} = \N$
 * $\map \Pr {X = k} = p \paren {1 - p}^k$

Then the skewness of $X$ is given by:
 * $\gamma_1 = \dfrac {2 - p} {\sqrt {1 - p} }$

Proof
From the definition of skewness, we have:


 * $\gamma_1 = \expect {\paren {\dfrac {X - \mu} \sigma}^3}$

where:
 * $\mu$ is the expectation of $X$.
 * $\sigma$ is the standard deviation of $X$.

By Expectation of Geometric Distribution: Formulation 2, we have:


 * $\mu = \dfrac {1 - p} p$

By Variance of Geometric Distribution: Formulation 2, we have:


 * $\sigma = \dfrac {\sqrt {1 - p} } p$

So:

To calculate $\gamma_1$, we must calculate both $\expect {X^2}$ and $\expect {X^3}$.

From Moment in terms of Moment Generating Function:
 * $\expect {X^n} = \map { {M_X}^{\paren n} } 0$

where $M_X$ is the moment generating function of $X$.

From Moment Generating Function of Geometric Distribution: Second Moment:


 * $\map { {M_X}''} t = p \paren {1 - p} e^t \paren {\dfrac {1 + \paren {1 - p} e^t } {\paren {1 - \paren {1 - p} e^t}^3 } }$

From Moment Generating Function of Geometric Distribution: Third Moment:


 * $\map { {M_X}'''} t = p \paren {1 - p} e^t \paren {\dfrac {1 + 4 \paren {1 - p} e^t + \paren {1 - p}^2 e^{2t} } {\paren {1 - \paren {1 - p} e^t}^4 } }$

Setting $t = 0$ and from Exponential of Zero, we have:


 * $\map {M_X''} 0 = \dfrac {\paren {1 - p} \paren {2 - p} } {p^2 }$


 * $\map {M_X'''} 0 = \dfrac {\paren {1 - p} \paren {6 - 6 p + p^2} } {p^3 }$

So: