avewright/proofwiki-math huggingface dataset:
Theorem: Variance of Binomial Distribution

Let $X$ be a discrete random variable with the binomial distribution with parameters $n$ and $p$.
Then the variance of $X$ is given by:
:$\var X = n p \paren {1 - p}$

Proof:
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 \Img X} x^2 \Pr \paren {X = x}$
To simplify the algebra a bit, let $q = 1 - p$, so $p + q = 1$.
So:
{{begin-eqn}}
{{eqn | l = \expect {X^2}
      | r = \sum_{k \mathop \ge 0}^n k^2 \binom n k p^k q^{n - k}
      | c = {{Defof|Binomial Distribution}}: $p + q = 1$
}}
{{eqn | r = \sum_{k \mathop = 0}^n k n \binom {n - 1} {k - 1} p^k q^{n - k}
      | c = Factors of Binomial Coefficient: $k \dbinom n k = n \dbinom {n - 1} {k - 1}$
}}
{{eqn | r = n p \sum_{k \mathop = 1}^n k \binom {n - 1} {k - 1} p^{k - 1} q^{\paren {n - 1} - \paren {k - 1} }
      | c = Change of limit: term is zero when $k = 0$
}}
{{eqn | r = n p \sum_{j \mathop = 0}^m \paren {j + 1} \binom m j p^j q^{m - j}
      | c = putting $j = k - 1, m = n - 1$
}}
{{eqn | r = n p \paren {\sum_{j \mathop = 0}^m j \binom m j p^j q^{m - j} + \sum_{j \mathop = 0}^m \binom m j p^j q^{m - j} }
      | c = splitting sum up into two
}}
{{eqn | r = n p \paren {\sum_{j \mathop = 0}^m m \binom {m - 1} {j - 1} p^j q^{m - j} + \sum_{j \mathop = 0}^m \binom m j p^j q^{m - j} }
      | c = Factors of Binomial Coefficient: $j \dbinom m j = m \dbinom {m - 1} {j - 1}$
}}
{{eqn | r = n p \paren {\paren {n - 1} p \sum_{j \mathop = 1}^m \binom {m - 1} {j - 1} p^{j - 1} q^{\paren {m - 1} - \paren {j - 1} } + \sum_{j \mathop = 0}^m \binom m j p^j q^{m - j} }
      | c = Change of limit: term is zero when $j = 0$
}}
{{eqn | r = n p \paren {\paren {n - 1} p \paren {p + q}^{m - 1} + \paren {p + q}^m}
      | c = Binomial Theorem
}}
{{eqn | r = n p \paren {\paren {n - 1} p + 1}
      | c = as $p + q = 1$
}}
{{eqn | r = n^2 p^2 + n p \paren {1 - p}
      | c = by algebra
}}
{{end-eqn}}
Then:
{{begin-eqn}}
{{eqn | l = \var X
      | r = \expect {X^2} - \paren {\expect X}^2
      | c = 
}}
{{eqn | r = n p \paren {1 - p} + n^2 p^2 - \paren {n p}^2
      | c = Expectation of Binomial Distribution: $\expect X = n p$
}}
{{eqn | r = n p \paren {1 - p}
      | c = 
}}
{{end-eqn}}
as required.
{{qed}}
Theorem: Variance of Binomial Distribution

Let $X$ be a discrete random variable with the binomial distribution with parameters $n$ and $p$.
Then the variance of $X$ is given by:
:$\var X = n p \paren {1 - p}$

Proof:
From Variance of Discrete Random Variable from PGF:
:$\var X = \map {\Pi' '_X} 1 + \mu - \mu^2$
where $\mu = \expect X$ is the expectation of $X$.
From the Probability Generating Function of Binomial Distribution:
:$\map {\Pi_X} s = \paren {q + p s}^n$
where $q = 1 - p$.
From Expectation of Binomial Distribution:
:$\mu = n p$
From Derivatives of PGF of Binomial Distribution:
:$\map {\Pi' '_X} s = n \paren {n - 1} p^2 \paren {q + p s}^{n - 2}$
Setting $s = 1$ and using the formula $\map {\Pi' '_X} 1 + \mu - \mu^2$:
:$\var X = n \paren {n - 1} p^2 + n p - n^2 p^2$
Hence the result.
{{qed}}
Theorem: Variance of Binomial Distribution

Let $X$ be a discrete random variable with the binomial distribution with parameters $n$ and $p$.
Then the variance of $X$ is given by:
:$\var X = n p \paren {1 - p}$

Proof:
From Binomial Experiment has Binomial Distribution, we see that $X$ as defined here is the sum of the discrete random variables that model the Bernoulli distribution.
Each of the Bernoulli trials is independent of each other.
Hence we can use Sum of Variances of Independent Trials.
The Variance of Bernoulli Distribution is $p \paren {1 - p}$.
Thus the variance of $\Binomial n p$ is $n p \paren {1 - p}$.
{{qed}}
Theorem: Sum of Expectations of Independent Trials

Let $\EE_1, \EE_2, \ldots, \EE_n$ be a sequence of experiments whose outcomes are independent of each other.
Let $X_1, X_2, \ldots, X_n$ be discrete random variables on $\EE_1, \EE_2, \ldots, \EE_n$ respectively.
Let $\expect {X_j}$ denote the expectation of $X_j$ for $j \in \set {1, 2, \ldots, n}$.
Then we have, whenever both sides are defined:
:$\ds \expect {\sum_{j \mathop = 1}^n X_j} = \sum_{j \mathop = 1}^n \expect {X_j}$
That is, the sum of the expectations equals the expectation of the sum.

Proof:
The proof proceeds by induction on the number of terms $n$ in the sum.
For all $n \in \Z_{\ge 0}$, let $\map P n$ be the proposition:
:$\ds \expect {\sum_{j \mathop = 1}^n X_j} = \sum_{j \mathop = 1}^n \expect {X_j}$
=== Basis for the Induction ===
$\map P 1$ is the case:
:$\ds \expect {\sum_{j \mathop = 1}^1 X_j} = \sum_{j \mathop = 1}^1 \expect {X_j}$
That is:
:$\expect {X_1} = \expect {X_1}$
which is tautologically true.
This is our basis for the induction.
=== Induction Hypothesis ===
Now it needs to be shown that if $\map P k$ is true, where $k \ge 1$, then it logically follows that $\map P {k + 1}$ is true.
So this is the induction hypothesis:
$\ds \expect {\sum_{j \mathop = 1}^k X_j} = \sum_{j \mathop = 1}^k \expect {X_j}$
from which it is to be shown that:
$\ds \expect {\sum_{j \mathop = 1}^{k + 1} X_j} = \sum_{j \mathop = 1}^{k + 1} \expect {X_j}$
=== Induction Step ===
This is our induction step:
Denote $Y = \ds \sum_{j \mathop = 1}^k X_j$
Then we compute:
{{begin-eqn}}
{{eqn | l = \expect {\sum_{j \mathop = 1}^{k + 1} X_j}
      | r = \expect {Y + X_{k + 1} }
}}
{{eqn | r = \sum_{y \mathop + x_{k + 1} \mathop \in \R} \paren {y + x_{k + 1} } \map \Pr {Y + X_{k + 1}  = y + x_{k + 1} }
      | c = {{Defof|Expectation}}
}}
{{eqn | r = \sum_{y \mathop \in \R} \sum_{x_{k + 1} \mathop \in \R} \paren {y + x_{k + 1} } \map \Pr {Y = y, X_{k + 1} = x_{k + 1} }
      | c = {{Defof|Joint Probability Mass Function}}
}}
{{eqn | r = \sum_{y \mathop \in \R} \sum_{x_{k + 1} \mathop \in \R} \paren {y + x_{k + 1} } \map \Pr {Y = y} \, \map \Pr {X_{k + 1} = x_{k + 1} }
      | c = Independence of $Y$ and $X_{k + 1}$ 
}}
{{eqn | r = \sum_{y \mathop \in \R} \sum_{x_{k + 1} \mathop \in \R} y \, \map \Pr {Y = y} \, \map \Pr {X_{k + 1} = x_{k + 1} } + \sum_{y \mathop \in \R} \sum_{x_{k + 1} \mathop \in \R} x_{k + 1} \, \map \Pr {Y = y} \, \map \Pr {X_{k + 1} = x_{k + 1} }
      | c = splitting the summation
}}
{{eqn | r = \sum_{y \mathop \in \R} y \, \map \Pr {Y = y} + \sum_{x_{k + 1} \mathop \in \R} x_{k + 1} \, \map \Pr {X_{k + 1} = x_{k + 1} }
      | c = because $\ds \sum_{x_{k + 1} \mathop \in \R} \map \Pr {X_{k + 1} = x_{k + 1} } = 1 = \sum_{y \mathop \in \R} \map \Pr {Y = y}$
}}
{{eqn | r = \expect Y + \expect {X_{k + 1} }
      | c = {{Defof|Expectation}}
}}
{{eqn | r = \sum_{j \mathop = 1}^{k + 1} \expect {X_j}
      | c = by the Induction Hypothesis
}}
{{end-eqn}}
The result follows by the Principle of Mathematical Induction.
{{qed}}
Theorem: Sum of Expectations of Independent Trials

Let $\EE_1, \EE_2, \ldots, \EE_n$ be a sequence of experiments whose outcomes are independent of each other.
Let $X_1, X_2, \ldots, X_n$ be discrete random variables on $\EE_1, \EE_2, \ldots, \EE_n$ respectively.
Let $\expect {X_j}$ denote the expectation of $X_j$ for $j \in \set {1, 2, \ldots, n}$.
Then we have, whenever both sides are defined:
:$\ds \expect {\sum_{j \mathop = 1}^n X_j} = \sum_{j \mathop = 1}^n \expect {X_j}$
That is, the sum of the expectations equals the expectation of the sum.

Proof:
The proof proceeds by induction on the number of terms $n$ in the sum.
For all $n \in \Z_{\ge 0}$, let $\map P n$ be the proposition:
:$\ds \expect {\sum_{j \mathop = 1}^n X_j} = \sum_{j \mathop = 1}^n \expect {X_j}$
=== Basis for the Induction ===
$\map P 1$ is the case:
:$\ds \expect {\sum_{j \mathop = 1}^1 X_j} = \sum_{j \mathop = 1}^1 \expect {X_j}$
That is:
:$\expect {X_1} = \expect {X_1}$
which is tautologically true.
This is our basis for the induction.
=== Induction Hypothesis ===
Now it needs to be shown that if $\map P k$ is true, where $k \ge 1$, then it logically follows that $\map P {k + 1}$ is true.
So this is the induction hypothesis:
$\ds \expect {\sum_{j \mathop = 1}^k X_j} = \sum_{j \mathop = 1}^k \expect {X_j}$
from which it is to be shown that:
$\ds \expect {\sum_{j \mathop = 1}^{k + 1} X_j} = \sum_{j \mathop = 1}^{k + 1} \expect {X_j}$
=== Induction Step ===
This is the induction step:
Denote the random variable $Y = \ds \sum_{j \mathop = 1}^k X_j$.
Then we compute:
{{begin-eqn}}
{{eqn | l = \expect {\sum_{j \mathop = 1}^{k + 1} X_j}
      | r = \expect {Y + X_{k + 1} }
}}
{{eqn | r = \expect Y + \expect {X_{k + 1} }
      | c = Expectation is Linear
}}
{{eqn | r = \sum_{j \mathop = 1}^{k + 1} \expect {X_j}
      | c = by Induction Hypothesis
}}
{{end-eqn}}
The result follows by the Principle of Mathematical Induction.
{{qed}}
Theorem: Sum of Variances of Independent Trials

Let $\EE_1, \EE_2, \ldots, \EE_n$ be a sequence of experiments whose outcomes are independent of each other.
Let $X_1, X_2, \ldots, X_n$ be discrete random variables on $\EE_1, \EE_2, \ldots, \EE_n$ respectively.
Let $\var {X_j}$ be the variance of $X_j$ for $j \in \set {1, 2, \ldots, n}$.
Then:
:$\ds \var {\sum_{j \mathop = 1}^n X_j} = \sum_{j \mathop = 1}^n \var {X_j}$
That is, the sum of the variances equals the variance of the sum.

Proof:
{{begin-eqn}}
{{eqn | l = \var {\sum_{j \mathop = 1}^n X_j}
      | r = \expect {\paren {\sum_{j \mathop = 1}^n X_j}^2} - \expect {\sum_{j \mathop = 1}^n X_j}^2
      | c = Variance as Expectation of Square minus Square of Expectation: Discrete
}}
{{eqn | r = \expect {\sum_{0 \mathop < i \mathop < j \mathop \le n} 2 X_i X_j + \sum_{j \mathop = 1}^n X_j^2} - 2 \sum_{0 \mathop < i \mathop < j \mathop \le n} \expect {X_i} \expect {X_j} - \sum_{j \mathop = 1}^n \expect{X_j}^2
      | c = 
}}
{{eqn | r = \sum_{0 \mathop < i \mathop < j \mathop \le n} 2 \expect {X_i X_j} + \sum_{j \mathop = 1}^n \expect {X_j^2} - 2 \sum_{0 \mathop < i \mathop < j \mathop \le n} \expect {X_i} \expect {X_j} - \sum_{j \mathop = 1}^n \expect {X_j}^2
      | c = Expectation is Linear: Discrete
}}
{{eqn | r = 2 \sum_{0 \mathop < i \mathop < j \mathop \le n} \expect {X_i} \expect {X_j} + \sum_{j \mathop = 1}^n \expect {X_j^2} - 2 \sum_{0 \mathop < i \mathop < j \mathop \le n} \expect {X_i} \expect {X_j} - \sum_ {j \mathop = 1}^n \expect {X_j}^2
      | c = {{Corollary|Condition for Independence from Product of Expectations}}
}}
{{eqn | r = \sum_{j \mathop = 1}^n \expect {X_j^2} - \sum_{j \mathop = 1}^n \expect {X_j}^2
      | c = 
}}
{{eqn | r = \sum_{j \mathop = 1}^n \expect {X_j^2} - \expect {X_j}^2
      | c = 
}}
{{eqn | r = \sum_{j \mathop = 1}^n \var {X_j}
      | c = Variance as Expectation of Square minus Square of Expectation: Discrete
}}
{{end-eqn}}
{{qed}}
Category:Variance
m1u82lnh9tf0ta8pw1hw2olzfrmphxv
Theorem: Variance of Shifted Geometric Distribution

Let $X$ be a discrete random variable with the shifted geometric distribution with parameter $p$.
Then the variance of $X$ is given by:
:$\var X = \dfrac {1 - p} {p^2}$

Proof:
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 \Img X} x^2 \map \Pr {X = x}$
To simplify the algebra a bit, let $q = 1 - p$, so $p + q = 1$.
Thus:
{{begin-eqn}}
{{eqn | l = \expect {X^2} 
      | r = \sum_{k \mathop \ge 0} k^2 p q^{k - 1}
      | c = {{Defof|Shifted Geometric Distribution}}, with $p + q = 1$
}}
{{eqn | r = \sum_{k \mathop \ge 1} k^2 p q^{k - 1}
      | c = The term in $k=0$ is zero, so we change the limits
}}
{{eqn | r = \sum_{k \mathop \ge 1} k \paren {k + 1} p q^{k - 1} - \sum_{k \mathop \ge 1} k p q^{k - 1}
      | c = splitting sum up into two
}}
{{eqn | r = \sum_{k \mathop \ge 1} k \paren {k + 1} p q^{k - 1} - \frac 1 p
      | c = Second term is Expectation of Shifted Geometric Distribution
}}
{{eqn | r = p \frac 2 {\paren {1 - q}^3} - \frac 1 p
      | c = Derivative of Geometric Sequence: Corollary
}}
{{eqn | r = \frac 2 {p^2} - \frac 1 p
      | c = putting $p = 1 - q$ back in and simplifying
}}
{{end-eqn}}
Then:
{{begin-eqn}}
{{eqn | l = \var X
      | r = \expect {X^2} - \paren {\expect X}^2
      | c = 
}}
{{eqn | r = \frac 2 {p^2} - \frac 1 p - \frac 1 {p^2}
      | c = Expectation of Shifted Geometric Distribution: $\expect X = \dfrac 1 p$
}}
{{eqn | r = \frac 1 {p^2} - \frac 1 p
      | c = 
}}
{{eqn | r = \frac {1 - p} {p^2}
      | c = 
}}
{{end-eqn}}
{{qed}}
Theorem: Variance of Shifted Geometric Distribution

Let $X$ be a discrete random variable with the shifted geometric distribution with parameter $p$.
Then the variance of $X$ is given by:
:$\var X = \dfrac {1 - p} {p^2}$

Proof:
From Variance of Discrete Random Variable from PGF, we have:
:$\var X = \map {\Pi' '_X} 1 + \mu - \mu^2$
where $\mu = \expect X$ is the expectation of $X$.
From the Probability Generating Function of Shifted Geometric Distribution, we have:
:$\map {\Pi_X} s = \dfrac {p s} {1 - q s}$
where $q = 1 - p$.
From Expectation of Shifted Geometric Distribution, we have:
:$\mu = \dfrac 1 p$
From Derivatives of PGF of Shifted Geometric Distribution, we have:
:$\map {\Pi' '_X} s = \dfrac {p q} {\paren {1 - q s}^3}$
Putting $s = 1$ using the formula $\map {\Pi' '_X} 1 + \mu - \mu^2$:
:$\var X = \dfrac {p q} {\paren {1 - q}^3} + \dfrac 1 p - \paren {\dfrac 1 p}^2$
and hence the result, after some algebra.
{{qed}}
Theorem: Expectation of Geometric Distribution

Let $X$ be a discrete random variable with the geometric distribution with parameter $p$ for some $0 < p < 1$.
=== Formulation 1 ===
{{:Expectation of Geometric Distribution/Formulation 1}}
=== Formulation 2 ===
{{:Expectation of Geometric Distribution/Formulation 2}}

Proof:
From the Probability Generating Function of Geometric Distribution:
:$\map {\Pi_X} s = \dfrac q {1 - p s}$
where $q = 1 - p$.
From Expectation of Discrete Random Variable from PGF:
:$\expect X = \map {\Pi'_X} 1$
We have:
{{begin-eqn}}
{{eqn | l = \map {\Pi'_X} s
      | r = \map {\frac \d {\d s} } {\frac q {1 - p s} }
}}
{{eqn | r = \frac {q p} {\paren {1 - p s}^2}
      | c = Derivatives of PGF of Geometric Distribution
}}
{{end-eqn}}
Plugging in $s = 1$:
{{begin-eqn}}
{{eqn | l = \map {\Pi'_X} 1
      | r = \frac {q p} {\paren {1 - p}^2}
}}
{{eqn | r = \frac p {1 - p}
      | c = as $q = 1 - p$
}}
{{end-eqn}}
Hence the result.
{{qed}}
Theorem: Expectation of Geometric Distribution

Let $X$ be a discrete random variable with the geometric distribution with parameter $p$ for some $0 < p < 1$.
=== Formulation 1 ===
{{:Expectation of Geometric Distribution/Formulation 1}}
=== Formulation 2 ===
{{:Expectation of Geometric Distribution/Formulation 2}}

Proof:
From the definition of expectation:
:$\ds \expect X = \sum_{x \mathop \in \Omega_X} x \map \Pr {X = x}$
Then
{{begin-eqn}}
{{eqn | l = \expect X
      | r = \sum_{k \mathop \in \N} k p^k \paren {1 - p}
      | c = {{Defof|Geometric Distribution}}
}}
{{eqn | r = \sum_{k \mathop \ge 1} k p^k \paren {1 - p}
      | c = as the $k = 0$ term is zero
}}
{{eqn | r = \sum_{k \mathop \ge 1} k p^k - k p^{k+1}
      | c = Real Multiplication Distributes over Addition
}}
{{end-eqn}}
By the Ratio Test, both $\sum_{k \mathop \ge 1} k p^k$ and $\sum_{k \mathop \ge 1} k p^{k+1}$ converge absolutely.
From Absolutely Convergent Real Series is Convergent, both series converge.
{{begin-eqn}}
{{eqn | l = \sum_{k \mathop \ge 1} k p^k - k p^{k+1}
      | r = \sum_{k \mathop \ge 1} k p^k - \sum_{k \mathop \ge 1} k p^{k+1}
      | c = Convergent Series can be Added Term by Term
}}
{{eqn | r = \sum_{k \mathop \ge 1} k p^k - \sum_{k \mathop \ge 2} \paren {k - 1} p^k
      | c = Translation of Index Variable of Summation
}}
{{eqn | r = p + \sum_{k \mathop \ge 2} k p^k - \sum_{k \mathop \ge 2} \paren {k - 1} p^k
      | c = Moving out the first term
}}
{{eqn | r = p + \sum_{k \mathop \ge 2} k p^k - \paren {k - 1} p^k
      | c = Recombining the two convergent series
}}
{{eqn | r = p + \sum_{k \mathop \ge 2} p^k
}}
{{eqn | r = p + \frac {p^2}{1-p}
      | c = Sum of Infinite Geometric Sequence
}}
{{eqn | r = \frac {p \paren {1-p} }{1-p} + \frac {p^2} {1-p}
}}
{{eqn | r = \frac p {1-p}
}}
{{end-eqn}}
{{qed}}
Theorem: Expectation of Geometric Distribution

Let $X$ be a discrete random variable with the geometric distribution with parameter $p$ for some $0 < p < 1$.
=== Formulation 1 ===
{{:Expectation of Geometric Distribution/Formulation 1}}
=== Formulation 2 ===
{{:Expectation of Geometric Distribution/Formulation 2}}

Proof:
From the definition of expectation:
:$\ds \expect X = \sum_{x \mathop \in \Omega_X} x \map \Pr {X = x}$
By definition of geometric distribution:
:$\ds \expect X = \sum_{k \mathop \in \Omega_X} k p^k \paren {1 - p}$
Let $q = 1 - p$:
{{begin-eqn}}
{{eqn | l = \expect X
      | r = q \sum_{k \mathop \ge 0} k p^k
      | c = as $\Omega_X = \N$
}}
{{eqn | r = q \sum_{k \mathop \ge 1} k p^k
      | c = as the $k = 0$ term is zero
}}
{{eqn | r = q p \sum_{k \mathop \ge 1} k p^{k - 1}
}}
{{eqn | r = q p \frac 1 {\paren {1 - p}^2}
      | c = Derivative of Geometric Sequence
}}
{{eqn | r = \frac p {1 - p}
      | c = as $q = 1 - p$
}}
{{end-eqn}}
{{qed}}
Theorem: Variance of Geometric Distribution

Let $p \in \R$ be a real number such that $0 < p < 1$.
Let $X$ be a discrete random variable with the geometric distribution with parameter $p$.
=== Formulation 1 ===
{{:Variance of Geometric Distribution/Formulation 1}}
=== Formulation 2 ===
{{:Variance of Geometric Distribution/Formulation 2}}

Proof:
From Variance of Discrete Random Variable from PGF, we have:
:$\var X = \map {\Pi' '_X} 1 + \mu - \mu^2$
where $\mu = \map E x$ is the expectation of $X$.
From the Probability Generating Function of Geometric Distribution, we have:
:$\map {\Pi_X} s = \dfrac q {1 - ps}$
where $q = 1 - p$.
From Expectation of Geometric Distribution, we have:
:$\mu = \dfrac p q$
From Derivatives of PGF of Geometric Distribution, we have:
:$\map {\Pi' '_X} s = \dfrac {2 q p^2} {\paren {1 - ps}^3}$
Putting $s = 1$ using the formula $\map {\Pi' '_X} 1 + \mu - \mu^2$:
{{begin-eqn}}
{{eqn 	| l = \var X
	| r = \dfrac {2 q p^2} {\paren {1 - p}^3} + \dfrac p q - \paren {\dfrac p q}^2
        | c =  
}}
{{eqn 	| r = \dfrac {2 \paren {1 - p} p^2} {\paren {1 - p}^3} + \dfrac p {1 - p} \paren {\dfrac {\paren {1 - p}^2 } {\paren {1 - p}^2} } - \dfrac {p^2} {\paren {1 - p}^2 } \paren {\dfrac {1 - p} {1 - p} }
        | c = multiplying by $1$
}}
{{eqn 	| r = \dfrac {2 p^2 - 2 p^3 + p - 2 p^2 + p^3 - p^2 + p^3} {\paren {1 - p}^3}
        | c =
}}
{{eqn 	| r = \dfrac {p - p^2} {\paren {1 - p}^3}
        | c =
}}
{{eqn 	| r = \dfrac p {\paren {1 - p}^2}
        | c =
}}
{{end-eqn}}
{{qed}}
Theorem: Variance of Geometric Distribution

Let $p \in \R$ be a real number such that $0 < p < 1$.
Let $X$ be a discrete random variable with the geometric distribution with parameter $p$.
=== Formulation 1 ===
{{:Variance of Geometric Distribution/Formulation 1}}
=== Formulation 2 ===
{{:Variance of Geometric Distribution/Formulation 2}}

Proof:
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^{2 t} } {\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: 
{{begin-eqn}}
{{eqn | l = \map {M' '_X} 0 
      | r = \expect {X^2}
}}
{{eqn | r = \dfrac {p \paren {1 - p} + p \paren {1 - p}^2} {\paren {1 - \paren {1 - p} }^3}
}}
{{eqn | r = \dfrac {p \paren {1 - p} + p \paren {1 - p}^2} {p^3}
}}
{{end-eqn}}
So: 
{{begin-eqn}}
{{eqn | l = \var X
      | r = \dfrac {p \paren {1 - p} + p \paren {1 - p}^2} {p^3} - \dfrac {\paren {1 - p}^2} {p^2}
}}
{{eqn | r = \dfrac {\paren {\paren {1 - p} + p \paren {1 - p}^2} - \paren {1 - p}^2} {p^2}
      | c = simplifying
}}
{{eqn | r = \dfrac {1 - p} {p^2}
      | c = simplifying
}}
{{end-eqn}}
{{qed}}
Theorem: Variance of Geometric Distribution

Let $p \in \R$ be a real number such that $0 < p < 1$.
Let $X$ be a discrete random variable with the geometric distribution with parameter $p$.
=== Formulation 1 ===
{{:Variance of Geometric Distribution/Formulation 1}}
=== Formulation 2 ===
{{:Variance of Geometric Distribution/Formulation 2}}

Proof:
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}$
To simplify the algebra a bit, let $q = 1 - p$, so $p + q = 1$.
Thus:
{{begin-eqn}}
{{eqn | l = \expect {X^2}
      | r = \sum_{k \mathop \ge 1} k^2 q p^k
      | c = {{Defof|Geometric Distribution}}, with $p + q = 1$
}}
{{eqn | r = p \sum_{k \mathop \ge 1} k^2 q p^{k-1}
      | c = 
}}
{{eqn | r = p \paren {\frac 2 {q^2} - \frac 1 q}
      | c = Variance of Shifted Geometric Distribution: Proof 1
}}
{{end-eqn}}
Then:
{{begin-eqn}}
{{eqn | l = \var X
      | r = \expect {X^2} - \paren {\expect X}^2
      | c = 
}}
{{eqn | r = p \paren {\frac 2 {\paren {1 - p}^2} - \frac 1 {1 - p} } - \frac {p^2} {\paren {1 - p}^2}
      | c = Expectation of Geometric Distribution: $\expect X = \dfrac p {1 - p}$
}}
{{eqn | r = \frac p {\paren {1 - p}^2}
      | c = after some algebra
}}
{{end-eqn}}
{{qed}}
Theorem: Variance of Geometric Distribution

Let $p \in \R$ be a real number such that $0 < p < 1$.
Let $X$ be a discrete random variable with the geometric distribution with parameter $p$.
=== Formulation 1 ===
{{:Variance of Geometric Distribution/Formulation 1}}
=== Formulation 2 ===
{{:Variance of Geometric Distribution/Formulation 2}}

Proof:
From Variance of Discrete Random Variable from PGF:
:$\var X = \map {\Pi''_X} 1 + \mu - \mu^2$
where $\mu = \expect X$ is the expectation of $X$.
From the Probability Generating Function of Geometric Distribution:
:$\map {\Pi_X} s = \dfrac q {1 - p s}$
where $q = 1 - p$.
From Expectation of Geometric Distribution:
:$\mu = \dfrac p q$
From Derivatives of PGF of Geometric Distribution:
:$\map {\Pi''_X} s = \dfrac {2 q p^2} {\left({1 - ps}\right)^3}$
Putting $s = 1$ using the formula $\map {\Pi''_X} 1 + \mu - \mu^2$:
:$\var X = \dfrac {2 q p^2} {\paren {1 - p}^3} + \dfrac p q - \paren {\dfrac p q}^2$
and hence the result, after some algebra.
{{qed}}
Theorem: Discrete Random Variable is Random Variable

Let $\struct {\Omega, \Sigma, \Pr}$ be a probability space.
Let $X$ be a discrete random variable on $\struct {\Omega, \Sigma, \Pr}$.
Then $X$ fulfils the condition:
:$\forall x \in \R: \set {\omega \in \Omega: \map X \omega \le x} \in \Sigma$
That is, $X$ fulfils the condition for it to be a random variable.

Proof:
Let $X$ be a discrete random variable.
Then by definition:
:$\forall x \in \R: \set {\omega \in \Omega: \map X \omega = x} \in \Sigma$
But see that:
:$\ds \set {\omega \in \Omega: \map X \omega \le x} = \bigcup_{\substack {y \mathop \in \Omega_X \\ y \mathop \le x} } \set {\omega \in \Omega: \map X \omega = y}$
This is the countable union of events in $\Sigma$.
Hence, as $\Sigma$ is a sigma-algebra, $\set {\omega \in \Omega: \map X \omega \le x} \in \Sigma$ as required.
{{qed}}
Category:Probability Theory
k26f6z2tjd793lo89dbgbipsm607i47