[MUSIC] Probability distribution gives us a lot of information involved random variable. But sometimes, we want to answer the following question, what value a random variable takes on average? What does it mean on average? You know that if you have some finite number of values, we can find the average of these values by finding there sum and dividing by the number of these values. But for other variables, this method doesn't work in general. Because we have to take into account that some values of random variable are taken with large probabilities. And other values are taken with low probabilities. It is natural that those values with large probabilities will contribute more to the average value. The easiest way to think about average of random variable is to think about average win, average payout in some kind of lottery. Let us consider an example of this kind. The notion that we will discuss is expected value of random variable. And let us begin with simple example. Let us assume that Bob plays the following lottery. His payout will be denoted by X. It is a random variable, and we have only two possible values for X. Either Bob can win $5, and this happens with a probability 0.1, one-tenth. Or Bob can lose $1, And this happens with probability of 0.9, nine-tenth. The question we're interested in, what is an average payout of Bob? To find this average payout, let us assume that Bob plays a lottery many, many times. Let us assume that Bob plays, for example, 10,000 times. How many times he wins out of these 10,000? Approximately the number of wins equals to the number of plays by the probability of winning. So, we can say that approximately, Bob wins about 1,000 times 0.1. It equals to 1,000. 10,000 times 0.1 is equal to 1,000. And how many times he lose. If he wins with probability of 0.1, and loose with probability of 0.9, to find the number of losses, we have to multiply 10,000 by 0.9, and this is 9,000. Of course these numbers are approximations. We don't know exactly how many it times he wins. It's possible that he wins 1,002 times or 999. But it is almost impossible to expect that he wins ,for example, 2000 times if this probability is given. So let us assume now that these numbers are correct. In this case, his payout can be found in the following way. For winnings, to find the payout, we have to multiply this 1000 by his payout per one game, it is 5. And we have 5000. And for these losses, we have to multiply this number by this value. And get -9000. Now to find the overall payout, we have to find a sum of these two numbers. It equals to -4000. Now if we're interested in average payout per one game, we have to divide this value, his payout per 10,000 games by the number of games. And we get -0.4. So basically it means that per every game, Bob loses 40 cents by playing in this lottery. We can find this value in a little bit different way. Let me rewrite the formulas that we have here in one line. So we had this 5000 that is found by this multiplication. And this 1000 is found by this multiplication. So we can write it in the following way. In a similar way, we can think about this -9000 as the product of this 9000 and this -1. And these 9,000 is this product, so let me rewrite it once again, plus, 10,000, Times 0.9 Times -1. This thing is this -4000. So this is payout per 10,000 games. To find payout per one game, we have to divide this thing by 10,000. Now we see that 10,000 in numerator and denominator can be cancelled And we have the following formula. We see that in this formula we have probabilities. This thing is a probability of this value. And this thing is probability of this value. So to find the expected payout, we had to multiply each value by the corresponding probability and make a summation. You see that in this way, we found average in probabilistic sense, average payout per one game. From practical point of view, it doesn't matter how we analyze our game. If we know that Bob plays a lot of games, we can either assume that he plays this lottery every time, or we can assume that he merely gives to the lottery organizer this amount of money every game. And the result after 10,000 games will be approximately the same. This is what we mean when we say that this is average payout per one game. In the same way, we can define an expected value on the variable. Let us assume that we have a random variable and we know it's distribution. So we have values x1 and so on, xn. And corresponding probabilities, P1, and so on, Pn. So we basically have a table like this. Here are possible values x, and here are probability that our random variable, X takes the value x. Now, to find the expected value of this random variable, we have to make a similar thing. We have to multiply these values by the corresponding probabilities and find a sum. Expected value, it is written like this one. Expected value of x is x1 times P1 plus x2 times P2 plus unsolved plus xn times Pn. The same as xk Pk. This thing is, by definition, called expected value of random variable X. Now let us find expected values of some random variables that we discussed before. [SOUND]