Skip to main content
Contents
Embed
Dark Mode Prev Up Next
\(\newcommand{\N}{\mathbb N}
\newcommand{\Z}{\mathbb Z}
\newcommand{\Q}{\mathbb Q}
\newcommand{\R}{\mathbb R}
\DeclareMathOperator{\Bin}{Bin}
\DeclareMathOperator{\Geom}{Geom}
\DeclareMathOperator{\Poiss}{Poiss}
\DeclareMathOperator{\Exp}{Exp}
\DeclareMathOperator{\Norm}{N}
\DeclareMathOperator{\E}{E}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Cov}{Cov}
\newcommand{\L}{\mathcal{L}}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section Tuesday, Feb 3
This is an outline of the topics we covered in class. These notes are
not a substitute for your own note-taking. I highly recommend that you take your own notes during class. If you ever miss a class for any reason, reach out to another student in class to get a copy of their notes.
Subsection Variance
Question: How spread out are \(X\) values? One answer we might try is to measure the average distance from the average value:
\begin{gather*}
\E\left[|X - \E(X)|\right]
\end{gather*}
To simplify notation, weβll write \(\mu = \E(X)\text{.}\) Also, itβs often usefull to square a term rather than take absolute value when we want to ensure a positive output, so weβll define...
Definition 90 .
Let \(X\) be a random variable with \(\E(X) = \mu\text{.}\) The variance of \(X\) is:
\begin{gather*}
\sigma^2 = \Var(x) = \E\left[ (X - \mu)^2\right]
\end{gather*}
\(\sigma = \sqrt{\Var(X)}\) is called the standard deviation .
We can write an alternative formula here:
\begin{align*}
\Var(X) \amp = \E\left[ (X - \mu)^2 \right] \\
\amp = \E\left[ X^2 - 2\mu X + \mu^2 \right] \\
\amp = \E(X^2) - 2\mu \E(X) + \E(\mu^2) \\
\amp = \E(X^2) - 2\mu^2 + \mu^2 \\
\amp = \E(X^2) - \mu^2.
\end{align*}
This formula is generally more useful for performing computations.
Example 91 .
Let
\(X\) indicate event
\(A\) with
\(\Pr(A) = p\text{.}\)
\(k\)
\(\Pr(X = k)\)
\(0\)
\(1 - p\)
\(1\)
\(p\)
Table 92. Distribution for \(X\)
\(k\)
\(\Pr(X^2 = k)\)
\(0^2\)
\(1 - p\)
\(1^2\)
\(p\)
Table 93. Distribution for \(X^2\)
Then \(\E(X) = p\) and \(\E(X^2) = p\text{,}\) so:
\begin{gather*}
\Var(X) = \E(X^2) - \left(\E(X)\right)^2 = p - p^2 = p(1 - p).
\end{gather*}
Example 94 .
Let
\(R\) be the roll of a fair D6.
\(k\)
\(\Pr(R = k)\)
\(1\)
\(1/6\)
\(2\)
\(1/6\)
\(3\)
\(1/6\)
\(4\)
\(1/6\)
\(5\)
\(1/6\)
\(6\)
\(1/6\)
Table 95. Distribution for \(R\)
\(k\)
\(\Pr(R^2 = k)\)
\(1^2\)
\(1/6\)
\(2^2\)
\(1/6\)
\(3^2\)
\(1/6\)
\(4^2\)
\(1/6\)
\(5^2\)
\(1/6\)
\(6^2\)
\(1/6\)
Table 96. Distribution for \(R^2\)
Then \(\E(R) = \frac{7}{2}\) and \(\E(R^2) = \frac{91}{6}\text{,}\) so:
\begin{gather*}
\Var(R) = \E(R^2) - \left(\E(R)\right)^2 = \frac{91}{6} - \frac{49}{4} = \frac{35}{12}.
\end{gather*}
Example 97 .
Let \(X \in [0, 1]\) with pdf \(f(x) = 2x\text{.}\)
\begin{align*}
\E(X) \amp = \int_0^1 x \cdot 2x\ dx \\
\amp = \int_0^1 2x^2\ dx \\
\amp = \frac{2x^3}{3}\bigg|_0^1 \\
\amp = \frac{2}{3} - 0 \\
\amp = \frac{2}{3} \\
\E(X^2) \amp = \int_0^1 x^2\cdot 2x\ dx \\
\amp = \int_0^1 2x^3\ dx \\
\amp = \frac{2x^4}{4}\bigg|_0^1 \\
\amp = \frac{1}{2} - 0 \\
\amp = \frac{1}{2} \\
\Rightarrow \quad \Var(X) \amp = \E(X^2) - \left(\E(X)\right)^2 \\
\amp = \frac{1}{2} - \frac{4}{9} \\
\amp = \frac{1}{18}.
\end{align*}
WARNING!!! In general, variance is not linear! That is,
\begin{align*}
\Var(X + Y) \amp \neq \Var(X) + \Var(Y) \\
\Var(kX) \amp \neq k \Var(X)
\end{align*}
But there are still relevant properties we can state here:
Theorem 98 .
Let \(X\) be a random variable and \(k\in \R\text{.}\) Then:
\begin{align*}
\Var(X + k) \amp = \Var(X) \amp \Var(kX) \amp = k^2\Var(X).
\end{align*}
Moreover, if \(Y\) is another random variable and \(X, Y\) are independent, then:
\begin{gather*}
\Var(X + Y) = \Var(X) + \Var(Y).
\end{gather*}
Example 99 .
Let \(H_1, H_2, \dotsc, H_n\) be indicators with parameter \(p\text{.}\) Let \(S = H_1 + \dotsb + H_n\text{,}\) so \(S \sim \Bin(n, p)\text{.}\) We know \(\Var(H_i) = p(1-p)\text{,}\) and \(H_1, \dotsc, H_n\) are independent. So:
\begin{align*}
\Var(S) \amp = \Var(H_1 + \dotsb + H_n) \\
\amp = \Var(H_1) + \dotsb + \Var(H_n) \\
\amp = p(1-p) + \dotsb + p(1-p) \\
\amp = np(1-p)
\end{align*}