Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Expected Value Visualizations



Weighted Expected Value
See how probability "weights" pull E[X] toward high-probability outcomes. Includes preset distributions and animation mode.
Discrete Expected Value
Adjust probabilities with sliders and see each value's contribution to E[X] in an interactive bar chart.





Interactive Expected Value Visualizations

Explore expected value through two interactive tools. The weighted visualizer shows how probability "weights" pull E[X] toward high-probability outcomes. The discrete visualizer lets you adjust probabilities and see how each value contributes to the expected value. Both tools demonstrate why expected value is called a probability-weighted average.



What is Expected Value?

Expected value represents the long-run average outcome of a random variable over many repetitions. Denoted E[X] or μ, it measures the center of a probability distribution—the value you would "expect" on average if you repeated an experiment infinitely many times.

The expected value is calculated as a probability-weighted average. Unlike a simple average where all values contribute equally, expected value weights each outcome by its probability of occurrence. High-probability outcomes influence the result more than low-probability outcomes.

E[X]=ixiP(X=xi)E[X] = \sum_{i} x_i \cdot P(X = x_i)


For discrete random variables, this formula sums each possible value multiplied by its probability. The visualization tools on this page demonstrate how probability weights "pull" the expected value toward high-probability outcomes.

Expected Value vs Simple Average

A key insight from these visualizations is the difference between expected value and simple average. The simple average treats all values equally:

Simple Average=x1+x2+...+xnn\text{Simple Average} = \frac{x_1 + x_2 + ... + x_n}{n}


Expected value weights by probability:

E[X]=x1p1+x2p2+...+xnpnE[X] = x_1 \cdot p_1 + x_2 \cdot p_2 + ... + x_n \cdot p_n


When all outcomes have equal probability (like a fair die), these two values are identical. When probabilities differ, expected value shifts toward high-probability outcomes. The weighted visualization tool demonstrates this "pulling" effect—larger probability weights exert stronger pull on E[X].

This distinction matters in real applications. A biased die, a loaded game, or any situation with unequal probabilities requires expected value, not simple averaging.

Visualization Approaches

Two complementary tools help build intuition for expected value:

Weighted Expected Value Visualizer shows probability as physical "weights" that pull the expected value along a number line. Preset distributions like "Pull Right," "Pull Left," and "Pull Center" demonstrate how probability concentration affects E[X]. An animation mode cycles through distributions automatically.

Discrete Expected Value Visualization displays a bar chart of the probability mass function with adjustable sliders. Each bar shows P(X = x), and the contribution x · P(X = x) appears inside each bar. The red dashed line marks E[X], moving as you adjust probabilities.

Both tools normalize probabilities automatically, ensuring they sum to 1. This lets you focus on relative probability weights without worrying about the constraint.

Applications of Expected Value

Expected value appears throughout probability, statistics, and decision-making:

Decision Theory: Compare options by their expected outcomes. Choose the action with highest expected value (or lowest expected cost).

Finance: Calculate expected returns on investments, expected portfolio values, and risk-adjusted returns.

Insurance: Price policies based on expected claims. Premium must exceed expected payout for profitability.

Game Theory: Analyze strategies by their expected payoffs. Fair games have E[X] = 0 for net winnings.

Quality Control: Predict average defect rates, expected production yields, and mean time between failures.

The variance measures spread around expected value. Together, E[X] and Var(X) characterize a distribution's center and dispersion.

Related Concepts and Calculators

Expected value connects to many probability concepts on this site:

Theory Pages:

Expected Value covers complete theory and formulas

Variance measures spread around E[X]

Random Variables explains discrete and continuous types

Probability Distributions covers common distributions and their expected values

Calculators:

Expected Value Calculators compute E[X] for various inputs

Discrete Distribution Calculators include expected value for specific distributions

Visual Tools:

Variance Visualizer shows spread around the mean

Distribution Visualizers display PMFs and CDFs with expected value markers