What is the expected value?
List each outcome with its probability to find the expected value, the long-run average you can expect per trial, with its spread.
- Expected value E(X)
- 0.5
The expected value is 0.5, with a standard deviation of 5.220153.
- Variance σ²
- 27.25
- Standard deviation σ
- 5.220153
- Outcomes
- 3
Expected value E(X): 0.5. The expected value is 0.5, with a standard deviation of 5.220153.
How to calculate
Computes the expected value (mean), variance, and standard deviation of a discrete random variable from its outcomes and their probabilities.
Example with the default inputs (Outcomes and probabilities [Value (x) 10, Probability P(x) 1/5; Value (x) 0, Probability P(x) 1/2; Value (x) -5, Probability P(x) 3/10]): The expected value is 0.5, with a standard deviation of 5.220153.
Method: E(X) = μ = Σ x × P(x); σ² = Σ (x − μ)² × P(x); σ = √σ².
- Each probability is from 0 to 1, and together they add up to exactly 1.
- The sums are exact on the decimals and fractions you type, then rounded once for display.
Worked examples
Each example is checked against the calculator on every build.
- Outcomes and probabilities 10 0.2; 0 0.5; -5 0.3 gives Expected value E(X) 0.5, Variance σ² 27.25, Standard deviation σ 5.220153.Source: OpenStax, Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation. https://openstax.org/books/introductory-statistics-2e/pages/4-2-mean-or-expected-value-and-standard-deviation
- Outcomes and probabilities 0 0.2; 1 0.5; 2 0.3 gives Expected value E(X) 1.1, Variance σ² 0.49, Standard deviation σ 0.7.Source: OpenStax, Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation. https://openstax.org/books/introductory-statistics-2e/pages/4-2-mean-or-expected-value-and-standard-deviation, Example 4.3 (μ = 1.1, σ = 0.7)
- Outcomes and probabilities -2 0.99999; 100000 0.00001 gives Expected value E(X) -0.99998.Source: OpenStax, Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation. https://openstax.org/books/introductory-statistics-2e/pages/4-2-mean-or-expected-value-and-standard-deviation, Example 4.5 (−1.99998 + 1 = −0.99998)
- Outcomes and probabilities 1 1/6; 2 1/6; 3 1/6; 4 1/6; 5 1/6; 6 1/6 gives Expected value E(X) 3.5, Variance σ² 2.916667, Standard deviation σ 1.707825.Source: OpenStax, Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation. https://openstax.org/books/introductory-statistics-2e/pages/4-2-mean-or-expected-value-and-standard-deviation
How it works
A discrete random variable X takes the values x₁, x₂, …, xₙ with probabilities P(x₁), P(x₂), …, P(xₙ). Enter one row per value.
- Expected value: μ = E(X) = Σ x × P(x).
- Variance: σ² = Σ (x − μ)² × P(x).
- Standard deviation: σ = √σ².
- Outcomes: the number of rows.
Rules
- Each value is a number from −10¹⁵ to 10¹⁵. It may be negative (a loss) or 0.
- Each probability is a decimal (0.25) or a fraction (1/4), from 0 to 1. A probability outside 0 to 1 has no answer, and the message names its row.
- The probabilities must add up to exactly 1. Otherwise there is no answer, and the message shows their total (as a decimal with up to 10 significant digits).
- There are 1 to 50 rows. A row with probability 0 counts in the number of outcomes but adds nothing to the sums.
- The sums are exact on the decimals and fractions as typed (0.1 is exactly one tenth), then rounded once to the nearest 64-bit float. The standard deviation is the square root of that variance.
- Results show up to 6 decimal places (6 significant digits below 0.0001), with halves rounded up.
Worked examples by hand
The default game. Win $10 with probability 0.2, $0 with 0.5, lose $5 with 0.3. μ = 10 × 0.2 + 0 × 0.5 + (−5) × 0.3 = 2 + 0 − 1.5 = 0.5. σ² = (10 − 0.5)² × 0.2 + (0 − 0.5)² × 0.5 + (−5 − 0.5)² × 0.3 = 18.05 + 0.125 + 9.075 = 27.25, so σ = √27.25 = 5.220153.
Soccer days per week (OpenStax Example 4.3). Values 0, 1, 2 with probabilities 0.2, 0.5, 0.3. μ = 0 + 0.5 + 0.6 = 1.1. σ² = 1.21 × 0.2 + 0.01 × 0.5 + 0.81 × 0.3 = 0.242 + 0.005 + 0.243 = 0.49, so σ = 0.7.
A $2 game with a $100,000 prize (OpenStax Example 4.5). −2 × 0.99999 + 100,000 × 0.00001 = −1.99998 + 1 = −0.99998.
One roll of a fair die. Values 1 to 6, each with probability 1/6. μ = (1 + 2 + 3 + 4 + 5 + 6) ÷ 6 = 21 ÷ 6 = 3.5. σ² = (6.25 + 2.25 + 0.25 + 0.25 + 2.25 + 6.25) ÷ 6 = 17.5 ÷ 6 = 35/12 = 2.916667, so σ = 1.707825.
Other questions people ask
What is expected value?
The expected value is the average result you would get per trial if you repeated a random experiment many times. It weights each possible value by its probability, so a rare big win counts less than a common small loss.
How do I calculate expected value?
Multiply each value by its probability and add the products: E(X) = Σ x × P(x). A game that pays $10 with probability 0.2, $0 with probability 0.5, and −$5 with probability 0.3 has E(X) = 2 + 0 − 1.5 = $0.50.
Do the probabilities have to add up to 1?
Yes. The rows must list every possible outcome once, so their probabilities add up to exactly 1. If they do not, the calculator shows the total so you can find the mistake. Use fractions such as 1/6 or 1/3 when a decimal would not add up exactly.
Can the expected value be a value that never happens?
Yes. One roll of a die has an expected value of 3.5, which no roll can show. It is an average over many rolls, not a prediction of one.
What does a negative expected value mean?
A negative expected value means you lose on average. A $2 ticket with a 0.00001 chance of winning $100,000 has an expected value of about −$1 per play, so a player loses about a dollar a game in the long run.
What do the variance and standard deviation tell me?
They measure how far results typically land from the expected value. Two bets can have the same expected value, but the one with the larger standard deviation has bigger swings from game to game.