Expected Value Calculator

This expected value calculator needs one value and its probability per line, the rest is done for you. Example: −1 with 50 %, 2 with 30 % and 10 with 20 % give E(X) = 2.1 and a standard deviation of 4.16.

Source: Wikipedia – Erwartungswert. Updated: .

One value x and its probability p per line, separated by a space. p as a decimal (0.25), fraction (1/4) or percent (25 %).
Divides every p by their sum, useful for relative frequencies or rounded values.
My ToolboxYour inputs are saved in this browser only.

Result

Result
E(X) = 2.1 · Variance = 17.29 · Standard deviation σ = 4.15812
Calculation table
xpx · px² · p
-10.5-0.50.5
20.30.61.2
100.2220
Sum12.121.7
Steps
  • Expected value E(X) = Σ xᵢ·pᵢ = 2.1 (sum of the column x · p).
  • E(X²) = Σ xᵢ²·pᵢ = 21.7 (sum of the column x² · p).
  • Variance Var(X) = E(X²) − E(X)² = 21.7 − (2.1)² = 17.29.
  • Standard deviation σ = √Var(X) = √17.29 = 4.15812.
The expected value is the average you can expect in the long run, not the most likely value. For a game with a stake, E(X) = 0 means a fair game.

How it is calculated

The expected value of a random variable is the probability-weighted mean of all possible values: E(X) = Σ xᵢ·pᵢ. It tells you which average you get over very many repetitions. Variance and standard deviation show how strongly the values scatter around it.

How it is calculated

Each value x has a probability p, and all p add up to 1. Multiply each value by its probability and add: for −1 (50 %), 2 (30 %) and 10 (20 %), E(X) = −0.5 + 0.6 + 2 = 2.1. The variance is Var(X) = E(X²) − E(X)², here 21.7 − 4.41 = 17.29, and the standard deviation σ = √17.29 ≈ 4.16. For a fair die with values 1 to 6 at 1/6 each, E(X) = 3.5, Var(X) = 35/12 ≈ 2.92 and σ ≈ 1.71.

Input and normalising

Probabilities may be written as decimals, fractions (1/6) or percent (16.7 %). If they do not add up to exactly 1 because of rounding, the calculator tolerates a small deviation; for relative frequencies or weights “Normalise probabilities” divides every value by their sum.

Frequently asked questions

How do you calculate the expected value?

Multiply each possible value by its probability and add all products: E(X) = x₁·p₁ + x₂·p₂ + … For a die that is (1 + 2 + … + 6) / 6 = 3.5.

What does an expected value of 0 mean in a game?

In the long run the average gain is zero: wins and losses balance out. This is called a fair game. A negative expected value means a loss on average.

How are expected value, variance and standard deviation related?

The variance is the expected squared deviation from the expected value, Var(X) = E(X²) − E(X)². The standard deviation is its square root and has the same unit as X.

Sources and legal basis

As of: · Editorial policy

Related tools