AI Glossary / Graphs and symbolic AI / Beginner
Expected value
Definition
Expected value is the probability-weighted average of a numerical quantity's possible values. It is also called the mean or expectation. In AI, expected values appear when combining uncertain outcomes, evaluating chance nodes in game trees, estimating losses, and comparing actions through expected rewards or utilities.
What it means
The word expected can be misleading in everyday language. An expected value is not necessarily the outcome you predict will happen most often, and it may not be a possible individual outcome at all.
For a finite set of outcomes, multiply each value by its probability and add the results. Values with greater probability receive greater weight. The result has the same units as the quantity being averaged, such as minutes, items, or points.
The concept applies more broadly to discrete and continuous random variables, although some distributions do not have a finite well-defined expectation. For continuous quantities, an integral replaces the finite weighted sum. The basic interpretation remains an average under a specified probability model.
How it works
Define the random variable: what numerical quantity are you measuring, over which cases, and under what conditions? Identify its possible values and their probabilities.
For a discrete variable X, the expectation is the sum of x multiplied by P(X = x) over its possible values. If several underlying outcomes produce the same value, their probabilities can be combined before calculating.
Conditional expected value uses probabilities after taking specified information into account. An estimate of travel time given heavy traffic can differ from the overall average across all traffic conditions.
In a game tree, a chance node combines the values of its possible successors using the event probabilities. This differs from choosing the largest or smallest successor value at a decision node. Correctly distinguishing random events from an agent's choices is essential to using expectations meaningfully.
Three practical examples
1. A planning model estimates average completion time from several possible processing outcomes, each with a modeled probability.
2. A game-playing program evaluates a random event by averaging successor scores according to the event's probabilities.
3. A machine-learning system minimizes expected loss, using a distribution of examples or an empirical approximation to that distribution.
Think of it this way
Think of a balance point along a number line, with probability acting like weight at each possible value. A rare large value can pull the balance point even when smaller values occur more frequently.
The analogy also reveals a limitation: the balance point does not show the full spread or shape of the weights. Different distributions can balance at the same number while having very different practical consequences.
Worked example
Suppose a toy service model produces X completed jobs in a short interval. It assigns probability 0.2 to 0 jobs, 0.5 to 2 jobs, and 0.3 to 5 jobs. The probabilities sum to one.
The expected value is 0.2 × 0 + 0.5 × 2 + 0.3 × 5 = 2.5 jobs. The most probable count is 2, and 2.5 is not an available count in a single interval. Both statements are compatible with the expectation being 2.5.
If ten intervals each have this same marginal distribution, the expected total is 10 × 2.5 = 25 jobs. Linearity of expectation does not require those interval counts to be independent. Independence would matter for other questions, such as calculating the distribution or variance of the total using simple formulas.
Now suppose a teaching score equals X squared. Its expected value is 0.2 × 0² + 0.5 × 2² + 0.3 × 5² = 9.5. Squaring the expected job count instead gives 2.5² = 6.25. These differ because averaging and a nonlinear transformation generally do not commute.
The numbers illustrate a probability model, not measured service performance or a capacity guarantee.
Illustrative case study
Fictional case: Birch Workshop plans staffing using an average of completed jobs per interval. One manager interprets an expected count of 2.5 as meaning that each interval will deliver at least two jobs.
The analyst shows the outcome table, including intervals with no completed jobs, and adds a separate view of variability. The team distinguishes an average planning quantity from a minimum service commitment. The case illustrates why reporting the distribution can be necessary even when the expected value is calculated correctly.
Common misconceptions and mistakes
Do not confuse the mean with the most likely outcome or the median. Each summarizes a distribution differently.
Do not give outcomes equal weight unless their probabilities are equal. A simple arithmetic average is only a special case of expectation.
Avoid assuming that an expected value describes a guaranteed or typical individual result. Skewed distributions can make it especially unrepresentative of most observations.
Do not infer a probability distribution from its mean alone. Knowing expected demand is insufficient to determine the chance that demand exceeds a capacity limit.
Business use
Expected values support forecasting, resource planning, and model evaluation by providing a consistent way to combine uncertain numerical outcomes. Their usefulness depends on the probabilities and on choosing the right quantity to average.
State the time period, units, population, and conditioning information. Pair the mean with relevant measures of uncertainty when individual outcomes matter. If the business consequence is nonlinear, calculate the expectation of that consequence directly rather than applying its formula only to the mean input.
An expected cost, expected completion time, and expected satisfaction score are different targets. Selecting one is a modeling decision that should match the question being answered.
People also ask
Can an expected count be fractional?
Yes. It is an average under a distribution, even when every individual count is an integer.
Are expectations always finite?
No. Some distributions have infinite or undefined expectations, so the necessary mathematical conditions matter.
Does a sample average equal the true expected value?
Not generally. It is an estimate whose quality depends on the data and assumptions about how they were obtained.
Check your understanding
In the worked example, is 2.5 the most likely number of completed jobs?
Answer: No. Two jobs is the most likely outcome, with probability 0.5. The value 2.5 is the probability-weighted average and cannot occur as an individual listed outcome.
Related terms
- Mean
- Random variable
- Probability distribution
- Conditional expectation
- Expected utility
- Variance
- Chance nodes
- Law of large numbers
- chance node
Learn next
Study conditional expectation and variance next. Construct two distributions with the same mean but different spreads, and compare their probabilities of exceeding a threshold. Then examine how chance-node averaging interacts with decision-node maximization in a small game tree.
More in Graphs and symbolic AI
- Existential graphs - Existential graphs are a diagrammatic system of logic developed by Charles Sanders Peirce.
- Expectation-maximization - Expectation-maximization, usually abbreviated EM, is an iterative method for estimating model parameters when some relevant information is unobserved.
- Expected monetary value - Expected monetary value, or EMV, is the probability-weighted average of possible monetary outcomes.
- Expectiminimax - Expectiminimax is a game-tree search method that extends minimax to include random events.
- Expectiminimax value - An expectiminimax value is the value assigned to a game-tree position by combining maximizing choices, minimizing choices, and probability-weighted chance...
- Expit - Expit is another name for the logistic sigmoid function, which maps a real number to a value between zero and one.
Sources
Primary sources: Hossein Pishro-Nik, Introduction to Probability, Statistics, and Random Processes, expectation: https://www.probabilitycourse.com/chapter3/3_2_2_expectation.php
Russell and Norvig, probability-weighted utility in rational decisions: https://aima.cs.berkeley.edu/slides-pdf/chapter16.pdf
The job-count distribution, nonlinear-score calculation, and fictional case are original teaching examples. Expected value is explained generally, with its AI decision and game-tree uses distinguished.
Previous: Expected utility Next: Expectiminimax