University of Washington
Department of Mathematics Homework 8 Solutions

MATH 394: Probability I

Instructor: Arman Jahangiri

Submission: Single PDF on Gradescope

Deadline: 10:00 PM Pacific Time on the listed due date

This homework is worth 50 points.

Across the quarter, there are eight homework assignments, worth 400 points total. Homework assignments together account for 40% of the final course grade. Further course policies can be seen in the MATH 394 syllabus.

Homework Policy

Submission and Deadline

Please:

Late Days

Each student is allotted six late days for the quarter. A late day extends a homework deadline by up to 24 hours without penalty. For example, submitting an assignment anytime between 10:01 PM on the due date and 10:00 PM the following day counts as one late day.

The following rules apply:

Once all late days have been exhausted, additional late submissions will incur a penalty of 10% per day, up to a maximum deduction of 50%. Assignments submitted more than five days late, or after solutions have been released, will not be accepted.

Submission Issues and Technical Difficulties

If a serious technical issue prevents a timely Gradescope submission, students may temporarily submit their assignment by email to the instructor at armanjg@uw.edu. In such cases:

Email submissions are intended only for genuine technical emergencies and should not be used as a substitute for timely Gradescope submission.

Problem 1. Transformations of Random Variables

Source: Blitzstein and Hwang, Introduction to Probability, Chapter 8, Problem 1–5.

Find the following PDFs.

(a)
Find the PDF of \(e^{-X}\) for \(X\sim \operatorname {Expo}(1)\).
(b)
Find the PDF of \(X^7\) for \(X\sim \operatorname {Expo}(\lambda )\).
(c)
Find the PDF of \(Z^3\) for \(Z\sim N(0,1)\).
(d)
Find the PDF of \(Z^4\) for \(Z\sim N(0,1)\).
(e)
Find the PDF of \(|Z|\) for \(Z\sim N(0,1)\).

Solution

Let \(\phi (z)=(2\pi )^{-1/2}e^{-z^2/2}\) denote the standard normal density.

(a) Put \(Y=e^{-X}\). Since \(X>0\), we have \(0<Y<1\). The inverse transformation is \(x=-\log y\), and \[ \left |\frac {dx}{dy}\right |=\frac 1y. \] Thus \[ f_Y(y)=e^{-(-\log y)}\frac 1y=1, \qquad 0<y<1. \]

Final Answer for Part (a)

\[ f_Y(y)=1,\qquad 0<y<1. \]

(b) Put \(Y=X^7\). The inverse is \(x=y^{1/7}\) for \(y>0\), and \[ \left |\frac {dx}{dy}\right |=\frac {1}{7}y^{-6/7}. \] Therefore \[ f_Y(y)=\frac {\lambda }{7}y^{-6/7}e^{-\lambda y^{1/7}}, \qquad y>0. \]

Final Answer for Part (b)

\[ f_Y(y)=\frac {\lambda }{7}y^{-6/7}e^{-\lambda y^{1/7}}, \qquad y>0. \]

(c) Put \(Y=Z^3\). This transformation is one-to-one. For \(y\ne 0\), the inverse is \(z=y^{1/3}\) and \[ \left |\frac {dz}{dy}\right |=\frac {1}{3|y|^{2/3}}. \] Hence \[ f_Y(y)=\frac {\phi (y^{1/3})}{3|y|^{2/3}}, \qquad y\ne 0. \] The value assigned to the density at the single point \(y=0\) is immaterial.

Final Answer for Part (c)

\[ f_Y(y)=\frac {\phi (y^{1/3})}{3|y|^{2/3}}, \qquad y\ne 0. \]

(d) Put \(Y=Z^4\). The support is \(y>0\). For each \(y>0\), the two preimages are \(y^{1/4}\) and \(-y^{1/4}\). Adding the two contributions gives \[ f_Y(y) = \phi (y^{1/4})\frac {1}{4y^{3/4}} + \phi (-y^{1/4})\frac {1}{4y^{3/4}} = \frac {\phi (y^{1/4})}{2y^{3/4}}, \qquad y>0. \]

Final Answer for Part (d)

\[ f_Y(y)=\frac {\phi (y^{1/4})}{2y^{3/4}}, \qquad y>0. \]

(e) Put \(Y=|Z|\). For \(y>0\), the two preimages are \(y\) and \(-y\), and therefore \[ f_Y(y)=\phi (y)+\phi (-y)=2\phi (y), \qquad y>0. \]

Final Answer for Part (e)

\[ f_Y(y)=2\phi (y),\qquad y>0. \]

Problem 2. Log Ratio of Exponentials

Source: Blitzstein and Hwang, Introduction to Probability, Chapter 8, Problem 13.

Let \(X\) and \(Y\) be i.i.d. \(\operatorname {Expo}(\lambda )\), and let \[ T=\log (X/Y). \] Find the CDF and PDF of \(T\).

Solution

For real \(t\), \[ F_T(t)=P\!\left (\log (X/Y)\le t\right )=P(X\le e^tY). \] Conditioning on \(Y=y\) gives \[ F_T(t)=\int _0^\infty P(X\le e^t y)\lambda e^{-\lambda y}\dd y. \] Since \(X\sim \operatorname {Expo}(\lambda )\), \[ P(X\le e^t y)=1-e^{-\lambda e^t y}. \] Thus \[ F_T(t)=\int _0^\infty \left (1-e^{-\lambda e^t y}\right )\lambda e^{-\lambda y}\dd y =1-\frac {1}{1+e^t} =\frac {e^t}{1+e^t}. \] Differentiating the CDF gives \[ f_T(t)=\frac {e^t}{(1+e^t)^2}, \qquad -\infty <t<\infty . \] The parameter \(\lambda \) disappears because only the ratio \(X/Y\) matters.

Final Answer

\[ F_T(t)=\frac {e^t}{1+e^t}, \qquad f_T(t)=\frac {e^t}{(1+e^t)^2}, \qquad -\infty <t<\infty . \]

Problem 3. Linear Change of Variables

Source: Blitzstein and Hwang, Introduction to Probability, Chapter 8, Problem 14.

Let \(X\) and \(Y\) have joint PDF \(f_{X,Y}(x,y)\), and transform \((X,Y)\mapsto (T,W)\) linearly by letting \[ T=aX+bY, \qquad W=cX+dY, \] where \(a,b,c,d\) are constants such that \[ ad-bc\ne 0. \]

(a)
Find the joint PDF \(f_{T,W}(t,w)\) in terms of \(f_{X,Y}\), though your answer should be written as a function of \(t\) and \(w\).
(b)
For the case where \[ T=X+Y, \qquad W=X-Y, \] show that \[ f_{T,W}(t,w) = \frac 12 f_{X,Y}\left (\frac {t+w}{2},\frac {t-w}{2}\right ). \]

Solution

(a) Let \[ D=ad-bc. \] Solving the linear system gives \[ x=\frac {dt-bw}{D}, \qquad y=\frac {-ct+aw}{D}. \] The Jacobian determinant of the inverse transformation is \[ \left |\frac {\partial (x,y)}{\partial (t,w)}\right |=\frac {1}{|D|}. \] Therefore \[ f_{T,W}(t,w) = \frac {1}{|ad-bc|} f_{X,Y}\left (\frac {dt-bw}{ad-bc},\frac {-ct+aw}{ad-bc}\right ), \] for all \((t,w)\) whose inverse point lies in the support of \((X,Y)\).

Final Answer for Part (a)

\[ f_{T,W}(t,w) = \frac {1}{|ad-bc|} f_{X,Y}\left (\frac {dt-bw}{ad-bc},\frac {-ct+aw}{ad-bc}\right ). \]

(b) Here \(a=1\), \(b=1\), \(c=1\), and \(d=-1\), so \[ ad-bc=-2. \] Also \[ x=\frac {t+w}{2}, \qquad y=\frac {t-w}{2}. \] Thus \[ f_{T,W}(t,w) = \frac 12 f_{X,Y}\left (\frac {t+w}{2},\frac {t-w}{2}\right ). \]

Final Answer for Part (b)

\[ f_{T,W}(t,w) = \frac 12 f_{X,Y}\left (\frac {t+w}{2},\frac {t-w}{2}\right ). \]

Problem 4. Sum of Independent Gamma Random Variables

Source: Blitzstein and Hwang, Introduction to Probability, Chapter 8, Problem 29.

Let \[ X\sim \operatorname {Gamma}(a,\lambda ), \qquad Y\sim \operatorname {Gamma}(b,\lambda ), \] and suppose \(X\) and \(Y\) are independent, with \(a\) and \(b\) integers.

Show that \[ X+Y\sim \operatorname {Gamma}(a+b,\lambda ) \] in three ways:

(a)
with a convolution integral;
(b)
with MGFs;
(c)
with a story proof.

Solution

(a) For \(s>0\), the convolution density of \(S=X+Y\) is \[ f_S(s)=\int _0^s \frac {\lambda ^a}{\Gamma (a)}x^{a-1}e^{-\lambda x} \frac {\lambda ^b}{\Gamma (b)}(s-x)^{b-1}e^{-\lambda (s-x)}\dd x. \] This becomes \[ f_S(s)= \frac {\lambda ^{a+b}e^{-\lambda s}}{\Gamma (a)\Gamma (b)} \int _0^s x^{a-1}(s-x)^{b-1}\dd x. \] Using the beta integral, \[ \int _0^s x^{a-1}(s-x)^{b-1}\dd x = s^{a+b-1}\frac {\Gamma (a)\Gamma (b)}{\Gamma (a+b)}. \] Thus \[ f_S(s)=\frac {\lambda ^{a+b}}{\Gamma (a+b)}s^{a+b-1}e^{-\lambda s}, \qquad s>0, \] which is the \(\operatorname {Gamma}(a+b,\lambda )\) density.

Final Answer for Part (a)

\[ X+Y\sim \operatorname {Gamma}(a+b,\lambda ). \]

(b) The MGF of \(\operatorname {Gamma}(a,\lambda )\), using the rate parameter \(\lambda \), is \[ M_X(t)=\left (\frac {\lambda }{\lambda -t}\right )^a, \qquad t<\lambda . \] By independence, \[ M_{X+Y}(t)=M_X(t)M_Y(t) = \left (\frac {\lambda }{\lambda -t}\right )^a \left (\frac {\lambda }{\lambda -t}\right )^b = \left (\frac {\lambda }{\lambda -t}\right )^{a+b}. \] This is the MGF of \(\operatorname {Gamma}(a+b,\lambda )\).

Final Answer for Part (b)

\[ M_{X+Y}(t)=\left (\frac {\lambda }{\lambda -t}\right )^{a+b}. \]

(c) When \(a\) and \(b\) are positive integers, \(\operatorname {Gamma}(a,\lambda )\) is the waiting time for the \(a\)th arrival in a Poisson process of rate \(\lambda \). Likewise, \(\operatorname {Gamma}(b,\lambda )\) is the additional waiting time for the next \(b\) arrivals. By the independent increments property of the Poisson process, the total time to wait for \(a+b\) arrivals is the sum of these two independent waiting times. Hence the total waiting time is \(\operatorname {Gamma}(a+b,\lambda )\).

Final Answer for Part (c)

\[ X+Y\sim \operatorname {Gamma}(a+b,\lambda ). \]

Problem 5. A Chebyshev Bound for the Sample Mean

Source: Blitzstein and Hwang, Introduction to Probability, Chapter 10, Problem 2.

For i.i.d. random variables \(X_1,\dots ,X_n\) with mean \(\mu \) and variance \(\sigma ^2\), give a value of \(n\), as a specific number, that will ensure that there is at least a \(99\%\) chance that the sample mean will be within \(2\) standard deviations of the true mean \(\mu \).

Solution

The sample mean has \[ E(\bar X_n)=\mu , \qquad \Var (\bar X_n)=\frac {\sigma ^2}{n}. \] Chebyshev’s inequality gives \[ P(|\bar X_n-\mu |\ge 2\sigma ) \le \frac {\Var (\bar X_n)}{(2\sigma )^2} = \frac {1}{4n}. \] To make the probability of being outside the interval at most \(0.01\), it is enough to require \[ \frac {1}{4n}\le 0.01. \] Thus \(n\ge 25\) is sufficient. With \(n=25\), Chebyshev gives \[ P(|\bar X_n-\mu |<2\sigma )\ge 0.99. \]

Final Answer

\[ n=25 \]

Problem 6. AM–GM from Jensen’s Inequality

Source: Blitzstein and Hwang, Introduction to Probability, Chapter 10, Problem 4.

The famous arithmetic mean–geometric mean inequality says that for any positive numbers \[ a_1,a_2,\dots ,a_n, \] we have \[ \frac {a_1+a_2+\cdots +a_n}{n} \ge (a_1a_2\cdots a_n)^{1/n}. \]

Show that this inequality follows from Jensen’s inequality, by considering \(E(\log X)\) for a random variable \(X\) whose possible values are \(a_1,\dots ,a_n\). You should specify the PMF of \(X\).

Solution

Let \(X\) take the values \(a_1,a_2,\dots ,a_n\) with equal probabilities: \[ P(X=a_j)=\frac 1n, \qquad j=1,\dots ,n. \] Then \[ E(X)=\frac {a_1+\cdots +a_n}{n} \] and \[ E(\log X)=\frac 1n\sum _{j=1}^n \log a_j = \log \left ((a_1a_2\cdots a_n)^{1/n}\right ). \] Since \(\log x\) is concave, Jensen’s inequality gives \[ E(\log X)\le \log (E X). \] Therefore \[ \log \left ((a_1a_2\cdots a_n)^{1/n}\right ) \le \log \left (\frac {a_1+\cdots +a_n}{n}\right ). \] Because the logarithm is increasing, exponentiating both sides gives \[ (a_1a_2\cdots a_n)^{1/n} \le \frac {a_1+a_2+\cdots +a_n}{n}. \]

Final Answer

\[ \frac {a_1+a_2+\cdots +a_n}{n} \ge (a_1a_2\cdots a_n)^{1/n}. \]

Problem 7. Equality and Inequality Symbols

Source: Blitzstein and Hwang, Introduction to Probability, Chapter 10, Problem 7.

Let \(X\) and \(Y\) be i.i.d. positive random variables, and let \(c>0\). For each part below, fill in the appropriate equality or inequality symbol.

Write \(=\) if the two sides are always equal, \(\le \) if the left-hand side is less than or equal to the right-hand side but not necessarily equal, and similarly for \(\ge \). If no relation holds in general, write \(?\).

(a)
\(E(\log X)\ \underline {\hspace {1cm}}\ \log (E X)\)
(b)
\(E(X)\ \underline {\hspace {1cm}}\ \sqrt {E(X^2)}\)
(c)
\(E(\sin ^2 X)+E(\cos ^2 X)\ \underline {\hspace {1cm}}\ 1\)
(d)
\(E(|X|)\ \underline {\hspace {1cm}}\ \sqrt {E(X^2)}\)
(e)
\(P(X>c)\ \underline {\hspace {1cm}}\ \dfrac {E(X^3)}{c^3}\)
(f)
\(P(X\le Y)\ \underline {\hspace {1cm}}\ P(X\ge Y)\)
(g)
\(E(XY)\ \underline {\hspace {1cm}}\ \sqrt {E(X^2)E(Y^2)}\)
(h)
\(P(X+Y>10)\ \underline {\hspace {1cm}}\ P(X>5\text { or }Y>5)\)
(i)
\(E(\min (X,Y))\ \underline {\hspace {1cm}}\ \min (EX,EY)\)
(j)
\(E(X/Y)\ \underline {\hspace {1cm}}\ \dfrac {EX}{EY}\)
(k)
\(E\!\left (X^2(X^2+1)\right )\ \underline {\hspace {1cm}}\ E\!\left (X^2(Y^2+1)\right )\)
(l)
\(E\!\left (\dfrac {X^3}{X^3+Y^3}\right )\ \underline {\hspace {1cm}}\ E\!\left (\dfrac {Y^3}{X^3+Y^3}\right )\)

Solution

The answers are as follows. \[ \begin {array}{c|c|l} \text {Part} & \text {Symbol} & \text {Reason}\\ \hline (a) & \le & \log x\text { is concave, by Jensen.}\\ (b) & \le & (E X)^2\le E(X^2).\\ (c) & = & \sin ^2 X+\cos ^2 X=1\text { pointwise.}\\ (d) & \le & (E|X|)^2\le E(X^2).\\ (e) & \le & \text {Markov applied to }X^3.\\ (f) & = & \text {Symmetry of i.i.d. }X,Y.\\ (g) & \le & \text {Cauchy--Schwarz.}\\ (h) & \le & X+Y>10\text { implies }X>5\text { or }Y>5.\\ (i) & \le & \min (X,Y)\le X\text { and }\min (X,Y)\le Y.\\ (j) & ? & \text {No fixed relation holds in general.}\\ (k) & \ge & E(X^4)\ge (E X^2)^2.\\ (l) & = & \text {Symmetry, and the two fractions exchange when }X,Y\text { are swapped.} \end {array} \]

For part (k), independence gives \[ E\!\left (X^2(Y^2+1)\right )=(E X^2)^2+E(X^2), \] while the left-hand side is \(E(X^4)+E(X^2)\), so the comparison reduces to \(E(X^4)\ge (E X^2)^2\).

Final Answer

\[ \begin {array}{c|cccccccccccc} \text {Part} & (a)&(b)&(c)&(d)&(e)&(f)&(g)&(h)&(i)&(j)&(k)&(l)\\ \hline \text {Symbol} & \le& \le& =&\le& \le& =&\le& \le& \le& ?&\ge& = \end {array} \]

Problem 8. Ratio of Sample Sums

Source: Blitzstein and Hwang, Introduction to Probability, Chapter 10, Problem 21.

Let \(X_1,X_2,\dots \) be i.i.d. positive random variables with mean \(2\). Let \(Y_1,Y_2,\dots \) be i.i.d. positive random variables with mean \(3\).

Show that \[ \frac {X_1+X_2+\cdots +X_n}{Y_1+Y_2+\cdots +Y_n} \to \frac 23 \] with probability \(1\).

Does it matter whether the \(X_i\) are independent of the \(Y_j\)?

Solution

By the Strong Law of Large Numbers, \[ \frac {X_1+\cdots +X_n}{n}\to 2 \qquad \text {with probability }1, \] and \[ \frac {Y_1+\cdots +Y_n}{n}\to 3 \qquad \text {with probability }1. \] On the event where both convergences occur, which has probability \(1\), we may divide the two limits since the denominator tends to the nonzero constant \(3\). Hence \[ \frac {X_1+\cdots +X_n}{Y_1+\cdots +Y_n} = \frac {(X_1+\cdots +X_n)/n}{(Y_1+\cdots +Y_n)/n} \to \frac {2}{3}. \] The independence between the \(X_i\)’s and the \(Y_j\)’s is not needed. What is needed is that each sequence separately satisfies the Strong Law. The two probability-one events can be intersected, and the intersection still has probability \(1\).

Final Answer

\[ \frac {X_1+\cdots +X_n}{Y_1+\cdots +Y_n}\to \frac 23 \qquad \text {with probability }1. \] No cross-independence between the two sequences is needed.

Problem 9. CLT Approximation

Source: Blitzstein and Hwang, Introduction to Probability, Chapter 10, Problem 22.

Let \[ U_1,U_2,\dots ,U_{60} \] be i.i.d. \(\operatorname {Unif}(0,1)\) and let \[ X=U_1+U_2+\cdots +U_{60}. \]

(a)
Which important distribution is the distribution of \(X\) very close to? Specify what the parameters are, and state which theorem justifies your choice.
(b)
Give a simple but accurate approximation for \[ P(X>17). \] Justify briefly.

Solution

(a) For one \(\operatorname {Unif}(0,1)\) random variable, \[ E(U_j)=\frac 12, \qquad \Var (U_j)=\frac 1{12}. \] Therefore \[ E(X)=60\cdot \frac 12=30, \qquad \Var (X)=60\cdot \frac 1{12}=5. \] By the Central Limit Theorem, the distribution of \(X\) is very close to \[ N(30,5). \]

Final Answer for Part (a)

\[ X\approx N(30,5). \]

(b) Using the normal approximation, \[ P(X>17) \approx P\left (N(30,5)>17\right ) = P\left (Z>\frac {17-30}{\sqrt 5}\right ). \] The standardized value is \[ \frac {17-30}{\sqrt 5}\approx -5.81. \] Thus \[ P(X>17)\approx P(Z>-5.81)=\Phi (5.81), \] which is essentially \(1\).

Final Answer for Part (b)

\[ P(X>17)\approx \Phi (5.81)\approx 0.999999997, \] so a simple accurate approximation is \(1\).

Problem 10. Exponential Transformation and Sample Mean

Source: Blitzstein and Hwang, Introduction to Probability, Chapter 10, Problem 25.

(a)
Let \[ Y=e^X, \qquad X\sim \operatorname {Expo}(3). \] Find the mean and variance of \(Y\).
(b)
For \(Y_1,\dots ,Y_n\) i.i.d. with the same distribution as \(Y\) from part (a), what is the approximate distribution of the sample mean \[ \bar Y_n=\frac 1n\sum _{j=1}^{n}Y_j \] when \(n\) is large?

Solution

(a) Since \(X\sim \operatorname {Expo}(3)\), its MGF is \[ M_X(t)=\frac {3}{3-t}, \qquad t<3. \] Because \(Y=e^X\), \[ E(Y)=E(e^X)=M_X(1)=\frac 32. \] Also \[ E(Y^2)=E(e^{2X})=M_X(2)=3. \] Therefore \[ \Var (Y)=E(Y^2)-[E(Y)]^2 =3-\frac 94 =\frac 34. \]

Final Answer for Part (a)

\[ E(Y)=\frac 32, \qquad \Var (Y)=\frac 34. \]

(b) By the Central Limit Theorem, when \(n\) is large, \[ \bar Y_n\approx N\left (E(Y),\frac {\Var (Y)}{n}\right ) = N\left (\frac 32,\frac {3}{4n}\right ). \]

Final Answer for Part (b)

\[ \bar Y_n\approx N\left (\frac 32,\frac {3}{4n}\right ). \]

Problem 11. MGF of the Poisson Sample Mean

Source: Blitzstein and Hwang, Introduction to Probability, Chapter 10, Problem 27.

Consider i.i.d. \(\operatorname {Pois}(\lambda )\) random variables \[ X_1,X_2,\dots . \] The MGF of \(X_j\) is \[ M(t)=e^{\lambda (e^t-1)}. \]

(a)
Find the MGF \(M_n(t)\) of the sample mean \[ \bar X_n=\frac 1n\sum _{j=1}^{n}X_j. \]
(b)
Find the limit of \(M_n(t)\) as \(n\to \infty \). You can do this with almost no calculation using a relevant theorem, or you can use part (a) and the fact that \(e^x\approx 1+x\) if \(x\) is very small.

Solution

(a) We compute \[ M_n(t)=E\left (e^{t\bar X_n}\right ) =E\left (e^{(t/n)(X_1+\cdots +X_n)}\right ). \] By independence, \[ M_n(t)=\prod _{j=1}^n E\left (e^{(t/n)X_j}\right ) =\left [M\left (\frac tn\right )\right ]^n. \] Using the Poisson MGF, \[ M_n(t)=\left [e^{\lambda (e^{t/n}-1)}\right ]^n = \exp \left (n\lambda (e^{t/n}-1)\right ). \]

Final Answer for Part (a)

\[ M_n(t)=\exp \left (n\lambda (e^{t/n}-1)\right ). \]

(b) As \(n\to \infty \), \[ e^{t/n}-1\sim \frac tn. \] Therefore \[ n\lambda (e^{t/n}-1)\to \lambda t. \] It follows that \[ M_n(t)\to e^{\lambda t}. \] This is the MGF of the constant random variable equal to \(\lambda \), which agrees with the Law of Large Numbers.

Final Answer for Part (b)

\[ \lim _{n\to \infty }M_n(t)=e^{\lambda t}. \]