Presets:
DescriptionValueProbability

Expected value (denoted E(X) or μ) is the long-run average value of a random variable. It represents what you expect to happen on average after many repetitions of the same random process. The concept dates back to Blaise Pascal and Pierre de Fermat's correspondence in the 17th century, which laid the foundation for probability theory. An expected value calculator computes this fundamental quantity for any discrete probability distribution.

The Expected Value Formula

E(X) = Σ(xi × pi)

To calculate expected value, multiply each possible outcome by its probability of occurring, then sum all those products. The result is a weighted average where the weights are probabilities. For example, the expected value of a fair six-sided die is (1+2+3+4+5+6)/6 = 3.5 — you can never roll 3.5, but over many rolls the average will converge to this value. This is the law of large numbers in action: the more trials you run, the closer the sample average gets to the theoretical expected value.

Variance and Standard Deviation

Variance measures how spread out the distribution is around the expected value. The formula is:

Var(X) = Σ((xi − μ)2 × pi)

Standard deviation is the square root of variance, expressed in the same units as the original values. While expected value tells you the center of the distribution, standard deviation tells you how much individual outcomes typically differ from that center. A smaller standard deviation means values cluster tightly around the mean; a larger one means they spread out widely. Both expected value and variance are essential for understanding risk and uncertainty in any probabilistic scenario.

Worked Example: Fair Die

For a fair six-sided die, each face 1 through 6 has probability 1/6. The expected value calculation is: E(X) = 1(1/6) + 2(1/6) + 3(1/6) + 4(1/6) + 5(1/6) + 6(1/6) = 21/6 = 3.5. The variance calculation is: Var(X) = Σ((x − 3.5)² × 1/6) = (6.25 + 2.25 + 0.25 + 0.25 + 2.25 + 6.25) / 6 = 17.5/6 ≈ 2.917. The standard deviation is √2.917 ≈ 1.708. This means a single die roll is typically about 1.7 units away from the average of 3.5.

Applications of Expected Value

Expected value in gambling is perhaps its most famous application. Casino games are designed so the house has a positive expected value on every bet, ensuring profitability over millions of plays. For example, in American roulette, betting $1 on red has an expected value of −$0.0526 — you lose about 5.26 cents per dollar bet on average. Understanding expected value explains why gambling is a losing proposition in the long run.

Expected value in finance is used to evaluate investments, insurance policies, and risk management strategies. An investment with a higher expected return might be chosen despite higher variance (risk). The expected value vs actual value comparison is central to portfolio theory and the capital asset pricing model (CAPM).

Expected value in business helps with decision-making under uncertainty. Companies calculate the expected profit from launching a new product, the expected cost of a project delay, and the expected value of customer lifetime value. The EV calculation framework turns uncertainty into actionable numbers by quantifying the probability-weighted outcomes of each possible decision path.

Expected value in science and medicine appears in clinical trials (expected effect size), epidemiology (expected number of cases), and quality control (expected number of defects). The concept is so fundamental that it appears in virtually every field that deals with data and uncertainty.

Properties of Expected Value

  • Linearity: E(aX + b) = aE(X) + b. This holds even if X and Y are dependent.
  • Sum of variables: E(X + Y) = E(X) + E(Y). Always true, regardless of dependence.
  • Product of independent variables: E(XY) = E(X)E(Y) only if X and Y are independent.
  • Constant: E(c) = c for any constant c.

Linearity of expectation is one of the most powerful tools in probability. It allows you to break complex random variables into simpler components, calculate each expected value separately, and add the results. This property holds even when the components are correlated, which makes it invaluable for problems that would otherwise be intractable.

Law of Large Numbers

The law of large numbers (LLN) states that as the number of independent trials increases, the sample average converges in probability to the expected value. This is the theoretical foundation for the insurance industry, quality control sampling, and opinion polling. The weak law of large numbers says the probability that the sample average deviates from the expected value by more than any fixed amount approaches zero as the sample size grows. The strong law of large numbers goes further: the sample average almost surely converges to the expected value.

The law of large numbers is why casinos are profitable, why insurance companies can price policies accurately, and why opinion polls with enough respondents can predict election outcomes. But the law requires truly independent trials with the same underlying distribution — a condition that is often violated in real-world financial markets (where past returns influence future returns) and in gambling systems that rely on the gambler's fallacy (the mistaken belief that past outcomes affect future probabilities).

Common Mistakes

  • Confusing expected value with most likely value: The expected value is a weighted average, not necessarily a value that can actually occur. The most likely outcome (mode) may be different from the expected value.
  • Ignoring variance: Two investments can have the same expected return but very different risk profiles. Always consider variance alongside expected value for informed decisions.
  • Misapplying the law of large numbers: The LLN requires many independent trials. Short-term results can and do deviate from expected values — the gambler's fallacy incorrectly assumes that deviations must be corrected soon.
  • Forgetting that probabilities must sum to 1: The sum of all probabilities in a valid distribution must equal exactly 1 (or 100%). Our calculator validates this automatically.
Can expected value be zero?
Yes. A fair game has an expected value of zero — neither player nor house has an advantage. This is called a "fair game" or "zero-sum game."
What does expected value tell us?
Expected value tells us the long-run average outcome. For a single trial, the actual result will almost certainly differ from the expected value, but over many trials the average converges to E(X).
How is variance different from expected value?
Expected value measures the center of a distribution (where outcomes tend to cluster), while variance measures the spread (how far outcomes scatter from the center).
What is the expected value of a lottery ticket?
Generally negative. Most lottery tickets have an expected value well below the ticket price — often returning only 40-60 cents per dollar spent. The huge jackpot masks the low probability of winning.
Do probabilities have to sum to 1?
Yes. For a valid probability distribution, all probabilities must sum to exactly 1 (or 100%). If they don't, the expected value calculation will be incorrect.
Key Formulas

E(X) = Σ x×p

Var(X) = Σ (x−μ)²×p

σ = √Var(X)

E(aX+b) = aE(X)+b

Properties

Linearity: Holds always

E(X+Y): E(X)+E(Y)

LLN: Sample avg → E(X)