This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 6.042/18.062J Mathematics for Computer Science May 3, 2005 Srini Devadas and Eric Lehman Lecture Notes Expected Value I The expectation or expected value of a random variable is a single number that tells you a lot about the behavior of the variable. Roughly, the expectation is the average value, where each value is weighted according to the probability that it comes up. Formally, the expected value of a random variable R defined on a sample space S is: Ex ( R ) = R ( w ) Pr ( w ) w ∈ S To appreciate its signficance, suppose S is the set of students in a class, and we select a student uniformly at random. Let R be the selected student’s exam score. Then Ex ( R ) is just the class average— the first thing everyone want to know after getting their test back! In the same way, expectation is usually the first thing one wants to determine about any random variable. Let’s work through an example. Let R be the number that comes up on a fair, sixsided die. Then the expected value of R is: 6 1 Ex ( R ) = k 6 k =1 1 1 1 1 1 1 = 1 · + 2 · + 3 · + 4 · + 5 · + 6 · 6 6 6 6 6 6 7 = 2 This calculation shows that the name “expected value” is a little misleading; the random variable might never actually take on that value. You can’t roll a 3 1 2 on an ordinary die! 1 Betting on Coins Dan, Eric, and Nick decide to play a fun game. Each player puts $2 on the table and secretly writes down either “heads” or “tails”. Then one of them tosses a fair coin. The $6 on the table is divided evenly among the players who correctly predicted the outcome of the coin toss. If everyone guessed incorrectly, then everyone takes their money back. After many repetitions of this game, Dan has lost a lot of money— more than can be explained by bad luck. What’s going on? A tree diagram for this problem is worked out below, under the assumptions that everyone guesses correctly with probability 1 / 2 and everyone is correct independently. 2 Expected Value I 1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8 probability Dan right? Eric right? Nick right? Dan’s payoff Y N Y Y Y Y Y Y N N N N N N $0$2$2$2 $4 $1 $1 $0 1/2 1/2 1/2 1/2 1/2 1/2 1/2 1/2 1/2 1/2 1/2 1/2 1/2 1/2 In the “payoff” column, we’re accounting for the fact that Dan has to put in $2 just to play. So, for example, if he guesses correctly and Eric and Nick are wrong, then he takes all $6 on the table, but his net profit is only $4. Working from the tree diagram, Dan’s expected payoff is: 1 1 1 1 1 1 1 1 Ex ( payoff ) = 0 · + 1 · + 1 · + 4 · + ( − 2) · + ( − 2) · + ( − 2) · + 0 · 8 8 8 8 8 8 8 8 = 0 So the game perfectly fair! Over time, he should neither win nor lose money. The trick is that Nick and Eric are collaborating; in particular, they always make oppo site guesses. So our assumption everyone is correct independently is wrong; actually the events that Nick is correct and Eric is correct are mutually exclusive! As a result, Dan can never win all the money on the table. When he guesses...
View
Full
Document
This note was uploaded on 02/08/2011 for the course EECS 6.042 taught by Professor Dr.ericlehman during the Spring '11 term at MIT.
 Spring '11
 Dr.EricLehman
 Computer Science

Click to edit the document details