Math ยท Probability

Expectation

Expected value is the balance point of a probability distribution: a probability-weighted average that describes what emerges over many repetitions.

Concept

Outcomes need not be equally likely. An outcome with more probability pulls the balance point closer to itself. The expected value is about long-run behavior, not a prediction of what happens next.

Equation

E[X]=โˆ‘i=1nxipi

Manipulate

Change a probability. The values normalize automatically so the distribution always totals one.

Interactive discrete probability distributionProbability bars for each outcome and a marker showing the expected-value balance point.

Live calculation

Observe

A fair die has E[X]=3.5, even though 3.5 cannot be rolled. Expected value is not the next outcome; it is the average approached by many outcomes.

Long-run simulation

Run random trials from the current distribution and compare the running sample average with its expected value.

Computing, data & machine learning

Expectation appears in expected loss, expected reward, probabilistic models, decision making under uncertainty, reinforcement learning, and randomized algorithms. It tells a system what is typical in the long run when outcomes have different likelihoods.