Expected Value Calculator (Free, Step-by-Step)
StatisticsFreeNo sign-up
An expected value calculator finds the long-run average of a random variable: multiply each outcome by its probability and add, E(X) = Σ x·P(x). For outcomes 0, 1, 2, 3 with probabilities 0.1, 0.3, 0.4, 0.2, E(X) = 0 + 0.3 + 0.8 + 0.6 = 1.7. Enter your own table below to get E(X), the variance, the standard deviation and every step.
Show steps
- Check that the probabilities add up to 1: 0.1 + 0.3 + 0.4 + 0.2 = 1.
- Multiply each value by its probability and add: E(X) = Σ x·P(x) = (0)(0.1) + (1)(0.3) + (2)(0.4) + (3)(0.2).
- The products are 0, 0.3, 0.8, 0.6. Their sum is E(X) = 1.7 (exactly 17/10).
- Variance: square each distance from the mean and weight it by its probability. σ² = Σ (x − μ)²·P(x) = 0.81. Shortcut check: E(X²) − μ² = 3.7 − 2.89 = 0.81.
- Standard deviation: σ = √σ² = √(81/100) ≈ 0.9.
Table of contributions
| x | P(x) | x·P(x) | (x − μ)²·P(x) |
|---|---|---|---|
| 0 | 0.1 | 0 | 0.289 |
| 1 | 0.3 | 0.3 | 0.147 |
| 2 | 0.4 | 0.8 | 0.036 |
| 3 | 0.2 | 0.6 | 0.338 |
| Total | 1 | 1.7 | 0.81 |
How to use the expected value calculator
- Pick the input type. Probabilities takes each value with its probability. Frequencies takes each value with how many times it happened. Game or bet takes the cost to play and each prize with its chance.
- Type the values. Probabilities can be decimals (0.25), fractions (1/6), percents (25%) or odds such as 1 in 6. Leave one probability blank and the calculator fills it with whatever is left so the total is 1.
- Read E(X) at the top, then the variance, standard deviation and E(X²). Open Show steps for the full working and Table of contributions to see how much each outcome adds.
The calculator checks that the probabilities add up to exactly 1. If they add up to something like 0.999 because you rounded 1/3 to 0.333, it tells you and scales them; anything further from 1 is flagged so you can fix it. All arithmetic uses exact fractions, so 1/3 or 1 in 6 cause no rounding error.
Expected value formula
For a discrete random variable X that takes values x1, x2, …, xn with probabilities P(x1), P(x2), …, P(xn):
E(X) = μ = x1P(x1) + x2P(x2) + … + xnP(xn) = Σ x·P(x)
- x is one possible outcome (a score, a payout, a count).
- P(x) is the probability of that outcome. Every P(x) is between 0 and 1, and together they add up to 1.
- μ (mu) is another name for the expected value, the mean of the distribution.
The spread around the mean is measured by the variance, σ² = Σ (x − μ)²·P(x), which also equals E(X²) − μ². The standard deviation is σ = √σ², in the same units as X. Expected value is a weighted average: the probabilities are the weights.
With frequencies instead of probabilities, divide each frequency by the total N first: P(x) = f / N. The calculator also shows the sample variance, which divides by N − 1, for when your counts are a sample from a larger population.
Expected value examples
Example 1: a fair die
Each face 1 to 6 has probability 1/6. E(X) = (1 + 2 + 3 + 4 + 5 + 6) × 1/6 = 21/6 = 3.5. You can never roll 3.5, but the average of many rolls settles near it. E(X²) = 91/6, so the variance is 91/6 − 3.5² = 35/12 ≈ 2.9167 and the standard deviation is about 1.7078.
Example 2: a raffle ticket
A ticket costs $5. One prize of $500 has a 1 in 1,000 chance and a $100 prize has a 1 in 500 chance. The expected payout is 500 × 0.001 + 100 × 0.002 = $0.70, so the expected net gain is $0.70 − $5 = −$4.30 per ticket. Buying 100 tickets you would expect to be down about $430. A negative expected value means the game favors the seller.
Example 3: insurance
A policy costs $750 a year. It pays $20,000 with probability 1 in 50 and $5,000 with probability 1 in 25. Expected payout: 20,000 × 0.02 + 5,000 × 0.04 = 400 + 200 = $600. For the buyer the expected value is $600 − $750 = −$150 a year; for the insurer it is +$150. People still buy insurance because it limits a large loss, which is a question about risk (the standard deviation), not only about the average.
Example 4: roulette
On an American wheel, a $1 bet on red wins with probability 18/38 and pays $1 profit; otherwise you lose $1. E(X) = 1 × 18/38 + (−1) × 20/38 = −2/38 ≈ −$0.0526, a house edge of about 5.26%.
Expected value quick reference
| Situation | E(X) | Variance |
|---|---|---|
| One fair die | 3.5 | 35/12 ≈ 2.9167 |
| Sum of two fair dice | 7 | 35/6 ≈ 5.8333 |
| Heads in one coin flip | 0.5 | 0.25 |
| Bernoulli trial with success chance p | p | p(1 − p) |
| Binomial, n trials, chance p | np | np(1 − p) |
| $1 on red, American roulette | −$0.0526 | about 0.9972 |
| $1 on red, European roulette (18/37) | −$0.0270 | about 0.9993 |
Rules that make expected value easier
- Linearity: E(aX + b) = a·E(X) + b. Doubling every payout doubles the expected value; adding a $2 fee lowers it by $2.
- Sums: E(X + Y) = E(X) + E(Y), even when X and Y are not independent. That is why two dice average 3.5 + 3.5 = 7.
- Variance scaling: Var(aX + b) = a²·Var(X). Adding a constant does not change the spread.
- Repeated plays: over n independent plays the expected total is n·E(X) and the standard deviation of the total is √n·σ. The calculator shows both in Game mode.
Checking homework with the expected value calculator
Work the problem by hand first: list the outcomes, check that the probabilities add to 1, multiply and add. Estimate before you calculate; E(X) must lie between the smallest and largest outcome. Then enter the same table and compare each line of Show steps with yours. The table below lists the slips we see most often.
| Mistake | How to catch it |
|---|---|
| Probabilities do not add up to 1 | Add them first; a missing outcome (such as “win nothing”) is the usual cause. |
| Using the prize instead of the net gain | Subtract the cost from every outcome, including the losing one. |
| Rounding 1/3 to 0.33 too early | Keep fractions until the end; the calculator accepts them. |
| Forgetting to square in the variance | Variance is never negative; if you got a negative number, a square is missing. |
| Confusing variance and standard deviation | Standard deviation is in the units of X; variance is in squared units. |
| Expecting E(X) to be a possible outcome | It is an average; a die never shows 3.5. |
Expected value practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
E(X) = 2(0.5) + 4(0.3) + 6(0.2) = 1 + 1.2 + 1.2 = 3.4. The value 4 is the plain average of the outcomes, which ignores the probabilities.
(1 + 2 + 3 + 4 + 5 + 6)/6 = 21/6 = 3.5. It is an average, so it does not have to be a face of the die.
Expected payout = 50 × 0.02 = $1. Subtract the $2 cost: $1 − $2 = −$1.00.
E(X) = 5. Each value is 5 away from the mean, so the variance is 5² × 1/2 + 5² × 1/2 = 25. The standard deviation is 5.
Variance = E(X²) − [E(X)]² = 13 − 9 = 4, so the standard deviation is √4 = 2.
N = 10, so the probabilities are 0.5, 0.3 and 0.2. E(X) = 1(0.5) + 2(0.3) + 3(0.2) = 1.7.
E = 1 × 18/38 − 1 × 20/38 = −2/38 ≈ −$0.0526, about −5 cents per dollar bet.
E(X) = 0 means the average net gain over many plays is zero. Single plays can still win or lose.
Quiz complete
Frequently asked questions
What is expected value?
Expected value is the long-run average of a random variable. If you repeat the same random experiment many times, the average of the results gets closer and closer to E(X). It is found by multiplying each outcome by its probability and adding the products.
How do you calculate expected value?
List every outcome and its probability, check that the probabilities add up to 1, multiply each outcome by its probability, then add the products. For a $10 prize with probability 0.2 and $0 with probability 0.8, E(X) = 10 × 0.2 + 0 × 0.8 = $2.
Can expected value be negative?
Yes. When outcomes are gains and losses, a negative expected value means you lose money on average, as with most lottery tickets and casino bets. An expected value of 0 is called a fair game.
How do you find expected value on a graphing calculator?
On a TI-84, press STAT, then Edit, and type the values in L1 and the probabilities in L2. Then choose STAT, CALC, 1-Var Stats with List: L1 and FreqList: L2. The mean x̄ shown is E(X), and σx is the standard deviation.
Can you find expected value for a continuous distribution?
Yes, but it uses an integral instead of a sum: E(X) = ∫ x·f(x) dx, where f is the density. For a uniform distribution from a to b this gives (a + b) / 2. This calculator handles discrete distributions, where you can list the outcomes.
How do you find expected values in a chi-square test?
That is a different idea with a similar name. In a contingency table the expected count for a cell is (row total × column total) / grand total. With a row total of 40, a column total of 50 and a grand total of 200, the expected count is 10.
Related calculators
- Probability calculator: and, or, not and conditional probability
- Binomial probability calculator: exact and cumulative probabilities, with mean np
- Dice roller: roll dice and watch the average approach 3.5
- Standard deviation calculator: spread of a data set
- Weighted average calculator: averages with weights
More statistics calculators
Related to This Article
More math articles
- How to Find Determinants of a Matrix?
- Community
- CBEST Math Flashcards (Free Online: Formulas, Terms & Concepts)
- How to Interpret Histogram? (+FREE Worksheet!)
- Average Calculator
- How to Multiply and Divide Fractions? (+FREE Worksheet!)
- Using Context Clues
- Congressional oversight
- Electrostatics: Charge, Force, Field, and Potential
- Whistleblowers





What people say about "Expected Value Calculator: E(X), Variance, SD with Steps"?
No one replied yet.