Expectation in Probability: What It Is and How It Works

In probability, the expected value (or expectation) of a random variable is the weighted average of all its possible outcomes, where each outcome is weighted by how likely it is to occur. It’s often written as E(X) or denoted by the Greek letter μ. Think of it as the long-run average result you’d get if you could repeat an experiment over and over, infinitely many times.

The Core Idea

Expected value answers a simple question: if you repeated a random process many times, what would the average result settle on? The classic example is rolling a standard six-sided die. Each face (1 through 6) has a 1-in-6 chance of appearing. To find the expected value, you multiply each outcome by its probability, then add everything up:

(1 × 1/6) + (2 × 1/6) + (3 × 1/6) + (4 × 1/6) + (5 × 1/6) + (6 × 1/6) = 3.5

The expected value of a die roll is 3.5. You’ll never actually roll a 3.5, and that’s fine. Expected value doesn’t have to be a possible outcome. It represents the center of gravity of all outcomes, the number your average would converge toward after thousands of rolls.

How to Calculate It

The formula depends on whether your random variable is discrete (countable outcomes, like a die or a coin flip) or continuous (a measurement that can take any value in a range, like someone’s height).

For a discrete random variable, you sum up each possible value multiplied by its probability:

E(X) = Σ x · P(X = x)

That’s the same process used in the die example. List every outcome, multiply each by its probability, and add them together.

For a continuous random variable, the logic is identical, but the sum becomes an integral because there are infinitely many possible values packed into a range. Instead of a list of probabilities, you work with a probability density function, a curve whose area under any segment tells you how likely values in that segment are. The expected value is:

E(X) = ∫ x · f(x) dx

In both cases, the idea is the same: weight each possible value by how likely it is, then combine.

Key Properties That Make It Useful

Expected value follows a set of rules that make it surprisingly easy to work with, even when the underlying probabilities are complicated.

The most important is linearity of expectation. If you have two random variables X and Y, the expected value of their sum is simply the sum of their expected values:

E(X + Y) = E(X) + E(Y)

This holds regardless of whether X and Y are related to each other. It doesn’t matter if they’re independent or dependent. If you know the expected tip from a Monday customer is $3 and the expected tip from a Tuesday customer is $7, the expected total from both is $10, no further information needed.

Scaling works just as naturally. If you multiply a random variable by a constant or add a fixed number, the expected value follows along:

E(aX + b) = a · E(X) + b

So if your average monthly sales are 200 units and each unit earns $5 with a $100 fixed cost, your expected monthly revenue is 5 × 200 + 100 = $1,100. These properties combine, letting you break complicated expressions into manageable pieces: E(aX + bY + c) = a · E(X) + b · E(Y) + c.

Why It Equals the Long-Run Average

The intuition that expected value represents what “typically happens” over many trials isn’t just hand-waving. It’s backed by one of the most fundamental results in probability: the Law of Large Numbers.

The theorem says that if you repeat an experiment independently many times and compute the running average of your results, that average will get closer and closer to the expected value as the number of trials grows. More precisely, the probability that your running average deviates from the expected value by any amount, no matter how small, approaches zero as the number of trials goes to infinity.

This is why casinos can predict their profits, even though any individual hand of blackjack is unpredictable. Over millions of hands, the average payout per hand converges reliably to the expected value. It’s also why the expected value is sometimes called the population mean: if you could sample every member of a population, the average you’d compute is exactly E(X).

Where Expected Value Shows Up in Practice

Insurance

Insurance companies calculate the expected value of the claims they’ll need to pay out. If there’s a 1% chance a policyholder files a $50,000 claim in a given year, the expected payout for that policy is $500. Premiums are then set above that expected value to cover operating costs and build in a margin. This is why premiums always exceed the expected loss from the insurer’s perspective: they need to charge more than the mathematical average to stay solvent.

Investing

Portfolio managers estimate the expected return of an investment portfolio by taking a weighted average of the expected returns of each individual asset. If 60% of your portfolio is in a stock expected to return 8% and 40% is in a bond expected to return 3%, the expected portfolio return is (0.60 × 8%) + (0.40 × 3%) = 6%. Of course, expected return alone doesn’t capture risk. Two portfolios with the same expected return can have very different levels of volatility, which is why investors also care about variance and correlation between assets.

Everyday Decisions

You use expected value reasoning informally all the time. Deciding whether to carry an umbrella involves an implicit calculation: the probability of rain times the cost of getting wet versus the inconvenience of carrying it. Any decision under uncertainty can be framed this way, by assigning values and probabilities to possible outcomes and comparing the weighted averages.

When Expected Value Breaks Down

Expected value is powerful, but it has limits. The most famous illustration is the St. Petersburg Paradox, a thought experiment from the 18th century. A coin is flipped repeatedly until it lands tails. If the first tails appears on flip n, you win $2^n. So heads-then-tails wins you $4, heads-heads-tails wins $8, and so on.

When you calculate the expected value, each possible outcome contributes $1 to the total (because the prize doubles as the probability halves), and there are infinitely many outcomes. The expected value is infinite. By pure expected-value logic, you should pay any amount to play this game.

Nobody would actually pay $1,000 to play, let alone a million. This reveals that expected value alone doesn’t capture how people make decisions. The practical issue is that extremely large payoffs with extremely small probabilities get full weight in the calculation but almost never occur. Any real-world version of the game has a finite bankroll, which caps the possible prizes and makes the expected value finite. The paradox helped motivate the concept of expected utility, where the subjective value of money diminishes as amounts grow larger, better reflecting how humans actually weigh risk.

A Brief Origin Story

The concept traces back to 1654, when Blaise Pascal and Pierre de Fermat exchanged a series of letters about a gambling problem: if a game of chance is interrupted before either player wins, how should the pot be divided fairly? The puzzle, known as the “problem of points,” had been floating around since at least 1494, when the Italian mathematician Luca Pacioli posed it in a treatise. Pascal’s solution involved systematically playing out every possible future outcome from the point of interruption, assigning probabilities to each, and working backward to divide the stakes. That process of weighting outcomes by their likelihood is exactly what we now call computing an expected value, and it became the foundation of probability theory.