Expected Value: Meaning and Calculation | Free Discrete Mathematics Lesson (4 College Credits) | UPI Study

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

← Random Variables in Discrete ProbabilityNext lesson: Theoretical Discrete Probability Distributions →

Earn 4 college credits for Discrete MathematicsRecommended for credit by NCCRS · Math 230 · self-paced · one payment, lifetime access

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.

Why take it here

Why students take Discrete Mathematics with UPI Study

The math behind computer scienceDiscrete Mathematics is the mathematics of computer science: logic, proofs, sets, counting, probability and graphs underpin algorithms, data structures, cryptography and databases. Completing it now lets you qualify for those courses at your university.
Credit at a fraction of the priceThe same 4 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

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.

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?
Multiply each possible value of X by its probability and add the products: E(X) = \sum x\,P(x), summed over every value X can take. For example, rewards of 0, 10, and 100 coins with probabilities 0.6, 0.3, and 0.1 give 0(0.6)+10(0.3)+100(0.1)=13 coins.
Does an expected value of 13 mean I will get 13 on a single trial?
No, E(X) is not a prediction for any single trial. It is the long-run average over many repeated trials. A level that pays only 0, 10, or 100 coins can never pay exactly 13. The running average settles toward 13 as trials accumulate, though it need not land exactly on it.
How do you find the expected value of a raffle ticket or other game of chance?
Let X be the net gain, meaning the prize minus the cost to play, then compute E(X) as usual. A raffle with 100 tickets at $5 and one $200 prize gives 195\cdot\frac{1}{100} + (-5)\cdot\frac{99}{100} = -3. The average result is a loss of $3 per ticket.
How is expected value used to price insurance?
An insurer treats its net gain per policy as a random variable: the premium is certain, and the payout is usually zero but occasionally large. With a $120 premium, a 0.02 chance of a $3000 payout, and 0.98 chance of no claim, E(X)=120(0.98)+(-2880)(0.02)=60. The insurer expects about $60 profit per policy.

About the Discrete Mathematics course

How many college credits is Discrete Mathematics?
Discrete Mathematics (Math 230) carries a NCCRS credit recommendation for 4 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Discrete Mathematics cost and what is included?
$250, paid once, with lifetime access: all 87 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Discrete Mathematics take?
It is self-paced with no deadlines. The 87 lessons total about 13 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

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.

Discrete Mathematics
4 credits · NCCRS
Enroll →