Variance of Geometric Distribution/Formulation 2

From ProofWiki
Jump to navigation Jump to search

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 variance of $X$ is given by:

$\var X = \dfrac {1 - p} {p^2}$


Proof 1

From the definition of Variance as Expectation of Square minus Square of Expectation:

$\var X = \expect {X^2} - \paren {\expect X}^2$

From Expectation of Function of Discrete Random Variable:

$\ds \expect {X^2} = \sum_{x \mathop \in \Omega_X} x^2 \map \Pr {X = x}$


Let $q = 1 - p$


Thus:

\(\ds \expect {X^2}\) \(=\) \(\ds \sum_{k \mathop \ge 1} k^2 p q^k\) Geometric Distribution: Formulation 2, with $p + q = 1$
\(\ds \) \(=\) \(\ds \sum_{k \mathop \ge 1} \paren {k^2 - k + k} p q^k\) adding $0$
\(\ds \) \(=\) \(\ds \sum_{k \mathop \ge 1} \paren {k^2 - k} p q^k + \sum_{k \mathop \ge 1} k p q^k\) splitting sum
\(\ds \) \(=\) \(\ds p q^2 \sum_{k \mathop \ge 1} k \paren {k - 1} q^{k-2} + p q \sum_{k \mathop \ge 1} k q^{k-1}\)
\(\ds \) \(=\) \(\ds p q^2 \dfrac 2 {\paren {1 - q}^3 } + p q \dfrac 1 {\paren {1 - q}^2 }\) Derivative of Geometric Sequence/Corollary and Derivative of Geometric Sequence
\(\ds \) \(=\) \(\ds p q^2 \dfrac 2 {p^3 } + p q \dfrac 1 {p^2 }\)
\(\ds \) \(=\) \(\ds \dfrac {2 q^2} {p^2 } + \dfrac q p\)


Then:

\(\ds \var X\) \(=\) \(\ds \expect {X^2} - \paren {\expect X}^2\)
\(\ds \) \(=\) \(\ds \dfrac {2 q^2} {p^2 } + \dfrac q p - \frac {q^2} {p^2}\) Expectation of Geometric Distribution: Formulation 2: $\expect X = \dfrac {1 - p} p = \dfrac q p$
\(\ds \) \(=\) \(\ds \dfrac {q^2} {p^2 } + \dfrac q p \paren {\dfrac p p}\) multiplying by $1$
\(\ds \) \(=\) \(\ds \frac {q \paren {q + p} } {p^2}\)
\(\ds \) \(=\) \(\ds \frac {1 - p} {p^2}\) $p + q = 1$

$\blacksquare$


Proof 2

By Moment Generating Function of Geometric Distribution, the moment generating function of $X$ is given by:

$\map {M_X} t = \dfrac p {1 - \paren {1 - p} e^t}$

for $t < -\map \ln {1 - p}$, and is undefined otherwise.


From Variance as Expectation of Square minus Square of Expectation:

$\ds \var X = \expect {X^2} - \paren {\expect X}^2$

From Expectation of Geometric Distribution/Formulation 2, we have:

$\expect X = \dfrac {1 - p} p$


From Moment Generating Function of Geometric Distribution: Second Moment:

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


From Moment in terms of Moment Generating Function, we also have:

$\expect {X^2} = \map { {M_X}''} 0$


Setting $t = 0$, we obtain the second moment:

\(\ds \map {M''_X} 0\) \(=\) \(\ds \expect {X^2}\)
\(\ds \) \(=\) \(\ds \dfrac {p \paren {1 - p} + p \paren {1 - p}^2 } {\paren {1 - \paren {1 - p} }^3 }\)
\(\ds \) \(=\) \(\ds \dfrac {p \paren {1 - p} + p \paren {1 - p}^2 } {p^3 }\)

So:

\(\ds \var X\) \(=\) \(\ds \dfrac {p \paren {1 - p} + p \paren {1 - p}^2 } {p^3 } - \dfrac {\paren {1 - p}^2} {p^2}\)
\(\ds \) \(=\) \(\ds \dfrac {p \paren {1 - p} + p \paren {1 - p}^2 } {p^3 } - \dfrac {\paren {1 - p}^2} {p^2} \paren {\dfrac p p}\) multiplying by $1$
\(\ds \) \(=\) \(\ds \dfrac {1 - p} {p^2}\)

$\blacksquare$


Also presented as

The Variance of Geometric Distribution is also presented in the form:

$\var X = \dfrac q {p^2}$

where $q$ has been defined conventionally as $q = 1 - p$.


Sources