Skip to content
Glacius
ProbabilityConcept reference

Expected values

A finite expectation is the sum of each value multiplied by its probability.

On this page 7 sections
  1. Overview
  2. An expected value is a probability-weighted average
  3. Negative values keep their signs
  4. The mean describes the probability model, not a guaranteed observation
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections

01An expected value is a probability-weighted average#

An expected value is a probability-weighted average. Multiply each possible value by how likely it is, then add those contributions.

E[X]=xxp(x)E[X]=\sum_x x\,p(x)

Let XX be 00 with probability 0.750.75 and 44 with probability 0.250.25. Their weighted contributions are 00 and 11, giving E[X]=1E[X]=1.

Outcomes 0, 4 have probabilities 0.75, 0.25. The balance point is the mean 1.Outcomes 0, 4 have probabilities 0.75, 0.25. The balance point is the mean 1.
Figure 1Outcomes 0, 4 have probabilities 0.75, 0.25. The balance point is the mean 1.
Link to this figure ↗Download SVGDownload PNG
Check your reasoning

PMF: p(0)=0.75p(0)=0.75, p(8)=0.25p(8)=0.25. Find E[X]E[X].

Show answer and explanation
2

Weighted sum: 0(0.75)0(0.75) + 8(0.25)8(0.25) = 22.

02Negative values keep their signs#

Negative values keep their signs. A negative reward contributes a negative term; its probability stays nonnegative.

Equal probabilities justify averaging the distinct values equally. Otherwise, use the supplied weights.

Check your reasoning

A model assigns numerical rewards 4-4, 66, with respective probabilities 0.7, 0.3. Find the expected reward E[X]E[X].

Show answer and explanation
-1

Weighted sum: 4(0.7)-4(0.7) + 6(0.3)6(0.3) = 1-1.

03The mean describes the probability model, not a guaranteed observation#

The mean describes the probability model, not a guaranteed observation. In the example, only 00 or 44 can occur even though the mean is 11.

Keep the weighted result. Rounding it to a possible outcome changes the expected value.

Check your reasoning

PMF: p(0)=0.5p(0)=0.5, p(3)=0.5p(3)=0.5. A learner rounds the mean to a possible outcome. Find the unrounded E[X]E[X].

Show answer and explanation
1.5

Weighted sum: 0(0.5)0(0.5) + 3(0.5)3(0.5) = 1.51.5. Keep this mean.

Key takeaway

Multiply by probabilities, preserve signs, and keep the weighted mean even when it cannot occur.

  • Compute a finite random variable's expectation.

Sources & further reading

  1. [1]
    Pishro-Nik, Introduction to Probability: ExpectationPishro-Nik: Introduction to Probability · Article

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Expected values.” Math behind ML. /learn/p-expectation