Expected Value Formula with Worked Examples

#Formula
TL;DR
The expected value formula is E(X)=∑x⋅P(x)E(X) = \sum x \cdot P(x), each outcome multiplied by its probability and added. This article gives five worked examples.
BT
Bhanzu TeamLast updated on November 7, 20266 min read

Key Points

  • The expected value formula is E(X)=∑x⋅P(x)E(X) = \sum x \cdot P(x), summing every outcome multiplied by its probability.

  • It is a weighted average in which the weights are probabilities, so the probabilities must total 1.

  • The expected value is often not an attainable outcome, as a single fair die has an expected value of 3.5.

  • A game is fair when its expected value is zero, meaning neither side profits in the long run.

  • Expected value describes the long-run average over many repetitions, not what will happen on any single trial.

What Is the Expected Value Formula?

The expected value formula gives the long-run average of a random quantity:

E(X)=∑ixi⋅P(xi)E(X) = \sum_{i} x_i \cdot P(x_i)

Each possible value is multiplied by its probability and the products are added. Because the probabilities sum to 1, no separate division is needed.

Why No Division Is Needed

An ordinary weighted mean divides by the total weight. Here the weights are probabilities, and a complete probability distribution always sums to exactly 1.

Dividing by 1 changes nothing, so the formula reduces to a plain sum of xx times P(x)P(x). That is also a useful check: if the probabilities in a problem do not add to 1, something has been missed before any expected value is computed.

The same reasoning explains why expected value is not usually an achievable outcome. It is an average position among the outcomes rather than one of them, in the same way that an average family size of 2.4 children describes no actual family.

Variable Key

Symbol

Meaning

Unit or type

Notes

xix_i

a possible outcome

any unit

often money or a score

P(xi)P(x_i)

its probability

0 to 1

all must sum to 1

E(X)E(X)

expected value

same unit as xx

need not be attainable

∑\sum

sum over all outcomes

operator

every outcome included

Examples of the Expected Value Formula

Example 1

Find the expected value of one roll of a fair six-sided die.

E(X)=16(1+2+3+4+5+6)=216=3.5E(X) = \frac{1}{6}(1+2+3+4+5+6) = \frac{21}{6} = 3.5

Final answer: 3.5

Example 2

A game pays 10 with probability 0.2 and 2 with probability 0.8. Find the expected payout by averaging the two payouts.

Averaging gives 10+22=6\frac{10+2}{2} = 6, which sits between the two values.

But the two outcomes are not equally likely. The payout of 2 happens four times as often as the payout of 10, so the average must sit much closer to 2 than to 10.

Weighting by the probabilities:

E(X)=10(0.2)+2(0.8)=2+1.6=3.6E(X) = 10(0.2) + 2(0.8) = 2 + 1.6 = 3.6

Final answer: 3.6. A plain average ignores the weights, which is exactly what the formula exists to supply.

Example 3

A lottery ticket costs 5. It pays 100 with probability 0.02 and nothing otherwise. Find the expected profit per ticket.

Work with profit, so the winning outcome is 100−5=95100 - 5 = 95 and the losing outcome is −5-5:

E(X)=95(0.02)+(−5)(0.98)=1.9−4.9=−3E(X) = 95(0.02) + (-5)(0.98) = 1.9 - 4.9 = -3

Final answer: a loss of 3 per ticket on average.

A negative expected value means the game favours the operator, which is how lotteries are designed.

Example 4

A fair game charges a stake ss and pays 20 with probability 0.25, otherwise nothing. Find the stake that makes it fair.

A fair game has expected value zero:

(20−s)(0.25)+(−s)(0.75)=0  ⟹  5−0.25s−0.75s=0  ⟹  s=5(20 - s)(0.25) + (-s)(0.75) = 0 \implies 5 - 0.25s - 0.75s = 0 \implies s = 5

Final answer: a stake of 5

Example 5

A random variable takes values 0, 1 and 2 with probabilities 0.5, 0.3 and 0.2. Find E(X)E(X) and check the distribution.

First confirm the probabilities sum to 1: 0.5+0.3+0.2=10.5 + 0.3 + 0.2 = 1. Then

E(X)=0(0.5)+1(0.3)+2(0.2)=0+0.3+0.4=0.7E(X) = 0(0.5) + 1(0.3) + 2(0.2) = 0 + 0.3 + 0.4 = 0.7

Final answer: 0.7

Expected Value and Its Relatives

Quantity

Formula

What it measures

Expected value

∑xP(x)\sum x P(x)

the long-run average

Sample mean

∑xin\frac{\sum x_i}{n}

the average of observed data

Weighted mean

∑wixi∑wi\frac{\sum w_i x_i}{\sum w_i}

an average with general weights

Variance

∑(x−E(X))2P(x)\sum (x - E(X))^2 P(x)

spread around the expected value

Expected value and sample mean are often confused. The first is a property of a distribution, computed from probabilities; the second is a property of data you actually collected, and it approaches the expected value as the sample grows.

Where Do Students Trip Up on Expected Value?

Mistake 1: Averaging the outcomes without weighting

Where it slips in: Expected value is described as an average, and averaging is normally done by dividing by the count.

Don't do this: E(X)=10+22E(X) = \frac{10+2}{2}

The correct way: E(X)=∑xP(x)E(X) = \sum x P(x), so 10(0.2)+2(0.8)=3.610(0.2) + 2(0.8) = 3.6. Unequal probabilities must pull the answer towards the likelier outcomes.

Students who check that the probabilities sum to 1 before computing anything rarely fall into this, because the act of adding the probabilities makes their inequality obvious. The check costs one line and validates the distribution at the same time.

Mistake 2: Expecting the expected value to be achievable

Where it slips in: The name suggests a value one should expect to see.

Don't do this: Conclude that a die roll of 3.5 is possible because E(X)=3.5E(X) = 3.5.

The correct way: Read it as a long-run average. It is a balance point of the distribution and frequently falls between the attainable outcomes.

Mistake 3: Forgetting the cost in a profit calculation

Where it slips in: The prize is the salient number, and the stake gets handled separately or not at all.

Don't do this: Compute 100(0.02)=2100(0.02) = 2 and call it the expected profit on a 5 ticket.

The correct way: Subtract the cost from each outcome, giving 95 and −5-5 as in Example 3. The sign of the answer then tells you who the game favours.

Key Takeaways

  • The expected value formula is E(X)=∑x⋅P(x)E(X) = \sum x \cdot P(x).

  • It is a weighted average whose weights are probabilities, which is why no division appears.

  • The result is a long-run average and frequently not an attainable outcome.

  • Checking that the probabilities sum to 1 validates the distribution and exposes unequal weights at once.

  • To work through probability with a teacher, explore a high school math tutor or math tutoring.

Practice These Three Before Moving On

Find the expected value of a variable taking 1, 3 and 9 with probabilities 0.5, 0.4 and 0.1. Then find the fair stake for a game paying 50 with probability 0.1, and say whether a game with expected value −2-2 favours the player.

Want a live Bhanzu trainer to walk through more probability problems? Book a free demo class.

Read More

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the expected value formula?
E(X)=∑x⋅P(x)E(X) = \sum x \cdot P(x), each outcome multiplied by its probability and summed.
Why does the expected value formula need no division?
Because the probabilities act as weights and already sum to 1, so the division that a weighted mean would need has no effect.
Can the expected value be an impossible outcome?
Yes, and often is. A fair die has an expected value of 3.5 even though no face shows 3.5.
What does an expected value of zero mean?
That the game is fair: over many repetitions neither player gains or loses on average.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →