is this a
play

Isthisa roll2,3,4:lose$1 fairgame? roll5,4,6:win $1 roll5,4,5:win - PowerPoint PPT Presentation

CarnivalDice MathematicsforComputerScience MIT6.042J/18.062J Chooseanumberfrom1to6, Great thenroll3fairdice: Expectations win$1foreachmatch lose$1ifnomatch AlbertRMeyer, AlbertRMeyer, expect_intro.1


  1. Carnival Dice Mathematics for Computer Science MIT 6.042J/18.062J Choose a number from 1 to 6, Great then roll 3 fair dice: Expectations win $1 for each match lose $1 if no match Albert R Meyer, Albert R Meyer, expect_intro.1 expect_intro.3 May 8, 2013 May 8, 2013 Carnival Dice Carnival Dice Example: choose 5, then Is this a roll 2,3,4: lose $1 fair game? roll 5,4,6: win $1 roll 5,4,5: win $2 roll 5,5,5: win $3 Albert R Meyer, Albert R Meyer, expect_intro.4 expect_intro.5 May 8, 2013 May 8, 2013 1

  2. Carnival Dice Carnival Dice 3 ⎛ ⎞ Pr[0 fives] = 5 125 ⎜ ⎟ ⎟ ⎜ # matches probability $ won = ⎟ ⎜ ⎟ ⎜ 6 ⎟ 216 ⎝ ⎠ 2 ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ 0 125/216 -1 Pr[1 five] = 3 5 1 ⎟ ⎟ ⎟ ⎜ ⎜ ⎜ ⎟ ⎟ ⎟ ⎜ ⎜ ⎜ ⎟ ⎟ ⎟ ⎜ ⎜ ⎜ ⎟ ⎟ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ 1 6 6 ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ 1 75/216 1 1 2 ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ Pr[2 fives] = 3 5 1 ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎟ ⎟ ⎜ ⎜ ⎜ 2 15/216 2 ⎟ ⎟ ⎟ ⎜ ⎜ ⎜ ⎟ ⎟ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ 2 6 6 ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ 3 3 1/216 3 ⎛ ⎞ Pr[3 fives] = 1 ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ 6 ⎟ ⎝ ⎠ Albert R Meyer, Albert R Meyer, expect_intro.7 expect_intro.6 May 8, 2013 May 8, 2013 Carnival Dice Carnival Dice so every 216 games, expect So on average expect to win: 0 matches about 125 times 125 − 1 ( ) 75 1 15 2 + ⋅ 1 3 ⋅ + ⋅ + ⋅ 1 match about 75 times 216 2 matches about 15 times 17 3 matches about once ≈ − 8cents = − 216 Albert R Meyer, Albert R Meyer, expect_intro.8 expect_intro.9 May 8, 2013 May 8, 2013 2

  3. Carnival Dice Carnival Dice So on average expect to win: You can “expect” to lose 8 cents per play. But you never actually 125 ⋅ ( − 1 ) 75 1 15 2 + 1 3 + ⋅ + ⋅ ⋅ NOT fair! lose 8 cents on any single play, 216 this is just your average loss. 17 ≈ − 8cents = − 216 Albert R Meyer, May 8, 2013 Albert R Meyer, May 8, 2013 expect_intro.10 expect_intro.11 expect intro 10 Expected Value Expected Value The expected value of The expected value of random variable R is random variable R is ∑ E[R] :: = v ⋅ Pr[R = v] the average value of R v ∈ range(R) --with values weighted so E[$win in Carnival] = − 17 by their probabilities 216 Albert R Meyer, May 8, 2013 Albert R Meyer, May 8, 2013 expect_intro.12 expect_intro.13 3

  4. Alternative definition Alternative definition E[R] = ∑ R( ω ) ⋅ Pr[ ω ] E[R] = ∑ R( ω ) ⋅ Pr[ ω ] ω∈ S ω∈ S proof of equivalence: this form helpful in so [R = v] :: = { ω |R( ω ) = v} some proofs ∑ Pr[ ω ] Pr[R = v] :: = ω∈ [R = v] Albert R Meyer, May 8, 2013 Albert R Meyer, May 8, 2013 expect_intro.14 expect_intro.15 proof of equivalence proof of equivalence Now Now E[R] :: = ∑ v ⋅ Pr[R = v] E[R] :: = ∑ v ⋅ Pr[R = v] v ∈ range(R) v ∈ range(R) so Albert R Meyer, May 8, 2013 Albert R Meyer, May 8, 2013 expect_intro.16 expect_intro.17 4

  5. proof of equivalence proof of equivalence Now Now v ⋅ ∑ Pr[ ω ] v ⋅ ∑ Pr[ ω ] ∑ ∑ E[R] :: = E[R] :: = v ∈ range(R) ω∈ [R = v] v ∈ range(R) ω∈ [R = v] ∑ ∑ v ⋅ Pr[ ω ] = v ω∈ [R = v] Albert R Meyer, May 8, 2013 Albert R Meyer, May 8, 2013 expect_intro.18 expect_intro.19 proof of equivalence proof of equivalence Now Now Now v ⋅ ∑ Pr[ ω ] v ⋅ ∑ Pr[ ω ] ∑ ∑ E[R] :: = E[R] : E[R] :: = v ∈ range(R) ω∈ [R = v] v ∈ range(R) ω∈ [R = v] ∑ ∑ v ⋅ Pr[ ω ] ∑ ∑ R( ω ) ⋅ Pr[ ω ] = = v ω∈ [R = v] v ω∈ [R = v] ∑ R( ω ) ⋅ Pr[ ω ] R( ω ) ⋅ Pr[ ω ] = = ω∈ S ω∈ S Albert R Meyer, May 8, 2013 Albert R Meyer, May 8, 2013 expect_intro.20 expect_intro.21 5

  6. Sums vs Integrals Rearranging Terms It’s safe to rearrange terms We get away with sums in sums because instead of integrals because the sample space is assumed countable: S = { ω 0 , ω 1 , … , ω n , … } Albert R Meyer, May 8, 2013 Albert R Meyer, May 8, 2013 expect_intro.23 expect_intro.24 Rearranging Terms Absolute convergence It’s safe to rearrange terms E[R] :: = ∑ v ⋅ Pr[R = v] in sums because we implicitly v ∈ range(R) the terms on the right could assume that the defining be rearranged to equal sum for the expectation is anything at all when the sum absolutely convergent is not absolutely convergent Albert R Meyer, May 8, 2013 Albert R Meyer, May 8, 2013 expect_intro.25 expect_intro.26 6

  7. Expectations & Averages Expected Value From a pile of graded exams, also called pick one at random, and let S mean value, mean, or be its score. expectation Albert R Meyer, May 8, 2013 Albert R Meyer, May 8, 2013 expect_intro.27 expect_intro.28 Expectations & Averages Expectations & Averages From a pile of graded exams, We can estimate averages pick one at random, and let S by estimating expectations be its score. Now E[S] equals of random variables the average exam score Albert R Meyer, May 8, 2013 Albert R Meyer, May 8, 2013 expect_intro.29 expect_intro.30 7

  8. Expectations & Averages Expectations & Averages For example, it is impossible for We can estimate averages all exams to be above average by estimating expectations (no matter what the townspeople of random variables based of Lake Woebegone say): on picking random elements Pr[R > E[R]] < 1 pmmmm ommmm � sampling Albert R Meyer, May 8, 2013 Albert R Meyer, May 8, 2013 expect_intro.31 expect_intro.32 Expectations & Averages On the other hand Pr[R > E[R]] ≥ 1 − � is possible for all ɛ > 0 For example, almost everyone has an above average number of fingers. Albert R Meyer, May 8, 2013 expect_intro.33 8

  9. MIT OpenCourseWare http://ocw.mit.edu 6.042J / 18.062J Mathematics for Computer Science Spring 20 15 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Recommend


More recommend