Expectation
Last modified — 13 Nov 2026
By the end of this lecture, students are anticipated to be able to:
Calculate expected values from continuous and discrete random variables/distributions
Apply properties to functions of expected values
The expected value of a random variable \(g(X)\) is defined by
\[ \mathbb{E}[g(X)] = \begin{cases} \displaystyle\sum_{x} g(x) p_X(x) & \text{if $X$ is discrete}\\ \\ \displaystyle\int_{-\infty}^\infty g(x) f_X(x) \mathsf{d}x & \text{if $X$ is absolutely continuous} \end{cases} \]
provided that the sum or integral exists.
Let \(X\) be the value of the face of a die when rolled. What is the expected value of \(X\)?
Let \(X \sim {\mathrm{Binom}}(n, \theta)\). What is \(\mathbb{E}[X]\)?
Hint: we can use kernel matching and use the fact that \(x\binom{n}{x} = n\binom{n-1}{x-1}\).
Recall that the PDF of a RV \(Y\sim{\mathrm{Gam}}(\theta, \beta)\) is given by \[f_X(x) = \frac{\lambda^\alpha}{\Gamma(\alpha)} x^{\alpha - 1} e^{-\lambda x} I_{(0,\infty)}(x).\]
Suppose\(X \sim \textrm{Gamma}(\alpha, \lambda )\). What is \(\mathbb{E}[X]\)?
Let \(X \sim {\mathrm{Gam}}(\alpha, \lambda)\) where \(\alpha>0\) and \(\lambda > 0\).
Let \(t < \lambda\). Find \(\mathbb{E}[\exp(tX)]\).
(Where the expected value exists.)
Let \(X\sim U(0,\theta)\) and \(Y\sim{\mathrm{Exp}}(1)\) be independent.
Find \(\mathbb{E}\left[\frac{1}{2}(X + Y)^2\right]\).
Let \(g : {\mathbb{R}}^2 \to {\mathbb{R}}\) be a function.
If \(X\) and \(Y\) are both discrete random variables, then \[\begin{aligned} \mathbb{E}[g(X, Y)] &= \sum_{x} \sum_{y} g(x, y) p_{X,Y}(x, y). \end{aligned}\] If \(X\) and \(Y\) are jointly absolutely continuous random variables, then \[\begin{aligned} \mathbb{E}[g(X, Y)] &= \int_{-\infty}^\infty \int_{-\infty}^\infty g(x, y) f_{X,Y}(x, y) \mathsf{d}x \mathsf{d}y. \end{aligned}\]
Suppose that \(X\) and \(Y\) are jointly absolutely continuous random variables with joint PDF \(f_{X,Y}(x, y)\). Note that \(\mathbb{E}[g(X)h(Y)]\) is a scalar-valued function of \(X\) and \(Y\).
\[\begin{aligned} \mathbb{E}[g(X)h(Y)] &= \int_{-\infty}^\infty \int_{-\infty} ^\infty g(x) h(y) f_{X,Y}(x, y) \mathsf{d}x \mathsf{d}y \\ &= \int_{-\infty}^\infty \int_{-\infty}^\infty g(x) h(y) f_X(x) f_Y(y) \mathsf{d}x\mathsf{d}y && \text{$X$ and $Y$ are independent} \\ &= \int_{-\infty}^\infty g(x) f_X(x) \mathsf{d}x \int_{-\infty}^\infty h(y) f_Y(y) \mathsf{d}y \\ &= \mathbb{E}[g(X)] \mathbb{E}[h(Y)]. \end{aligned}\]
Let \(X\) and \(Y\) have joint PDF \[f_{X,Y}(x,y) = 8xyI_{\{0 < x < y < 1\}}(x,y).\]
Consider the following joint distribution:
| \(\mathbb{P}(X,Y)\) | \(1\) | \(2\) | \(3\) |
|---|---|---|---|
| \(0\) | 0.10 | 0.05 | 0.05 |
| \(1\) | 0.10 | 0.20 | 0.10 |
| \(2\) | 0.05 | 0.10 | 0.25 |
Find \(\mathbb{E}[XY]\).
Midterm 2 is in class on Friday November 20 (testing sections 2.4 (continuous RV/distributions) to 3.2 (today’s class))
Start prepping your cheat sheet
Calculators will be inspected
Stat 302 - Winter 2025/26