Question 3.4.1
Let \(X\) be a discrete random variable with PMF \[
p_X(x) = \begin{cases} 0.2 & x = 0 \\ 0.5 & x = 1 \\ 0.3 & x = 2 \\ 0 & \text{otherwise.} \end{cases}
\]
Find the moment generating function \(M_X(t) = E[e^{tX}]\).
Use the MGF to find \(E[X]\).
Use the MGF to find \(E[X^2]\).
\[
\begin{aligned}
m_X(t) &= E[e^{tX}] = \sum_{x} e^{tx} p_X(x) \\
&= e^{0}(0.2) + e^{t}(0.5) + e^{2t}(0.3) \\
&= 0.2 + 0.5e^{t} + 0.3e^{2t}
\end{aligned}
\] This is defined for all real \(t\).
Differentiate: \[
m_X'(t) = 0.5e^{t} + 0.6e^{2t}
\] so \[
E[X] = m_X'(0) = 0.5 + 0.6 = 1.1.
\] (aside: compare this to \(E[X] = 0(0.2) + 1(0.5) + 2(0.3) = 1.1\)).
Differentiate again: \[
m_X''(t) = 0.5e^{t} + 1.2e^{2t}
\] so \[
E[X^2] = m_X''(0) = 0.5 + 1.2 = 1.7.
\] (aside: compare this to \(E[X^2] = 0^2(0.2) + 1^2(0.5) + 2^2(0.3) = 0.5 + 1.2 = 1.7\).)
Question 3.4.2
Consider the following joint distribution between random variables \(X\) and \(Y\).
| 0 |
0.10 |
0.15 |
0.05 |
| 1 |
0.20 |
0.30 |
0.10 |
| 2 |
0.05 |
0.03 |
0.02 |
(and of course, \(\mathbb{P}(X,Y) = 0\) otherwise.)
- Let \(Z = X + Y\). Find the MGF of \(Z\). Simplify your answer as much as possible.
\[
\begin{aligned}
m_Z(t) &= \mathbb{E}[e^{tZ}]\\
&= \mathbb{E}[e^{t(X+Y)}]\\
&=\sum_{x}\sum_{y}e^{t(x+y)}p_{XY}(x,y) \\
&= e^{t(0+1)}(0.10) + e^{t(0 +2)}(0.15) + e^{t(0 +3)}(0.05) + e^{t(1 +1)}(0.20) + \\
&e^{t(1 +2)}(0.30) + e^{t(1+3)}(0.10)+ e^{t(2 +1)}(0.05) + e^{t(2 +2)}(0.03) + e^{t(2+3)}(0.02)\\
&= 0.10e^t + 0.15e^{2t} + 0.05e^{3t} + 0.20e^{2t} + 0.30e^{3t} + 0.10e^{4t} + 0.05e^{3t} + \\
&0.03e^{4t} + 0.02e^{5t}\\
&= 0.10e^t + 0.35e^{2t} + 0.40e^{3t} + 0.13e^{4t} + 0.02e^{5t}
\end{aligned}
\]
- Use your MGF from part (a) to find the variance of \(Z\). Hint: start by finding \(\mathbb{E}(Z)\) and \(\mathbb{E}(Z^2)\).
\[
\begin{aligned}
\mathbb{E}(Z) &= m_Z'(0)\\
&= \frac{d}{dt}(0.10e^t + 0.35e^{2t} + 0.40e^{3t} + 0.13e^{4t} + 0.02e^{5t})|_{t=0}\\
&= 0.10e^t + 0.35(2)e^{2t} + 0.40(3)e^{3t} + 0.13(4)e^{4t} + 0.02(5)e^{5t}|_{t=0}\\
&= 0.10e^{(0)} + 0.35(2)e^{2(0)} + 0.40(3)e^{3(0)} + 0.13(4)e^{4(0)} + 0.02(5)e^{5(0)}\\
&= 0.10 + 2(0.35)+ 0.40(3) + 0.13(4) + 0.02(5)\\
&= 2.62
\end{aligned}
\] \[
\begin{aligned}
\mathbb{E}(Z^2) &= m_Z''(0)\\
&= \frac{d^2}{dt^2}(0.10e^t + 0.35e^{2t} + 0.40e^{3t} + 0.13e^{4t} + 0.02e^{5t})|_{t=0}\\
&= \frac{d}{dt}(0.10e^t + 0.35(2)e^{2t} + 0.40(3)e^{3t} + 0.13(4)e^{4t} + 0.02(5)e^{5t})|_{t=0}\\
&= 0.10e^t + 0.35(2)(2)e^{2t} + 0.40(3)(3)e^{3t} + 0.13(4)(4)e^{4t} + 0.02(5)(5)e^{5t}|_{t=0}\\
&= 0.10e^0 + 0.35(2)(2)e^{2(0)} + 0.40(3)(3)e^{3(0)} + 0.13(4)(4)e^{4(0)} + 0.02(5)(5)e^{5(0)}\\
&= 0.10+ 0.35(2)(2) + 0.40(3)(3) + 0.13(4)(4) + 0.02(5)(5)\\
&= 7.68
\end{aligned}
\] \[
\begin{aligned}
\operatorname{Var}[Z] &= \mathbb{E}[Z^2] - \mathbb{E}[Z]\\
&= 7.68 - 2.62^2\\
&= 0.8156
\end{aligned}
\]
Question 3.4.3
Use the MGF to find the \(\mathbb{E}(X)\) where \(f_X(x) = 3e^{-3x}I_{(0, \infty)}(x)\) for \(t < 3\).
First we find the MGF:
\[
\begin{aligned}
m_X(t) &= \mathbb{E}[e^{tx}]\\
&= \int_0^{\infty} e^{tx}3 e^{-3 x}\, dx\\
&= \int_0^{\infty}3 e^{x(t -3)}\, dx\\
&= \frac{3}{t - 3}e^{x(t-3)} \Bigg|_{x = 0}^{x =\infty}\\
&= \frac{3}{t - 3}[0 - 1]\\
&= \frac{3}{3 - t}
\end{aligned}
\]
Now we find the derivative at \(t = 0\). \[
\begin{aligned}
\frac{d}{dt}m_X(t)|_{t = 0} &= \frac{d}{dt}\left(\frac{3}{3 -t}\right)\Bigg|_{t = 0}\\
&= \frac{d}{dt}\left((3)(3 -t)^{-1}\right)\Bigg|_{t = 0}\\
&= \left((-1)(3)(3 -t)^{-2}(-1)\right)\Bigg|_{t = 0}\\
&= (-1)(3)(0-3)^{-2}(-1)\\
&= \frac{1}{3}
\end{aligned}
\]
Question 3.4.4
The moment generating function \(Y \sim {\mathrm{Binom}}(n, \theta)\) is \(m_Y(t) = \left(1 - \theta + \theta e^t\right)^n\).
Use the MGF to show that the variance of \(Y\) is \(n\theta(1 - \theta)\).
\[
\begin{aligned}
\mathbb{E}(Y) &= \frac{d}{dt}m_Y(t)\Big|_{t = 0}\\
&= \frac{d}{dt}(1 - \theta + \theta e^t)^n \Big|_{t = 0}\\
&= n(1 - \theta + \theta e^t)^{n - 1}\theta e^t\Big|_{t = 0}\\
&= n(1-\theta + 0)\\
&= n \theta\\
\end{aligned}
\]
\[
\begin{aligned}
\mathbb{E}(Y^2) &= \frac{d^2}{dt^2}m_Y(t)\Big|_{t = 0}\\
&= \frac{d}{dt}\left(n(1 - \theta + \theta e^t)^{n - 1}\theta e^t\right) \Big|_{t = 0}\\
&= n\left(\frac{d}{dt}\left[(1 - \theta + \theta e^t)^{n - 1}\right](\theta e^t) + (1 - \theta + \theta e^t)^{n - 1}\frac{d}{dt}\left[(\theta e^t) \right]\right) \Big|_{t = 0}\\
&= n \left( (n-1)(1-\theta + \theta e^t)^{(n-2)}(\theta e^t)(\theta e^t) +(1-\theta+\theta e^t)^{(n-1)}\theta e^t\right)\Big|_{t=0}\\
&= n\left((n-1)(1)(\theta)(\theta) + (1)(\theta)\right)\\
&= n(n-1)\theta^2 + n\theta
\end{aligned}
\]
Then,
\[
\begin{aligned}
\operatorname{Var}(Y) &= \mathbb{E}(Y^2) - \left(\mathbb{E}(Y)\right)^2\\
&= n(n-1)\theta^2 + n\theta - n^2 \theta^2\\
&= n^2\theta^2 - n\theta^2 +n \theta - n^2\theta^2\\
&= n\theta(1 - \theta)
\end{aligned}
\]
Question 3.4.5
Let \(X\) and \(Y\) be continuous random variables with joint pdf \(f_{X,Y}(x,y) = 3xI_{[0,1]}(x)I_{[0, x]}(y)\).
Find the marginal MGF of \(X\), defined as \(m_X(t) = \mathbb{E}[e^{tx}]\).
\[
\begin{aligned}
m_X(t) &= \mathbb{E}[e^{tX}] \\
&= \int_{0}^1\int_{0}^x(e^{tx})3xdydx\\
&= \int_{0}^1\left[3xe^{tx}y\Big|_{y =0}^{y = x}\right]dx\\
&= \int_{0}^13x^2e^{tx}dx\\
...\\
&= 3(t^2x^2-2tx+2)\frac{e^{tx}}{t^3} - \frac{6}{t^3} \Big|_{x = 0}^{x = 1}\text{ (by integration by parts)}\\
&= \frac{3(t^2-2t+2)e^{t}-6}{t^3}\\
\end{aligned}
\]
or in other forms:
\(\frac{3(t^2-2t+2)e^{t}-6}{t^3}\),
or
\(\frac{3t^2e^t - 6te^t + 6e^t - 6}{t^3}\)
or
\(\frac{3e^t}{t} - \frac{6e^t}{t^2} + \frac{6(e^t-1)}{t^3}\).
Question 3.4.6
Recall: the Taylor series expansion around (0) for \(e^{u}\) is \(e^{u}=\sum _{n=0}^{\infty }\frac{u^{n}}{n!}=1+u+\frac{u^{2}}{2!}+\frac{u^{3}}{3!}+\cdots\)
Using a Taylor series expansion, show that the first, second, and third derivatives of the moment generating function \(\mathbb{E}[e^{tx}]\) evaluated at \(t = 0\) corresponds to \(\mathbb{E}[X]\), \(\mathbb{E}[X^2]\), and \(\mathbb{E}[X^3]\), respectively.
What is the expansion of \(e^{tx}\)? Use the linearity properties to simplify, then start looking at the derivatives.
No solution provided.