Expected Value Calculator
Calculate expected value E(X), variance σ², and standard deviation from outcomes and their probabilities. See the step-by-step formula breakdown.
Quick Answer
Expected value is the weighted average of all possible outcomes: E(X) = Σ(xᵢ × P(xᵢ)). It represents the long-run average if the experiment were repeated infinitely. Variance measures spread: σ² = Σ(P(xᵢ) × (xᵢ - E(X))²).
Enter Outcomes and Probabilities
Enter each possible outcome value and its probability. Probabilities should sum to 1. Up to 10 outcomes.
| # | Outcome (xᵢ) | Probability P(xᵢ) | |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 |
Results
Probability Distribution
Step-by-Step Calculation
| xᵢ | P(xᵢ) | xᵢ×P | xᵢ-E(X) | (xᵢ-E(X))² | P×(xᵢ-E(X))² |
|---|---|---|---|---|---|
| 1 | 0.1 | 0.1 | -2.15 | 4.6225 | 0.4622 |
| 2 | 0.2 | 0.4 | -1.15 | 1.3225 | 0.2645 |
| 3 | 0.3 | 0.9 | -0.15 | 0.0225 | 0.0067 |
| 4 | 0.25 | 1 | 0.85 | 0.7225 | 0.1806 |
| 5 | 0.15 | 0.75 | 1.85 | 3.4225 | 0.5134 |
| Sum | 1 | 3.15 | - | - | 1.4275 |
E(X) = Σ(xᵢ × P(xᵢ)) = 3.15
σ² = Σ(P(xᵢ) × (xᵢ - E(X))²) = 1.4275
σ = √σ² = √1.4275 = 1.1948
About This Tool
The Expected Value Calculator computes the expected value (E(X)), variance, and standard deviation of a discrete random variable from a user-defined probability distribution. It provides a complete step-by-step breakdown showing each outcome's contribution to the expected value and variance, along with a visual bar chart of the probability distribution. This tool is essential for probability and statistics students, actuaries, game designers, financial analysts, and anyone who needs to analyze the long-run average and spread of uncertain outcomes.
What Is Expected Value?
Expected value, denoted E(X) or mu, is the long-run average outcome of a random variable if the experiment were repeated infinitely many times. For a discrete random variable, it is calculated as E(X) = sum of (xi times P(xi)) over all possible outcomes. The expected value is not necessarily an outcome that can actually occur. For example, the expected value of a fair six-sided die roll is 3.5, even though you can never roll a 3.5. The concept was formalized by Blaise Pascal and Pierre de Fermat in the 17th century during their analysis of gambling problems, and it remains foundational to probability theory, statistics, and decision theory.
Understanding Variance and Standard Deviation
While expected value tells you the center of a distribution, variance and standard deviation tell you how spread out the outcomes are. Variance (sigma squared) is calculated as the expected value of the squared deviations from the mean: sigma^2 = sum of P(xi) times (xi - E(X))^2. Standard deviation (sigma) is the square root of variance and is in the same units as the original variable, making it more interpretable. A large standard deviation means outcomes are widely scattered, while a small one means they cluster tightly around the expected value. These measures are critical for risk assessment in finance, quality control in manufacturing, and error analysis in science.
Properties of Expected Value
Expected value has several useful properties. Linearity: E(aX + b) = a*E(X) + b, and E(X + Y) = E(X) + E(Y) for any random variables X and Y, even if they are not independent. This makes expected value easy to work with algebraically. For independent variables, E(XY) = E(X)*E(Y). These properties are used extensively in statistics, insurance, and portfolio theory. However, expected value does not always capture the full picture: two distributions can have the same expected value but very different risk profiles, which is why variance is equally important.
Applications in Decision Making
Expected value is the cornerstone of rational decision-making under uncertainty. In business, it helps evaluate investments by computing the weighted average return across scenarios. In insurance, actuaries use expected value to set premiums that cover expected claims plus a margin. In game theory, expected value determines fair games (E(X) = 0 for the house) and identifies the best strategy in repeated games. In medical decision-making, expected value analysis compares treatment options by weighting outcomes by their probabilities. The limitation is that expected value ignores risk tolerance: a 50% chance of winning a million dollars and a 50% chance of losing a million dollars has an expected value of zero, but most people would not consider that a neutral gamble.
Probability Distributions Must Sum to 1
For a valid discrete probability distribution, all probabilities must be non-negative and they must sum to exactly 1 (or 100%). This reflects the fact that one of the listed outcomes must occur. If your probabilities sum to more or less than 1, the expected value and variance calculations are technically invalid. This calculator warns you when probabilities do not sum to 1 but still computes results so you can identify and fix the error. In practice, rounding errors may cause probabilities to sum to 0.999 or 1.001, which is usually acceptable.
Expected Value vs. Most Likely Outcome
The expected value is often confused with the mode (most likely outcome), but they are fundamentally different concepts. The mode is the outcome with the highest probability, while the expected value is the probability-weighted average of all outcomes. For a skewed distribution, the expected value can be far from the mode. For example, in a lottery, the most likely outcome is losing (the mode), but the expected value accounts for the small probability of a large win. Understanding this distinction is crucial for making informed decisions: the expected value tells you what to anticipate on average, while the mode tells you what is most likely to happen in a single trial.
Frequently Asked Questions
What does expected value represent in real life?
Why do my probabilities need to sum to 1?
Can expected value be negative?
What is the difference between expected value and average?
How is variance related to risk?
Can I use this for continuous distributions?
You might also like
Was this tool helpful?