Tutorials › Statistical Theory I - Probability and Distribution Theory › Expectation from a Discrete Probability Mass Function

Expectation and LOTUS · Tutorial 298 of 994

Expectation from a Discrete Probability Mass Function

Learn to calculate and interpret a finite-support discrete expectation, and check your result using probability weights, bounds, and symmetry.

Intermediate 9 min read

What You'll Learn

  • Define expectation from the probability mass function of a finite-support variable
  • Calculate weighted expectations when possible outcomes have unequal values and probabilities
  • Distinguish a probability-weighted average from an unweighted average of support values
  • Prove bounds on the expectation from the smallest and largest possible values
  • Recognize when symmetry determines the expectation directly

Why Weight the Possible Values?

A discrete random variable can take several possible values, each with its own probability. To summarize its location, we do not generally average the possible values equally: an outcome with probability \(0.8\) should contribute more than one with probability \(0.1\). The appropriate summary is a probability-weighted average, called the expectation.

Expectation is a feature of the probability distribution, not a prediction of the value that will occur in one trial. It can be a value the random variable never takes. The definition is especially direct when there are finitely many possible values, which is the setting of this tutorial.

Definition for Finite Support

Definition: Suppose a discrete random variable \(X\) takes the distinct values \(x_1,\ldots,x_k\), where \(k\) is finite, and let \(p_i=P(X=x_i)\). Its expectation is
$$ E[X]=\sum_{i=1}^{k} x_i p_i =\sum_{i=1}^{k}x_iP(X=x_i). $$
The probabilities satisfy \(p_i\geq 0\) and \(\sum_{i=1}^{k}p_i=1\). Values with probability zero may be omitted from the sum.

The calculation has two ingredients: list each distinct possible value, then multiply it by the probability assigned to that value. The probabilities are weights, so they must sum to one. If a probability mass function is presented in a table, each row contributes the product of its value and its probability.

Worked Example: Unequal Values and Unequal Probabilities

Suppose \(X\) takes the values \(-2\), \(1\), and \(4\), with probabilities \(0.2\), \(0.5\), and \(0.3\), respectively. Find \(E[X]\).

First check the probability mass function: \(0.2+0.5+0.3=1\), and all three probabilities are nonnegative. Apply the definition:

$$ E[X]=(-2)(0.2)+(1)(0.5)+(4)(0.3) =-0.4+0.5+1.2=1.3. $$

Thus the expectation is \(1.3\). This does not mean that \(X\) can equal \(1.3\); its only possible values are \(-2\), \(1\), and \(4\). It is the probability-weighted average of those outcomes.

Worked Example: Expected Payout With a Large Prize

A game pays \$0 with probability \(0.70\), \$5 with probability \(0.25\), and \$40 with probability \(0.05\). Let \(X\) be the payout in dollars. Find its expectation.

The possible values and probabilities are paired as \((0,0.70)\), \((5,0.25)\), and \((40,0.05)\). The probabilities add to \(0.70+0.25+0.05=1\). Therefore,

$$ E[X]=(0)(0.70)+(5)(0.25)+(40)(0.05) =0+1.25+2=3.25. $$

The expected payout is \$3.25. The \$40 prize is infrequent, but its contribution to the expectation is \(40(0.05)=2\) dollars. Ignoring it or averaging the three listed payouts equally would give the wrong result.

Expectation Is Between the Extreme Values

Because the probabilities are nonnegative and sum to one, a finite-support expectation cannot lie below every possible value or above every possible value. This provides a useful check on a calculation.

Theorem: Let \(X\) have finite support with smallest value \(a\) and largest value \(b\). Then
$$ a\leq E[X]\leq b. $$
If \(a<b\), equality on the left holds exactly when \(P(X=a)=1\), and equality on the right holds exactly when \(P(X=b)=1\).

Proof. Write the distinct support values as \(x_1,\ldots,x_k\), with probabilities \(p_1,\ldots,p_k\). By the definitions of \(a\) and \(b\), each \(x_i-a\geq 0\) and \(b-x_i\geq 0\). Multiplying by \(p_i\geq 0\) and summing gives

$$ \sum_{i=1}^{k}(x_i-a)p_i\geq 0 \quad\text{and}\quad \sum_{i=1}^{k}(b-x_i)p_i\geq 0. $$

Since \(\sum_i p_i=1\), these inequalities are \(E[X]-a\geq 0\) and \(b-E[X]\geq 0\). Hence \(a\leq E[X]\leq b\). For the first equality, the sum \(\sum_i(x_i-a)p_i\) is a sum of nonnegative terms. It is zero exactly when every term with \(p_i>0\) has \(x_i=a\), which is equivalent to \(P(X=a)=1\). The argument for equality at \(b\) is the same, using \(\sum_i(b-x_i)p_i\). \(\square\)

The equality condition matters: merely including \(a\) or \(b\) among the listed possible values does not put all probability there. For a nonconstant distribution, the expectation lies strictly between the smallest and largest values.

Worked Example: Check a Weighted Average Against Its Support

Let \(Y\) take values \(2\), \(6\), and \(10\), with probabilities \(0.5\), \(0.3\), and \(0.2\). Calculate its expectation and use the theorem as a check.

The probabilities sum to \(0.5+0.3+0.2=1\). The weighted sum is

$$ E[Y]=(2)(0.5)+(6)(0.3)+(10)(0.2) =1+1.8+2=4.8. $$

The smallest support value is \(2\), and the largest is \(10\), so the bound is \(2\leq E[Y]\leq 10\). The result \(4.8\) satisfies this check. Since positive probability is assigned to values other than either extreme, the expectation is strictly between them, as it is here.

Two Useful Interpretations

When probabilities are rational numbers, the weighted-sum definition has an exact repeated-outcomes interpretation. Suppose \(p_i=m_i/M\), where \(m_i\) are nonnegative integers and \(M=\sum_i m_i\). Imagine a list containing \(m_i\) copies of \(x_i\). Its ordinary arithmetic mean is

$$ \frac{\sum_{i=1}^{k}m_i x_i}{M} =\sum_{i=1}^{k}x_i\frac{m_i}{M} =\sum_{i=1}^{k}x_i p_i =E[X]. $$

Thus, for rational probabilities, expectation is exactly the mean of a list in which each outcome is repeated in proportion to its probability. This is an interpretation of the definition; it does not require an actual experiment to produce that list.

For instance, if the probabilities for \(Y\) in the previous example are \(0.5\), \(0.3\), and \(0.2\), take \(M=10\). The list has five 2s, three 6s, and two 10s. Its total is \(5(2)+3(6)+2(10)=48\), and its mean is \(48/10=4.8\), matching the probability-weighted sum.

Theorem: Suppose a finite-support distribution is symmetric about \(c\): for every real \(t>0\), the probabilities at \(c-t\) and \(c+t\) are equal, treating a value outside the support as having probability zero. Then \(E[X]=c\).

Proof. The finite support can be grouped into pairs \(c-t,c+t\) with equal probability \(q_t\), together with the value \(c\), if it has positive probability. Each pair contributes

$$ (c-t)q_t+(c+t)q_t=2cq_t =c\big(q_t+q_t\big) $$

to the expectation. A possible central value contributes \(cP(X=c)\). Summing all these contributions gives \(c\) multiplied by the total probability, which is \(c\cdot 1=c\). Therefore \(E[X]=c\). \(\square\)

This result can save a calculation when the support and its probabilities are balanced around a center. It applies to the distribution itself, not merely to a visually balanced list of values.

Worked Example: Use Symmetry to Find the Expectation

Suppose \(Z\) takes values \(-3\), \(1\), and \(5\), with probabilities \(0.2\), \(0.6\), and \(0.2\). Find \(E[Z]\).

The values \(-3\) and \(5\) are equally far from \(1\): each is four units from the center. Their probabilities are equal, and the remaining probability is at the center. The distribution is therefore symmetric about \(1\), so the theorem gives \(E[Z]=1\).

Check directly from the definition:

$$ E[Z]=(-3)(0.2)+(1)(0.6)+(5)(0.2) =-0.6+0.6+1=1. $$

The direct calculation confirms the symmetry argument.

Common Mistake: Averaging the Support Values

A frequent error is to average the distinct possible values without using their probabilities. For the payout example, that incorrect calculation would be \((0+5+40)/3=15\). It gives equal weight to a common \$0 payout and a rare \$40 payout, even though their probabilities are \(0.70\) and \(0.05\). The correct calculation weights each value by its probability and gives \$3.25.

A reliable way to prevent this mistake is to write the value-probability pairs before calculating. Check that the probabilities add to one, multiply each value by its paired probability, and add those products. Finally, compare the result with the minimum and maximum possible values. These checks catch many pairing and arithmetic errors.

Key takeaway: For a finite-support discrete random variable, expectation is the sum of each possible value multiplied by its probability. It is a probability-weighted average, bounded by the support extremes, and symmetry can sometimes identify it without a full calculation.

Check Your Understanding

Try these questions using the definition and results above.

  1. A variable takes values \(1\), \(4\), and \(9\) with probabilities \(0.2\), \(0.5\), and \(0.3\). Calculate its expectation and check it against the support bounds.
  2. A distribution assigns probability \(0.6\) to \(-2\) and probability \(0.4\) to \(3\). Why is the unweighted average of the two support values not its expectation? What is the expectation?
  3. State the condition for the expectation to equal the smallest support value, and explain why merely having that value in the support is not enough.
  4. A finite distribution is symmetric about \(4\). What is its expectation? What feature of the probability mass function justifies the answer?
  5. If all probabilities are rational, describe how to construct a finite list whose ordinary mean equals the expectation.