The Central Idea
The expected value of a random variable is its probability-weighted average.
For a discrete random variable \(X\),
\[ \boxed{\mathbb{E}[X]=\sum_x xP(X=x)}. \]Each possible value is multiplied by its probability, and the products are added.
Expectation as a Weighted Average
An ordinary average gives equal weight to every listed value. Expected value gives each possible value a weight equal to its probability.
More probable values influence the expected value more heavily than less probable values.
Because the probabilities sum to \(1\), expectation is a weighted average of the possible values.
Notation
Common notations for expected value include
\[ \mathbb{E}[X],\qquad E[X],\qquad \mu_X. \]The notation \(\mu_X\) emphasizes that expected value is the mean of the probability distribution.
Example: A Fair Die
Let \(X\) be the number shown when a fair six-sided die is rolled.
\[ \mathbb{E}[X] = 1\left(\frac16\right) +2\left(\frac16\right) +3\left(\frac16\right) +4\left(\frac16\right) +5\left(\frac16\right) +6\left(\frac16\right). \]Therefore,
\[ \mathbb{E}[X] = \frac{21}{6} = \boxed{3.5}. \]The Expected Value Need Not Be a Possible Outcome
A fair die can never show \(3.5\), yet its expected value is \(3.5\).
Expected value is a summary of the distribution, not necessarily a value that can occur in a single trial.
Example: A Probability Table
| \(x\) | \(P(X=x)\) |
|---|---|
| \(0\) | \(0.10\) |
| \(1\) | \(0.25\) |
| \(2\) | \(0.40\) |
| \(3\) | \(0.25\) |
Then
\[ \mathbb{E}[X] = 0(0.10)+1(0.25)+2(0.40)+3(0.25). \] \[ =0+0.25+0.80+0.75. \]Therefore,
\[ \boxed{\mathbb{E}[X]=1.8}. \]Expected Value and Long-Run Average
Expected value has an important repeated-trial interpretation.
If the same random experiment is repeated many times under stable conditions, producing values
\[ X_1,X_2,\ldots,X_n, \]then under standard conditions the sample average
\[ \frac{X_1+\cdots+X_n}{n} \]tends to become close to
\[ \mathbb{E}[X]. \]This long-run interpretation will be formalized later through the Law of Large Numbers.
Expectation Is Not a Prediction of the Next Trial
An expected value describes average behavior across the probability model. It does not tell us what the next individual outcome must be.
For a fair die, \(3.5\) is the long-run average, not the next roll.
Example: A Simple Payoff
Suppose a game pays \(\$10\) with probability \(0.20\) and \(\$0\) with probability \(0.80\).
Let \(X\) be the payoff. Then
\[ \mathbb{E}[X] = 10(0.20)+0(0.80) = \boxed{2}. \]The expected gross payoff is \(\$2\) per play.
Net Gain Versus Gross Payoff
If the game costs \(\$3\) to play and \(Y\) is the net gain, then
\[ Y=X-3. \]Therefore,
\[ \mathbb{E}[Y] = \mathbb{E}[X]-3 = 2-3 = \boxed{-1}. \]The expected net result is a loss of \(\$1\) per play.
Fair Games
A game is often called fair in the expected-value sense when the expected net gain is zero:
\[ \boxed{\mathbb{E}[X]=0}. \]A positive expected net gain favors the player in the long-run average sense, while a negative expected net gain favors the opposing side.
Expected Value of a Bernoulli Random Variable
Let \(X\) equal \(1\) for success and \(0\) for failure, with
\[ P(X=1)=p,\qquad P(X=0)=1-p. \]Then
\[ \mathbb{E}[X] = 1(p)+0(1-p) = \boxed{p}. \]Indicator Random Variables
An indicator random variable records whether an event occurs.
\[ I_A= \begin{cases} 1, & A\text{ occurs},\\ 0, & A\text{ does not occur}. \end{cases} \]Since \(I_A\) is Bernoulli,
\[ \boxed{\mathbb{E}[I_A]=P(A)}. \]Countably Infinite Discrete Variables
For a countably infinite discrete random variable,
\[ \mathbb{E}[X]=\sum_x xP(X=x) \]still applies, provided the series defining the expectation converges appropriately.
A valid probability distribution does not automatically guarantee a finite expected value.
Expected Value for Continuous Random Variables
If \(X\) is continuous with probability density function \(f_X(x)\), then
\[ \boxed{ \mathbb{E}[X] = \int_{-\infty}^{\infty}x f_X(x)\,dx }. \]The integral is the continuous counterpart of the discrete weighted sum.
Discrete and Continuous Expectation
| Discrete | Continuous |
|---|---|
| \(\mathbb{E}[X]=\sum_x x\,p_X(x)\) | \(\mathbb{E}[X]=\int_{-\infty}^{\infty}x f_X(x)\,dx\) |
| Probability is accumulated by sums. | Probability is accumulated by integrals. |
| Weights are probability masses. | Weights are determined by probability density. |
Example: Uniform Distribution on \([0,4]\)
Suppose
\[ f_X(x)= \begin{cases} \frac14, & 0\le x\le4,\\ 0, & \text{otherwise}. \end{cases} \]Then
\[ \mathbb{E}[X] = \int_0^4x\left(\frac14\right)\,dx. \] \[ = \frac14\left[\frac{x^2}{2}\right]_0^4 = \boxed{2}. \]Symmetry and Expected Value
For a distribution symmetric about a point \(c\), the expected value is often \(c\), provided the expectation exists.
The uniform distribution on \([0,4]\) is symmetric about \(2\), matching the calculated expectation.
Example: A Nonuniform Continuous Density
Suppose
\[ f_X(x)= \begin{cases} 2x, & 0\le x\le1,\\ 0, & \text{otherwise}. \end{cases} \]Then
\[ \mathbb{E}[X] = \int_0^1x(2x)\,dx = 2\int_0^1x^2\,dx. \] \[ = 2\left[\frac{x^3}{3}\right]_0^1 = \boxed{\frac23}. \]Expected Value of a Function of a Random Variable
Sometimes the quantity of interest is \(g(X)\) rather than \(X\).
For a discrete random variable,
\[ \boxed{ \mathbb{E}[g(X)] = \sum_x g(x)p_X(x) }. \]For a continuous random variable,
\[ \boxed{ \mathbb{E}[g(X)] = \int_{-\infty}^{\infty}g(x)f_X(x)\,dx }. \]Why the Transformation Formula Is Useful
To calculate \(\mathbb{E}[g(X)]\), we often do not need to determine the complete distribution of \(g(X)\).
Instead, apply \(g\) to the values of \(X\) and average those transformed values using the original probability distribution.
Example: Expected Square
Suppose
\[ P(X=1)=\frac12,\qquad P(X=3)=\frac12. \]Then
\[ \mathbb{E}[X^2] = 1^2\left(\frac12\right) + 3^2\left(\frac12\right) = \boxed{5}. \]\(\mathbb{E}[X^2]\) Is Not Usually \((\mathbb{E}[X])^2\)
In the preceding example,
\[ \mathbb{E}[X]=2, \]so
\[ (\mathbb{E}[X])^2=4, \]while
\[ \mathbb{E}[X^2]=5. \]Therefore,
\[ \boxed{\mathbb{E}[X^2]\ne(\mathbb{E}[X])^2} \]in general.
Linearity of Expectation
One of the most important properties of expected value is linearity.
For constants \(a\) and \(b\),
\[ \boxed{\mathbb{E}[aX+b]=a\mathbb{E}[X]+b}. \]Multiplying a random variable by a constant multiplies its expectation by the same constant. Adding a constant shifts the expectation by that amount.
Example: Linear Transformation
Suppose
\[ \mathbb{E}[X]=12 \]and
\[ Y=3X-5. \]Then
\[ \mathbb{E}[Y] = 3\mathbb{E}[X]-5 = 3(12)-5 = \boxed{31}. \]Linearity for Sums
If \(X\) and \(Y\) have finite expectations, then
\[ \boxed{\mathbb{E}[X+Y]=\mathbb{E}[X]+\mathbb{E}[Y]}. \]More generally,
\[ \boxed{ \mathbb{E}[X_1+\cdots+X_n] = \mathbb{E}[X_1]+\cdots+\mathbb{E}[X_n] }. \]Independence Is Not Required
Linearity of expectation does not require the random variables to be independent.
Even when \(X\) and \(Y\) are dependent,
\[ \mathbb{E}[X+Y] = \mathbb{E}[X]+\mathbb{E}[Y], \]provided the expectations exist.
Expected Counts Using Indicators
Suppose \(N\) counts how many of the events \(A_1,\ldots,A_n\) occur. Define indicators \(I_1,\ldots,I_n\). Then
\[ N=I_1+\cdots+I_n. \]By linearity,
\[ \mathbb{E}[N] = \sum_{i=1}^{n}\mathbb{E}[I_i] = \boxed{\sum_{i=1}^{n}P(A_i)}. \]Independence among the events is not required.
Example: Expected Number of Heads
Toss \(10\) fair coins and let \(X\) be the number of heads.
Write
\[ X=I_1+\cdots+I_{10}, \]where \(I_i=1\) if toss \(i\) is heads and \(0\) otherwise.
Since
\[ \mathbb{E}[I_i]=\frac12, \]we obtain
\[ \mathbb{E}[X] = 10\left(\frac12\right) = \boxed{5}. \]Expected Value of a Binomial Count
If
\[ X\sim\operatorname{Binomial}(n,p), \]then \(X\) counts successes in \(n\) Bernoulli trials.
Using indicators and linearity,
\[ \boxed{\mathbb{E}[X]=np}. \]The binomial distribution will be developed systematically later in this section.
Expectation and Units
Expected value has the same units as the random variable.
- If \(X\) is measured in dollars, \(\mathbb{E}[X]\) is measured in dollars.
- If \(T\) is measured in hours, \(\mathbb{E}[T]\) is measured in hours.
- If \(D\) is measured in kilometers, \(\mathbb{E}[D]\) is measured in kilometers.
Expected Value Does Not Describe Spread
Two distributions can have the same expected value while having very different variability.
Consider
\[ P(X=10)=1 \]and
\[ P(Y=0)=\frac12,\qquad P(Y=20)=\frac12. \]Both satisfy
\[ \mathbb{E}[X]=\mathbb{E}[Y]=10, \]but \(Y\) is much more variable.
Expected Value as a Balance Point
For a discrete distribution, imagine placing probability masses along a number line. The expected value behaves like the balance point of those weighted locations.
This gives a useful geometric interpretation of why larger probabilities exert greater influence on the mean.
Expected Value in Decision Problems
Expected value is often used to compare uncertain numerical outcomes.
The basic calculation is
\[ \sum (\text{outcome})(\text{probability}). \]However, expected value alone does not fully capture risk, constraints, utility, or the consequences of extreme outcomes.
Example: Equal Expected Values, Different Risk
Option A pays \(\$5\) with certainty:
\[ \mathbb{E}[A]=5. \]Option B pays \(\$20\) with probability \(0.25\) and \(\$0\) otherwise:
\[ \mathbb{E}[B] = 20(0.25)+0(0.75) = 5. \]The expected values are equal, but the distributions have different variability.
Common Error: Taking an Unweighted Average
The expected value is not generally the ordinary average of the possible values.
Unless the values are equally likely, use
\[ \mathbb{E}[X]=\sum_x xP(X=x). \]Common Error: Forgetting an Outcome
Every possible value with positive probability must be included.
Omitting a low-probability but high-magnitude outcome can substantially change the expected value.
Common Error: Assuming the Mean Must Be Possible
Expected value can lie between attainable outcomes.
The fair-die mean \(3.5\) is the standard example.
Common Error: Interpreting Expectation as Certainty
An expected profit of \(\$100\) does not mean every trial earns \(\$100\).
Expectation describes a probability-weighted average, not a guaranteed result.
Common Error: Confusing \(\mathbb{E}[X^2]\) with \((\mathbb{E}[X])^2\)
In general,
\[ \mathbb{E}[X^2]\ne(\mathbb{E}[X])^2. \]This distinction becomes essential when variance is introduced.
Common Error: Assuming \(\mathbb{E}[g(X)]=g(\mathbb{E}[X])\)
For nonlinear functions \(g\),
\[ \mathbb{E}[g(X)] \]is generally not equal to
\[ g(\mathbb{E}[X]). \]Linearity works for expressions such as \(aX+b\), not arbitrary nonlinear transformations.
A Reliable Procedure for Discrete Expected Value
- List every possible value with positive probability.
- Record the probability of each value.
- Verify that the probabilities form a valid PMF.
- Multiply each value by its probability.
- Add the resulting products.
- Attach the appropriate units.
- Interpret the result as a weighted center or long-run average.
A Reliable Procedure for Continuous Expected Value
- Identify the density and its support.
- Verify that the density is normalized.
- Form \(x f_X(x)\).
- Integrate over the full support.
- Check convergence when necessary.
- Attach the appropriate units.
- Interpret the result in context.
Practice 1: Discrete Expected Value
Suppose
\[ P(X=0)=0.2,\qquad P(X=1)=0.5,\qquad P(X=4)=0.3. \]Find \(\mathbb{E}[X]\).
Practice 2: Fair Die
Let \(X\) be the result of a fair six-sided die roll. Find \(\mathbb{E}[X]\).
Practice 3: Expected Net Gain
A game pays \(\$12\) with probability \(0.25\) and \(\$0\) otherwise. It costs \(\$4\) to play.
Find the expected net gain.
Practice 4: Bernoulli Mean
Let \(X\) be Bernoulli with
\[ P(X=1)=0.7. \]Find \(\mathbb{E}[X]\).
Practice 5: Linear Transformation
Suppose
\[ \mathbb{E}[X]=8. \]If
\[ Y=5X+2, \]find \(\mathbb{E}[Y]\).
Practice 6: Sum of Random Variables
Suppose
\[ \mathbb{E}[X]=3,\qquad \mathbb{E}[Y]=7. \]Find \(\mathbb{E}[X+Y]\).
Practice 7: Continuous Uniform Mean
Let
\[ f_X(x)= \begin{cases} \frac16, & 0\le x\le6,\\ 0, & \text{otherwise}. \end{cases} \]Find \(\mathbb{E}[X]\).
Practice 8: Nonuniform Continuous Mean
Let
\[ f_X(x)= \begin{cases} 3x^2, & 0\le x\le1,\\ 0, & \text{otherwise}. \end{cases} \]Find \(\mathbb{E}[X]\).
Practice 9: Expected Number of Successes
Ten independent trials each have success probability \(0.3\).
Let \(X\) be the number of successes. Find \(\mathbb{E}[X]\).
Practice 10: Identify the Error
A student says: “A fair die has expected value \(3.5\), so \(3.5\) is the most likely result.”
Explain the error.
Practice Answers
Practice 1
\[ \mathbb{E}[X] = 0(0.2)+1(0.5)+4(0.3) = \boxed{1.7}. \]Practice 2
\[ \mathbb{E}[X] = \frac{1+2+3+4+5+6}{6} = \boxed{3.5}. \]Practice 3
Expected gross payoff:
\[ 12(0.25)=3. \]Subtract the \(\$4\) cost:
\[ 3-4=\boxed{-1}. \]The expected net gain is \(-\$1\).
Practice 4
\[ \boxed{\mathbb{E}[X]=0.7}. \]Practice 5
\[ \mathbb{E}[Y] = 5\mathbb{E}[X]+2 = 5(8)+2 = \boxed{42}. \]Practice 6
\[ \mathbb{E}[X+Y] = 3+7 = \boxed{10}. \]Practice 7
\[ \mathbb{E}[X] = \int_0^6x\left(\frac16\right)\,dx = \frac16\left[\frac{x^2}{2}\right]_0^6 = \boxed{3}. \]Practice 8
\[ \mathbb{E}[X] = \int_0^1x(3x^2)\,dx = 3\int_0^1x^3\,dx = \boxed{\frac34}. \]Practice 9
\[ \mathbb{E}[X]=np=10(0.3)=\boxed{3}. \]Practice 10
Expected value is a probability-weighted average, not the most likely outcome. A fair die cannot produce \(3.5\), and every actual face has the same probability \(1/6\).
What to Remember
For a discrete random variable,
\[ \boxed{ \mathbb{E}[X] = \sum_x xP(X=x) }. \]For a continuous random variable,
\[ \boxed{ \mathbb{E}[X] = \int_{-\infty}^{\infty}x f_X(x)\,dx }. \]Expected value is a probability-weighted measure of center and, under repeated sampling conditions, describes long-run average behavior.
Linearity gives
\[ \boxed{\mathbb{E}[aX+b]=a\mathbb{E}[X]+b} \]and
\[ \boxed{\mathbb{E}[X+Y]=\mathbb{E}[X]+\mathbb{E}[Y]}. \]The central interpretation is: expected value is an average determined by both possible values and their probabilities, not a guaranteed or necessarily attainable outcome.
Where We Go Next
Expected value describes the center of a probability distribution, but two distributions with the same mean can have very different amounts of spread.
The next lesson, Variance and Standard Deviation, develops the principal numerical measures of variability for random variables.