TSE.
MathematicsFinanceHealthPhysicsEngineeringBrowse all

Mathematics · Probability · Probability Distributions

Expected Value Calculator

Calculate the expected value (mean) of a discrete probability distribution by summing the products of outcomes and their probabilities.

Calculator

Advertisement

Formula

E(X) is the expected value, x_i is the i-th outcome, P(x_i) is the probability of the i-th outcome, and n is the total number of outcomes. All probabilities must sum to 1.

Source: Standard probability theory; DeGroot & Schervish, Probability and Statistics, 4th ed.

How it works

To compute the expected value, each possible outcome is multiplied by its corresponding probability, and the resulting products are summed across all outcomes. This calculator supports up to five discrete outcome-probability pairs; leave unused rows blank and they will be treated as zero contributions.

Two bonus outputs — variance and standard deviation — are also computed. Variance is the probability-weighted average of squared deviations from E(X), giving a measure of spread. Standard deviation is the square root of variance, expressed in the same units as the outcomes.

Worked example

A game pays $1 with probability 0.20, $2 with probability 0.30, $3 with probability 0.25, $4 with probability 0.15, and $5 with probability 0.10.

E(X) = (1)(0.20) + (2)(0.30) + (3)(0.25) + (4)(0.15) + (5)(0.10) = 0.20 + 0.60 + 0.75 + 0.60 + 0.50 = 2.65. The probability sum equals 1.00, confirming a valid distribution. Variance = (1−2.65)²(0.20) + (2−2.65)²(0.30) + … = 1.4275, and standard deviation = 1.1948.

Limitations & notes

This calculator handles only discrete probability distributions with up to five outcomes. For continuous distributions (e.g., normal, exponential), E(X) requires integration and a different tool. All entered probabilities must sum to exactly 1 for the result to be meaningful; the calculator displays the probability sum so you can verify this. Outcomes must be finite real numbers — the formula does not converge for distributions with infinite expected values such as the Cauchy distribution.

Frequently asked questions

What does the expected value actually represent?

It is the long-run average outcome if the random experiment were repeated a very large number of times. It does not necessarily equal any single possible outcome.

Do my probabilities have to sum to exactly 1?

Yes — a valid probability distribution requires all probabilities to sum to 1. The calculator displays the sum so you can catch any input errors.

Can outcomes be negative numbers?

Absolutely. Outcomes can be any real numbers, including negative values, which is common when modelling losses or net payoffs.

What if I only have two or three outcomes?

Simply leave the unused outcome and probability fields blank; they default to zero and contribute nothing to the sum.

How is expected value different from the median or mode?

The expected value is a probability-weighted mean and can be pulled by extreme outcomes, while the median splits the distribution at 50% and the mode is simply the most frequent outcome. For skewed distributions these three measures can differ significantly.

Last updated: 2025-01-15 · Formula verified against primary sources.