Variance of Bernoulli Distribution/Proof 2
Jump to navigation
Jump to search
Theorem
Let $X$ be a discrete random variable with the Bernoulli distribution with parameter $p$:
- $X \sim \Bernoulli p$
Then the variance of $X$ is given by:
- $\var X = p \paren {1 - p}$
Proof
From 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}$
So:
\(\ds \expect {X^2}\) | \(=\) | \(\ds 1^2 \times p + 0^2 \times \paren {1 - p}\) | ||||||||||||
\(\ds \) | \(=\) | \(\ds p\) |
Then:
\(\ds \var X\) | \(=\) | \(\ds \expect {X^2} - \paren {\expect X}^2\) | ||||||||||||
\(\ds \) | \(=\) | \(\ds p - p^2\) | Expectation of Bernoulli Distribution | |||||||||||
\(\ds \) | \(=\) | \(\ds p \paren {1 - p}\) |
$\blacksquare$