Variance
CS 70, Summer 2019 Lecture 21, 7/30/19
1 / 26
Two Games
Game 1: Flip a coin 10 times. For each Head, you win 100. For each Tail, you lose 100. Expected Winnings on Flip i: Expected Winnings After 10 Flips:
2 / 26
fair
- Fi
Effi ]
= 100ft )t
I
- too ) ( I )
I
I
ECF ]
- fi,
Effi
]
=O
Two Games
Game 2: Flip a coin 10 times. For each Head, you win 10000. For each Tail, you lose 10000. Expected Winnings on Flip i: Expected Winnings After 10 Flips: Q: Which game would you rather play?
3 / 26
fair
- Fi
Effi
]
=O
=Ill
0000
)
t
I
C-
NOOO )
- Eff
7=0
Definition of Variance
The key difference is the variance. Variance is the expected “distance” to mean. Let X be a RV with E[X] = µ. Then: Var(X) =
4 / 26
Ell
x
- ul
' I
#
Tartan
is
always
- non-neg-ttfustdD-jgxy.TW
Alternate Definition
We can use linearity of expectation to get an alternate form that is often easier to apply. Var(X) =
5 / 26
IECX
' ]
- uz
EH X
- MY ]
IE [ XZ
- 2µXtu2 )
linear#
=IECXZ ]
- 2µE[ X
]tµ2
- U
2 ]
- if
Variance: A Visual
6 / 26
- #
ftp.aais.irenrr
.Value