Skip to content

Expected Value Calculator

List the possible outcomes with their probabilities — decimals, percentages or fractions such as 1/6 — or with how often each occurred, and get the expected value E(X), the variance and the standard deviation, with a working table. The calculator checks that your probabilities add up to 1 and loads worked examples for a dice game, an insurance policy and a lottery ticket.

The second number on each line is

0 outcomes read. Probabilities can be decimals (0.25), percentages (25%) or fractions (1/4). Words before the numbers are ignored, so you can label each line.

Try an example

Enter at least two outcomes, one per line.

How to Use the Expected Value Calculator

  1. 1. Choose probabilities or frequencies. Use probabilities for a theoretical distribution, and frequencies when you have counts — the calculator divides them by their total.
  2. 2. Enter one outcome per line. The value first, then its probability or frequency: 3, 1/6. Words in front of the numbers are ignored, so a line can read Win: roll a six, 3, 1/6.
  3. 3. Read E(X), the variance and the SD. If the probabilities do not add up to 1, the calculator says so instead of producing a misleading answer; a sum within 0.01 of 1 is accepted as rounding.
  4. 4. Follow the table. Each row shows x × P(x) and (x − μ)² × P(x); their column totals are the expected value and the variance.

Expected Value, Variance and Standard Deviation

Expected value

E(X) = μ = Σ x × P(x)

Variance

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

Standard deviation

SD(X) = √Var(X)

The expected value weights each outcome by how likely it is. For it to make sense, every probability must lie between 0 and 1 and together they must add up to exactly 1 — every possible outcome listed once. The variance measures how far outcomes typically fall from the expected value, so it is a measure of risk: two bets can have the same E(X) and very different spreads.

With frequencies, each count is divided by the total to give an empirical probability. If 20 families have 0, 1, 2 or 3 children with counts 4, 9, 5 and 2, the probabilities are 0.2, 0.45, 0.25 and 0.1, and E(X) = 1.25 children, with an SD of 0.8874 — a reminder that the expected value need not be a value that can actually happen.

Three Worked Examples

ExampleOutcomesE(X)SD(X)
Dice gameWin $3 with probability 1/6; lose $1 with probability 5/6−$0.33$1.49
Insurance, insurer's viewKeep a $200 premium with probability 0.998; pay out $49,800 net with probability 0.002+$100$2,233.83
Lottery ticketWin $499 net with probability 0.001; lose the $1 stake with probability 0.999−$0.50$15.80

The dice game. You pay $1 to roll a die and win $4 on a six, a net gain of $3. E(X) = 3 × 1/6 + (−1) × 5/6 = −1/3, so you lose about 33 cents per game on average. Play 600 times and you should expect to be down about $200.

The insurance policy. An insurer charges $200 a year for a policy that pays $50,000 with probability 0.2%. Its expected profit is 200 × 0.998 + (−49,800) × 0.002 = $100 per policy — so for the customer the expected value is −$100. Buying can still be rational: the customer trades a small, certain loss for protection against a large one, and the SD of $2,233.83 is the risk being handed over.

The lottery ticket. A $1 pick-three ticket wins $500 if your three digits come up — a 1-in-1,000 chance. E(X) = 499 × 0.001 + (−1) × 0.999 = −0.50: on average, half of every dollar staked is lost.

Frequently Asked Questions

How do you calculate expected value?
Multiply each possible outcome by its probability and add the products: E(X) = Σ x × P(x). For a fair six-sided die, E(X) = (1 + 2 + 3 + 4 + 5 + 6) × 1/6 = 3.5. The working table above shows each product for your own distribution.
Can the expected value be negative?
Yes. A negative expected value means that, on average over many repetitions, you lose — typical of casino games and lotteries, where the operator builds in an edge. Its sign depends on how you define the outcomes: the insurer's +$100 is the customer's −$100.
What is the difference between the expected value and the mean?
The expected value is the mean of a probability distribution — the long-run average you would get from infinitely many trials. The sample mean is the average of the data you actually observed. By the law of large numbers, the sample mean of many independent trials gets closer and closer to the expected value.
Do the probabilities have to add up to 1?
Yes. A valid probability distribution lists every possible outcome exactly once, so the probabilities must sum to 1. If yours do not, an outcome is missing, one is double-counted, or the numbers are really counts — in which case switch to frequencies and the calculator will convert them.
How do you find the variance of a probability distribution?
Square each outcome's distance from the expected value, multiply by its probability, and add: Var(X) = Σ (x − μ)² × P(x). A shortcut gives the same answer: Var(X) = Σ x² × P(x) − μ². The standard deviation is the square root of the variance, in the same units as the outcomes.
Why do people buy lottery tickets if the expected value is negative?
Expected value describes the long-run average, and people do not decide on averages alone. A lottery offers a small chance of a life-changing sum for a trivial stake, and insurance removes a ruinous loss for a predictable cost. Decision theory captures this with utility — valuing outcomes by their consequences rather than their face value.

Related Tools

More in Statistics Calculators

See all Statistics Calculators