Question 3.1.1
The joint PMF of discrete random variables \(X\) and \(Y\) is given by:
| \(X=0\) |
0.30 |
0.05 |
0.35 |
| \(X=1\) |
0.20 |
0.25 |
0.45 |
| \(X=2\) |
0.10 |
0.10 |
0.20 |
| \(P(Y=y)\) |
0.60 |
0.40 |
1.00 |
- Compute \(E(X)\)
By definition of expectation for discrete random variables,
\[
\mathbb{E}(X) = \sum_{x}\sum_{y} x \, P(X = x, Y = y).
\]
Going cell by cell through the joint table:
\[
\begin{aligned}
\mathbb{E}(X) &= 0 \cdot P(0, 0) + 0 \cdot P(0, 1) + 1 \cdot P(1, 0) + 1 \cdot P(1, 1) + 2 \cdot P(2, 0) + 2 \cdot P(2, 1)\\
&= 0 + 0 + 1(0.20) + 1(0.25) + 2(0.10)+ 2(0.10)\\
&= 0.85
\end{aligned}
\]
You could also use the marginal distribution of \(X\) (less computation as it’s given on the right hand column of the table):
\[
\begin{aligned}
\mathbb{E}(X) &= 0(0.35) + 1(0.45) + 2(0.20)\\
&= 0.85
\end{aligned}
\]
- Compute \(E(XY)\)
By definition of expectation for discrete random variables,
\[
\mathbb{E}(XY) = \sum_{x}\sum_{y} xy \, P(X = x, Y = y).
\]
Going cell by cell through the joint table:
\[
\begin{aligned}
\mathbb{E}(XY) &= 0 \cdot 0 \cdot P(0, 0) + 0 \cdot 1 \cdot P(0, 1) + 1 \cdot 0 \cdot P(1, 0) + 1 \cdot 1 \cdot P(1, 1) + 2 \cdot 0 \cdot P(2, 0) + 2 \cdot 1 \cdot P(2, 1)\\
&= 0 + 0 + 0 + 1(0.25) + 0 + 2(0.10)\\
&= 0.25 + 0.20\\
&= 0.45
\end{aligned}
\]
Question 3.1.2
Suppose \(X\) and \(Y\) have joint probability:
\[
p_{X,Y}(x,y) = \begin{cases}
1/9 & x = -4, y = -2\\
2/9 & x = 5, y = -2\\
3/9 & x = 9, y = -2\\
2/9 & x = 9, y = 0\\
1/9 & x = 9, y = 4\\
0&\text{otherwise}
\end{cases}
\] (a) What is \(\mathbb{E}(X)\)?
\[
\begin{aligned}
\mathbb{E}(X) &= \sum_{x}\sum_yxp_{X,Y}(x,y)\\
&= -4(1/9) + 5(2/9) + 9(3/9) + 9(2/9) + 9(1/9)\\
&\approx 6.67
\end{aligned}
\]
- What is \(\mathbb{E}(X^2)\)?
\[
\begin{aligned}
\mathbb{E}(X^2) &= \sum_{x}\sum_yx^2p_{X,Y}(x,y)\\
&= -4^2(1/9) + 5^2(2/9) + 9^2(3/9) + 9^2(2/9) + 9^2(1/9)\\
&\approx 57.78
\end{aligned}
\]
- What is \(\mathbb{E}(e^{tx})\)?
\[
\begin{aligned}
\mathbb{E}(e^{tx}) &= \sum_{x}\sum_ye^{tx}p_{X,Y}(x,y)\\
&= e^{-4t}(1/9) + e^{-5t}(2/9) + e^{-9t}(3/9) + e^{-9t}(2/9) +e^{-9t}(1/9)\\
&= \frac{1}{9}e^{-4t} + \frac{2}{9}e^{-5t} +\frac{2}{3}e^{-9t}
\end{aligned}
\]
Question 3.1.3
Suppose you flip one fair coin and roll one fair six-sided die. Let \(X\) be the product of the numbers of heads (i.e., 0 or 1) times the number showing on the die. Compute \(\mathbb{E}(X)\).
Let \(X = Y\timesZ\) where \(Y\) is the number of heads and \(Z\) is the number showing on the dice. These are both independent events, so \(\mathbb{E}(X) = \mathbb{E}(YZ) = \mathbb{E}(Y)\mathbb{E}(Z)\).
\(\mathbb{E}(Y) = (1/2)(0) + (1/2)(1) = 1/2\)
\(\mathbb{E}(Z) = (1/6)(1) + (1/6)(2) +...+ (1/6)(6) = 3.5\).
Thus, \(\mathbb{E}(X) = \mathbb{E}(YZ) = \mathbb{E}(Y)\mathbb{E}(Z) = (1/2)(3.5) = 1.75\)
Question 3.1.4
Let \(f_X(x) = 2xI_{(0, 1)}(x)\).
- What is \(\mathbb{E}(X)\)?
\[
\begin{aligned}
\mathbb{E}(X) &= \int_{0}^{1} x\cdot2x \,dx\\
&= \int_{0}^{1} 2x^2 \,dx\\
&= \frac{2}{3}x^3\Big|_{x = 0}^{x = 1}\\
&= \frac{2}{3}
\end{aligned}
\]
- What is \(\mathbb{E}(e^{tx})\) for \(t > 0\)?
\[
\begin{aligned}
\mathbb{E}(e^{tx}) &= \int_{0}^{1} e^{tx}\cdot2x \,dx\\
&= \int_{0}^{1} 2xe^{tx} \,dx\\
\end{aligned}
\]
Let \(u = 2x \implies du = 2dx\) and \(dv = e^{tx}dx \implies v = \frac{1}{t}e^{tx}\). By integration by parts we have:
\[
\begin{aligned}
\mathbb{E}(e^{tx}) &= \int_{0}^{1} e^{tx}\cdot2x \,dx\\
&= \int_{0}^{1} 2xe^{tx} \,dx\\
&= (2x)\frac{1}{t}e^{tx}\Big|_{x = 0}^{x = 1} - \int_{0}^1\frac{2}{t}e^{tx}dx\\
&= \left[(2x)\frac{1}{t}e^{tx} - \frac{2}{t^2}{e^{tx}}\right]\Big|_{x = 0}^{x = 1}\\
&= \left(\frac{2}{t}- \frac{2}{t^2}\right)e^t
\end{aligned}
\]
Question 3.1.5
Let \(X\) and \(Y\) be jointly absolutely continuous random variables, with joint density function \[
f_{X,Y}(x,y) = \frac{3}{2}x^2I_{(0,1)}(x)I_{(0,2)}(y)
\]
What is \(E(XY)\)?
\[
\begin{aligned}
\mathbb{E}(XY) &= \int_{0}^{1} \int_0^{2}xy\cdot\frac{3}{2}x^2\, dydx\\
&= \int_{0}^{1} \int_0^{2}\frac{3}{2}x^3y\, dydx\\
&= \int_{0}^{1} \frac{3}{4}x^3y^2\Big|_{y = 0}^{y = 2}dx\\
&= \int_{0}^{1} \frac{3}{4}x^3(4)dx\\
&= \int_{0}^{1} 3x^3dx\\
&= \frac{3}{4}x^4 \Big|_{x = 0}^{x = 1}\\
&= \frac{3}{4}
\end{aligned}
\]
Question 3.1.6
Let \(X\) and \(Y\) be jointly absolutely continuous random variables, with joint density function \[
f_{X,Y}(x,y) = 6xy + \frac{9}{2}x^2y^2I_{(0,x)}(y)I_{(0,1)}(x)
\]
What is \(E(X^3)\)?
\[
\begin{aligned}
\mathbb{E}(X^3) &= \int_{0}^{1} \int_0^{x}x^3\cdot(6xy + \frac{9}{2}x^2y^2)\, dydx\\
&= \int_{0}^{1} \int_0^{x}(6x^4y + \frac{9}{2}x^5y^2)\, dydx\\
&= \int_{0}^{1} (3x^4y^2 + \frac{3}{2}x^5y^3)\Big|_{y = 0}^{y = x}\, dx\\
&= \int_{0}^{1} (3x^4x^2 + \frac{3}{2}x^5x^3)\, dx\\
&= \int_{0}^{1} (3x^6+ \frac{3}{2}x^8)\, dx\\
&= \left[ \frac{3}{7}x^7 + \frac{3}{18}x^9 \right]_{x = 0}^{x = 1}\\
&\approx 0.5952
\end{aligned}
\]
Question 3.1.7
Suppose\(X \sim \textrm{Gamma}(\alpha, \lambda )\). What is \(\mathbb{E}[X^2]\)?
We have that \[\begin{aligned}
\mathbb{E}[X] &= \int_0^\infty x^2 \frac{\lambda^\alpha}{\Gamma(\alpha)} x^{\alpha - 1} e^{-\lambda x} \mathsf{d}x \\
&= \frac{\lambda^\alpha}{\Gamma(\alpha)} \int_0^\infty x^{\alpha + 1} e^{-\lambda x} \mathsf{d}x \\
&= \frac{\lambda^\alpha}{\Gamma(\alpha)} \cdot \color{blue}{\frac{\Gamma(\alpha +
2)}{\lambda^{\alpha + 2}} }
\int_0^\infty \color{blue}{\frac{\lambda^{\alpha + 2}}{\Gamma(\alpha +
2)}} \color{black}{x^{\alpha + 2 - 1} e^{-\lambda x} \mathsf{d}x} && \color{blue}{\text{multiply by 1}} \\
&= \frac{\Gamma(\alpha + 2)}{\lambda^2 \Gamma(\alpha)} && \text{integral is pdf of Gamma}(\alpha + 2, \lambda)\\
&= \frac{(\alpha + 1)!}{\lambda^2 (\alpha - 1)!} && \text{because } \Gamma(\alpha + 1) = \alpha \Gamma(\alpha) \\
&= \frac{(\alpha + 1)(\alpha)}{\lambda^2}.
\end{aligned}\]