UPI Study › Courses › Discrete Mathematics › Free lessons › Lesson 6.2 Free with a free account
Expected Value: Meaning and Calculation
Discrete Mathematics · Chapter 6: Random Variables and Expected ValueSection 6.2 · lesson 36 of 878 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Discrete Mathematics.
Lesson complete
Earn the 4 college credits for Discrete Mathematics
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Theoretical Discrete Probability Distributions →← Random Variables in Discrete ProbabilityNext lesson: Theoretical Discrete Probability Distributions →
In this lesson
The long-run average of a random variable.
- Compute E(X) as a probability-weighted average
- Interpret E(X) as a long-run average, not a prediction
- Set up net gain for a game of chance
- Apply the same calculation to insurance pricing
Transcript
Everything said in the video, section by section (1,123 words). Read along, or search it.
Random Variables and Expected Value
Expected Value: Meaning and Calculation
This section is about expected value, the long-run average of a random variable. We'll compute it, and we'll be precise about what that number does and doesn't mean. Then we'll apply the same calculation to a game of chance, and to insurance pricing.
The Opening Problem
What Does a Level Pay, On Average?
A mobile game rewards each completed level with a random number of bonus coins. Most of the time a little, occasionally a moderate amount, and rarely a large jackpot. A player who completes one level can't predict what that single reward will be. But a game designer setting up an in-game economy cares about a different question. So does a player deciding whether grinding levels is worth the time. Across thousands of level completions, what does the reward average out to? That single number, the long-run average outcome of a random variable, is its expected value, written E of X. This section takes the probability distribution as given. Building distributions from theory, or from data, comes in sections six point three and six point four.
Definition
Expected Value
Here's the definition. For a discrete random variable X, with probability distribution P of x, the expected value of X is the sum of x times P of x. The sum runs over every possible value X can take. Each value is weighted by how likely it is, and the weighted values are added together.
Worked Example 1
Expected Bonus Coins
Back to the game. A completed level awards zero coins with probability zero point six, ten coins with probability zero point three, and one hundred coins with probability zero point one. Multiply each value by its probability, and add. Zero times zero point six is zero. Ten times zero point three is three. And one hundred times zero point one is ten. So the expected value is thirteen bonus coins per level.
What Expected Means
A Long-Run Average, Not a Prediction
Now, what does expected mean here? No single level can ever award exactly thirteen coins. The only possible rewards are zero, ten, and one hundred. That's not a contradiction. E of X isn't a prediction about any one trial. It's a statement about the average across many trials. If the level were completed a large number of times, and every reward recorded, the running average would settle closer and closer to thirteen. Early on, the average swings widely. A single one-hundred-coin reward in the first few trials can dominate it. But as trials accumulate, the swings shrink. That's guaranteed by a result called the law of large numbers, whose proof is beyond this section.
Figure 2
E(X) as a Balance Point
The formula is a weighted average in the ordinary sense. It's the same kind of calculation as averaging exam scores that count for different percentages of a grade. Here, the weights are probabilities. This picture shows it as a balance point. Each possible value sits on a number line, with a weight whose size reflects its probability. E of X, thirteen, is exactly where the line would balance on a fulcrum, if the weights were physical. The heavier probabilities pull the balance point toward them. That's why thirteen sits much closer to zero than to one hundred, even though one hundred is the largest possible value.
Simulating It
3,000 Level Completions
Here's a simulation of three thousand level completions, drawing each reward with the right probabilities. The running average after one hundred completions is eight point eight. After one thousand, it's thirteen point three. And after three thousand, twelve point six one. The theoretical expected value, computed the same way as by hand, prints thirteen. So the average approaches thirteen as trials accumulate, though it need not land on it exactly.
Worked Example 2
Net Gain From a Raffle Ticket
Games of chance are a natural setting for expected value. The relevant random variable is usually a net gain, the prize won minus what was paid to play, not the prize alone. A raffle sells one hundred tickets at five dollars each. Exactly one ticket, drawn at random, wins a two hundred dollar prize. Let X be the net gain for one ticket. With probability one in one hundred, the ticket wins. Its net gain is two hundred minus five, one hundred ninety-five dollars. With probability ninety-nine in one hundred, it loses, and the net gain is minus five dollars. So E of X is one hundred ninety-five hundredths, minus four hundred ninety-five hundredths. That's minus three dollars per ticket. On average, across many tickets, a player loses three dollars each. That matches the raffle taking in five hundred dollars, and paying out two hundred. The three hundred dollar difference is spread across the tickets.
Worked Example 3
An Insurer's Expected Net Gain
Insurance pricing uses exactly the same calculation, from the insurer's side. The premium collected is certain. The payout is a random variable, usually zero, and occasionally large. An insurer sells a one-year device protection policy for a one hundred twenty dollar premium. Historical data, taken as given, show a zero point zero two probability that the device fails, requiring a three thousand dollar payout. Otherwise the insurer pays nothing. With probability zero point nine eight, there's no claim, and the insurer nets one hundred twenty dollars. With probability zero point zero two, it nets one hundred twenty minus three thousand, which is minus two thousand eight hundred eighty. So E of X is one hundred seventeen dollars sixty, minus fifty-seven dollars sixty. That's sixty dollars per policy. Across many policies, the insurer expects to net sixty dollars each. That's the structural reason an insurer can expect to profit.
Side by Side
3 Expected Value Calculations
Here are the three calculations side by side. In the game, X is bonus coins earned, and the expected value is thirteen coins, the average bonus per level over many completions. For the raffle, X is the buyer's net dollars. The expected value is minus three dollars, the average result per ticket, over many entries. For the insurance policy, X is the insurer's net dollars. The expected value is sixty dollars, the average profit per policy, over many policies sold.
Takeaways
Weight Each Value, Then Add
To summarize. The expected value is a probability-weighted average. Each possible value is weighted by how likely it is, and the weighted values are summed. It describes a long-run average across many repeated trials, not a prediction for any single trial. It need not equal any value X can actually take. In games of chance, the right random variable is usually the net gain. And from an insurer's side, the same calculation typically gives a positive expected value. Here's something to think about. From the policyholder's side, the expected net value is about minus sixty dollars per policy. Does that make buying it always a bad decision? Think about someone who buys exactly one policy, not thousands. What does long-run average actually describe for them? And what does the size of the possible loss, three thousand dollars against a one hundred twenty dollar premium, suggest about whether expected value is the only thing worth considering?
About Discrete Mathematics at UPI Study
Discrete Mathematics (Math 230) is a self-paced online course of 87 video lessons in 13 chapters, from logic and proof to counting, probability, graph theory and trees. It carries a NCCRS credit recommendation for 4 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus Every course with PRO →
Why take it here
Why students take Discrete Mathematics with UPI Study
Where the credit goes
Universities that work with NCCRS
Discrete Mathematics carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Expected Value: Meaning and Calculation
How do you calculate the expected value of a discrete random variable?
Does an expected value of 13 mean I will get 13 on a single trial?
How do you find the expected value of a raffle ticket or other game of chance?
How is expected value used to price insurance?
About the Discrete Mathematics course
How many college credits is Discrete Mathematics?
How much does Discrete Mathematics cost and what is included?
Which universities accept UPI Study credits?
How long does Discrete Mathematics take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 4 credits in Discrete Mathematics.
87 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
4 credits · NCCRSEnroll →