2025-11-10
Define the expected value for discrete and continuous RVs
Calculate the expected value (mean) of a single discrete RV
Calculate the expected value (mean) of a single continuous RV
Calculate expected value for the sum of discrete or continuous RVs
Calculate expected value for joint densities (continuous RVs)
Calculate the expected value (mean) of a single discrete RV
Calculate the expected value (mean) of a single continuous RV
Calculate expected value for the sum of discrete or continuous RVs
Calculate expected value for joint densities (continuous RVs)
Example 1
Suppose you roll a fair 6-sided die. What value do you expect to get?
Definition: Expected value of discrete RV
The expected value of a discrete RV \(X\) that takes on values \(x_1, x_2, \ldots, x_n\) is \[\mathbb{E}[X] = \sum_{i=1}^n x_ip_X(x_i)\] where \(n\) can be \(\infty\)
Definition: Expected value of continuous RV
The expected value of a continuous RV \(X\) is \[\mathbb{E}[X] = \displaystyle\int_{-\infty}^\infty xf_X(x) dx\] where we adjust the integrand based on the bounds of \(X\)
Calculate the expected value (mean) of a single continuous RV
Calculate expected value for the sum of discrete or continuous RVs
Calculate expected value for joint densities (continuous RVs)
Example 2
Suppose the die is 6-sided, but not fair. And the probabilities of each side is distributed as:
| \(x\) | \(p_X(x)\) |
|---|---|
| 1 | 0.10 |
| 2 | 0.05 |
| 3 | 0.02 |
| 4 | 0.30 |
| 5 | 0.50 |
| 6 | 0.03 |
What value do you expect to get on a roll?
Example 3
Suppose \[X = \left\{ \begin{array}{ll} 1 & \quad \mathrm{with\ probability}\ p \quad\mathrm{(success)}\\ 0 & \quad \mathrm{with\ probability}\ 1-p \quad\mathrm{(failure)} \end{array} \right.\] Find the expected value of \(X\).
Example 4
Suppose \[X = \left\{ \begin{array}{ll} 1 & \quad \mathrm{with\ probability}\ p \\ -1 & \quad \mathrm{with\ probability}\ 1-p \end{array} \right.\] Find the expected value of \(X\).
Define the expected value for discrete and continuous RVs
Calculate the expected value (mean) of a single discrete RV
Calculate expected value for the sum of discrete or continuous RVs
Calculate expected value for joint densities (continuous RVs)
Example 5
Let \(f_X(x)= \frac{1}{b-a}\), for \(a \leq x \leq b\). Find \(\mathbb{E}[X]\).
Example 6
Let \(f_X(x)= \lambda e^{-\lambda x}\), for \(x > 0\) and \(\lambda> 0\). Find \(\mathbb{E}[X]\).
Integrating by Parts
\(\displaystyle\int_a^b u dv = uv\bigg|^b_a - \displaystyle\int_a^b vdu\)
Define the expected value for discrete and continuous RVs
Calculate the expected value (mean) of a single discrete RV
Calculate the expected value (mean) of a single continuous RV
Example 7
Suppose you draw 2 cards from a standard deck of cards with replacement. Let \(X\) be the number of hearts you draw. Find \(\mathbb{E}[X]\).
Recall Binomial RV with \(n=2\):
\[p_X(x) = {2 \choose x}p^x(1-p)^{2-x} \text{ for } x = 0, 1, 2\]
Theorem: Sum of random variables
For RVs (discrete or continuous) \(X_i\) and constants \(a_i\), \(i=1,2,\dots, n\), \[\mathbb{E}\Bigg[\sum_{i=1}^n a_iX_i\Bigg] = \sum_{i=1}^n a_i\mathbb{E}[X_i] .\] Remark: The theorem holds for infinitely RV’s \(X_i\) as well.
Function with two constants
For a RV \(X\), and constants \(a\) and \(b\), \[\mathbb{E}[aX+b] = a\mathbb{E}[X] + b.\]
Expected value of sum of identically distributed RVs
If \(X_i\), \(i=1,2,\dots, n\), are identically distributed RV’s, then \[\mathbb{E}\bigg[\sum_{i=1}^n X_i\bigg] = n\mathbb{E}[X_1] .\]
Example 8
A tour group is planning a visit to the city of Minneapolis and needs to book 30 hotel rooms. The average price of a room is $200. In addition, there is a 10% tourism tax for each room. What is the expected cost for the 30 hotel rooms?
Define the expected value for discrete and continuous RVs
Calculate the expected value (mean) of a single discrete RV
Calculate the expected value (mean) of a single continuous RV
Calculate expected value for the sum of discrete or continuous RVs
If you have a joint distribution \(f_{X,Y}(x,y)\) and want to calculate \(\mathbb{E}[X]\), you have two options:
Find \(f_X(x)\) and use it to calculate \(\mathbb{E}[X]\).
Calculate \(\mathbb{E}[X]\) using the joint density: \[\mathbb{E}[X] = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}x f_{X,Y}(x,y)dydx.\]
You can do the same for \(\mathbb{E}[Y]\)!
Example 9
Let \(f_{X,Y}(x,y)= 2e^{-(x+y)}\), for \(0 \leq x \leq y\). Find \(\mathbb{E}[X]\).
Do this one at home by finding \(f_X(x)\) then \(\mathbb{E}[X] = \displaystyle\int_{-\infty}^\infty xf_X(x) dx\). See if you get the same result as next page’s answer!
Example 9
Let \(f_{X,Y}(x,y)= 2e^{-(x+y)}\), for \(0 \leq x \leq y\). Find \(\mathbb{E}[X]\).
Define the expected value for discrete and continuous RVs
Calculate the expected value (mean) of a single discrete RV
Calculate the expected value (mean) of a single continuous RV
Calculate expected value for the sum of discrete or continuous RVs
Calculate expected value for joint densities (continuous RVs)
Lesson 13 Slides