Probability
3.2 More on Expectation
Alex Tsun
Agenda
Linearity of Expectation (Idea)
Let’s say you and your friend sell fish for a living.
how many fish do the two of you bring in (Z = X + Y) on an average day?
E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10
You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (Idea)
Let’s say you and your friend sell fish for a living.
how many fish do the two of you bring in (Z = X + Y) on an average day?
E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10
You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (Idea)
Let’s say you and your friend sell fish for a living.
how many fish do the two of you bring in (Z = X + Y) on an average day?
E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10
You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (Idea)
Let’s say you and your friend sell fish for a living.
how many fish do the two of you bring in (Z = X + Y) on an average day?
E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10
You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (Idea)
Let’s say you and your friend sell fish for a living.
how many fish do the two of you bring in (Z = X + Y) on an average day?
E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10
You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (Idea)
Let’s say you and your friend sell fish for a living.
how many fish do the two of you bring in (Z = X + Y) on an average day?
E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10
You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (Idea)
Let’s say you and your friend sell fish for a living.
how many fish do the two of you bring in (Z = X + Y) on an average day?
E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10
You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (Idea)
Let’s say you and your friend sell fish for a living.
how many fish do the two of you bring in (Z = X + Y) on an average day?
E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10
You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (Idea)
Let’s say you and your friend sell fish for a living.
how many fish do the two of you bring in (Z = X + Y) on an average day?
E[Z] = E[X + Y] = e[X] + E[Y] = 3 + 7 = 10
You can sell each fish for $5 at a store, but you need to pay $20 in rent. How much profit do you expect to make? E[5Z - 20] = 5E[Z] - 20 = 5 x 10 - 20 = 30
Linearity of Expectation (LoE)
Linearity of Expectation (Proof)
Linearity of Expectation (Proof)
Linearity of Expectation (Proof)
Linearity of Expectation (Proof)
Linearity of Expectation (Proof)
Frogger!
Frogger!
-3 -2 -1 0 +1 +2 +3
Frogger!
Brute Force
-3 -2 -1 0 +1 +2 +3
Frogger!
Brute Force
-3 -2 -1 0 +1 +2 +3
Frogger!
Brute Force
-3 -2 -1 0 +1 +2 +3
Frogger!
Brute Force
-3 -2 -1 0 +1 +2 +3
Frogger!
Brute Force
-3 -2 -1 0 +1 +2 +3
Frogger!
Brute Force
-3 -2 -1 0 +1 +2 +3
Frogger!
Brute Force
-3 -2 -1 0 +1 +2 +3
Frogger!
Brute Force
-3 -2 -1 0 +1 +2 +3
Frogger!
Brute Force
-3 -2 -1 0 +1 +2 +3
Random Picture
Frogger!
Linearity
-3 -2 -1 0 +1 +2 +3
Frogger!
Linearity
-3 -2 -1 0 +1 +2 +3
Frogger!
Linearity
-3 -2 -1 0 +1 +2 +3
Frogger!
Linearity
-3 -2 -1 0 +1 +2 +3
Frogger!
Linearity
-3 -2 -1 0 +1 +2 +3
Frogger!
Linearity
-3 -2 -1 0 +1 +2 +3
Frogger!
Linearity
-3 -2 -1 0 +1 +2 +3
Frogger!
Which method was Easier?
Frogger!
Which method was Easier?
IN this case, it might be debatable.
Frogger!
Which method was Easier?
IN this case, it might be debatable.
But what if we changed the number of time steps to 100 or 1000?
Frogger!
Which method was Easier?
IN this case, it might be debatable.
But what if we changed the number of time steps to 100 or 1000?
the first method would be completely infeasible, but the second (LoE) would be basically the same.
Flipping 2 coins again
Flipping 2 coins again
Flipping 2 coins again
Flipping 2 coins again
Flipping 2 coins again
Flipping 2 coins again
Flipping 2 coins again
Flipping 2 coins again
Flipping 2 coins again
Flipping 2 coins again
Flipping 2 coins again
Law of the Unconscious Statistician (Lotus)
Probability
Alex Tsun
Joshua Fan