Home · Statistics · Distributions & Sampling · Expected Value Calculator
Expected Value Calculator
The expected value E(X) of a discrete random variable: the probability-weighted average of its possible values, i.e. its long-run average outcome.
What this calculator does
The expected value E(X) of a discrete random variable: the probability-weighted average of its possible values, i.e. its long-run average outcome. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.
The formula and method
This page focuses on the expectation itself: each value is weighted by its probability and the products are summed to give E(X), the headline result.
The two lists are paired position by position and must have the same length; the probabilities must sum to 1.
E(X) is a long-run average over many repetitions, so it need not be one of the possible values.
Worked example
With the example inputs this page opens with, the result is 23.5000. Change any figure and the result updates with the same formula.
Quick reference
| Figure | Value |
|---|---|
| Result | 23.5000 |
| Variance | 492.75 |
| Standard deviation | 22.197973 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
Why is the expected value 23.5 when no outcome equals 23.5?
The expectation is an average, not a possible result. Repeating this gamble many times gives an average payoff close to 23.5 per play, even though each single play pays 10, 20, 50 or 100.
How do I use E(X) to judge a game or investment?
Compare E(X) with the cost of playing. A game costing 25 with these payoffs has expected net gain 23.5 − 25 = −1.5 per play, so it loses money in the long run.
How does the Expected Value Calculator work?
The expected value E(X) of a discrete random variable: the probability-weighted average of its possible values, i.e. its long-run average outcome. Values x list · Probabilities p list → Expected value E(X). The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Expected Value Calculator need?
Values x list · Probabilities p list → Expected value E(X). Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.