 Welcome back. In this video we will use probability distributions that are discrete to calculate what is called the expected value. So for instance, if you were to keep playing the lottery or keep playing some sort of game of chance, what would happen in the long term if you were to continue playing that game for a very long time? So expected value of a discrete random variable, we represent that with E brackets with the X inside, expected value of a random variable, remember X is the random variable, RV random variable, it represents the mean value of the outcomes. So whenever I say expected value, it's no different than saying the mean, the two words actually are exactly the same. And look, they even have the same formula. Surprise. You can find the expected value by taking each data value multiplying it by its probability and adding these products together. So there are ten chips in a bag. Two of the chips are blue, three of the chips are red, and five of the chips are white. A player gets to draw one chip from the bag. If a blue chip is drawn, the player wins $10. Woohoo. If a red chip is drawn, the player wins $5. If a white chip is drawn, the player wins $1. Someone decides to play the game hoping to win some money. Not done. Why else would you play it, right? It costs $5 to play the game. So we're going to find out if this game is actually worth playing. So first off, how many chips are there? Well, reading the question, all those words there, there's ten chips. What is the net profit and probability of drawing a blue chip? So probability is, I'll say, P for probability of a blue chip. Probability of a blue chip is out of ten chips, how many are blue? Just two. So you get two divided by ten, which is actually going to give you .2. What's the net profit? How much money will you make? Well, literally you take what you win minus what you paid to play. So net profit winnings minus the cost to play. So ten minus five, that's a net profit of $5. Well, let's do the same thing for the red chip. The probability of getting a red chip, probability of a red chip is actually going to be three out of ten. There's three red chips out of ten chips total, which is .3. And our net profit, our net profit, remember winnings minus the cost to play. When you get a red chip, there is how much money do you win? $5. So I have how much you won? $5 minus how much you paid to play which is a net profit of zero. But hey, at least you didn't lose any money, right? What is the net profit and probability of drawing a white chip? So let's do probability of a white chip out of ten chips total, how many are white in this case? Half of them or five of them. Probability is .5. What's the net profit for a white chip? Well, you only win a dollar minus how much you paid to play. This is not good. Your net profit is negative four. What is the expected value? Well, literally we're looking at net profit. So underneath on your distribution, we're going to make a probability distribution, a discrete probability distribution, you have various outcomes. You have the outcome when you draw a blue chip, red chip, and a white chip. We're looking at the net profit, what you would expect to to make if you were to keep playing this game. So remember what the net profit was for blue chip, the net profit for a blue chip is actually $5. The net profit for a red chip we found was $0 and white chip is negative four. We then write in the corresponding probabilities .2, .3, and .5. Be my guest if you would like to go to the Google Sheets document and work on this. But remember, all you literally have to do is multiply each outcome or net profit by its probability and add together the products. So let's use the Google Sheets spreadsheet so that way we get some experience with how it's supposed to be used to calculate expected value or mean. Remember they're the same thing. So I'm going to go to the Google Sheets spreadsheet and I'm going to go to the tab that says two variable stats. I'm going to clear out what data values are in column A and B, list your net profit or your outcomes, $5, $0, negative $4, and list your probabilities, .2, .3, .5, and give the bar in the top right time to calculate. It's going to appear a few times because there's a lot of calculations in this tab. But the ones you're most interested in are in column R. The mean is negative one. That's all we care about. So the mean is negative one or the expected value. Remember they're the same thing. The expected value is negative one. So if you were to keep playing this game because you were addicted, I would say that in the long run you would overall lose a dollar. So if you keep playing this game over and over and over and over and over and over and over and over and over again, you would expect to lose a dollar by the end of everything. Now remember what statistics and probabilities all about. That doesn't mean that you play the game five times and you're guaranteed to only lose a dollar. No, you could get white chips five times in a row. The goal of statistics expected value is long term average. You're going to keep playing and playing and playing and playing and playing and playing. Let's do a lottery example. In a states pick three lottery you pay $1.25 to select three digits, any number from zero to nine. If you select the same sequence of three digits which are drawn, you win and collect $399.95. So first off, how many different selections are there for tickets? Well, if a ticket consists of three digits, digit number one, you can pick anything from zero to nine. That's 10 possible values, digit number two, zero to nine, 10 possible values, digit three, zero to nine, 10 possible values there. So there's a total of actually 1000 tickets. We need that to help us calculate our probabilities. So what is the probability of winning? The probability of winning out of a thousand tickets. How many of those tickets would be the winning ticket? Well, you have to select the same sequence of three digits which are drawn. So there's only one in a thousand chance of you winning. So that's point zero, zero, one. So what is the net profit of winning? We're going to calculate the net profit of winning. Net profit is what you win minus what you pay. So it's $399.95 minus what you paid to play minus $1.25. So our net profit in this case is going to give us $398.70. $398.70. So that's actually when we're looking at our net winnings here. One of the outcomes, the winning outcome, our net profit is $398.70 and the probability is actually going to be point zero, zero, one really tiny. Well, what about losing? When you lose, how much money do you lose? Well, you only lose what you paid to play. You only lose $1.25. And the probability is 999 out of 1,000 or point 999. Remember this last column, this probability column has to add to one. So let's find the expected value. So if we were addicted to this lottery game, what could we expect in the long run in terms of winning or losing? So I'm going to go to my Google Sheet spreadsheet once again. And my Google Sheet spreadsheet. Remember, we're on the two variable stats tab. We have column A and B. We have very little data to type in. Make sure your first column includes your data values only. Data values or possible outcomes go in the first column. Probabilities will go in the second column. So give the spreadsheet time to calculate. It's going to take some time. When it's ready, look over on the column R and you'll see that you get minus point 85 minus point 85 minus point 85. So what this means is in the long run, one would expect to lose 85 cent in the long run. That's what one would expect to lose. So if you're to keep playing and playing and playing and playing indefinitely, the average would be a loss of 85 cent. And actually, when you have a negative expected value, that means the game was not designed in favor of the player, the creator of the game, the one making the money from it is the one that is benefiting from that. So negative expected values are bad when you're the player. You do not want to do that. So that's all I have for now. Thanks for watching.