\documentclass[letterpaper,11pt]{article}
\newcommand{\removefromfile}[1]{}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage[most]{tcolorbox}
\newcommand{\expect}[1]{\mathbb{E}\left[#1\right]}
\newcommand{\Var}[1]{\mathrm{Var}\left(#1\right)}
\renewcommand{\Pr}{\mathbb{P}}
\newcommand{\Prob}[1]{\Pr\left(#1 \right)}
\begin{document}
\title{{\bf Problem Set 7} }
\author{Name: TODO}
\date{}
\maketitle
\section*{Collaborators}
TODO: List collaborators, if any.
\newpage
\section*{Task 1 (Distant stars)}
An astronomer would like to measure the distance (in light years) from her observatory to a distant star. Each measurement is noisy, yielding only an estimate of the distance. Therefore, the astronomer plans to make a series of independent measurements and then use the average value of these measurements as her estimate of the actual distance. Suppose that each measurement has mean $D$ (the true distance) and a variance of 4 light years. How many measurements does she need to make to be 95\% confident that her estimate is accurate to within $\pm 0.5$ light years?
\begin{tcolorbox}
TODO: Your solution here.
\end{tcolorbox}
\newpage
\section*{Task 2 (So Many Approximations)}
Let $X$ be Binomial with parameters $n = 40$ and $p = 1/4$ and suppose that we are interested in computing $\Prob{5 \le X \le 7}$.
\begin{enumerate}[label=\alph*)]
\item (3 points) Compute the answer exactly (correct to 4 decimal places).
\item (3 points) Approximate the answer using the Poisson approximation (correct to 4 decimal places).
\item (4 points) Approximate the answer using the Central Limit Theorem (that is, a normal approximation). Be sure to use continuity correction (correct to 4 decimal places).
\end{enumerate}
\begin{tcolorbox}
TODO: Your solution here.
\end{tcolorbox}
\newpage
\section*{Task 3 (Take me to a Higher Level)}
Shreya is playing League of Legends\footnote{Anna wrote this problem never having played League of Legends so if it doesn't make sense in the context of the actual game, just pretend it does.} for $H$ hours, where $H$ is a random variable, equally likely to be 1, 2 or 3. The level $L$ that she gets to is random and depends on how long she plays for. We are told that
$$\Pr(L = \ell \mid H= h) = \frac{1}{h},\quad\quad \text{ for }\ell=1, \ldots, h \;.$$
\begin{enumerate}[label=\alph*)]
\item (5 points) Find the joint distribution of $L$ and $H$.
\item (5 points) Find the marginal distribution of $L$.
\item (5 points) Find the conditional distribution of $H$ given that $L=1$ (that is, $\Pr(H= h \mid L=1)$ for each possible $h$ in 1,2,3). Use the definition of conditional probability and the results from previous parts.
\item (10 points) Suppose that we are told that Shreya got to level 1 or 2. Find the expected number of hours she played conditioned on this event, defined as follows:
$$\expect{H \mid L=1 \cup L=2} = \sum_{h=1}^3 h \cdot \Pr(H=h \mid L=1 \cup L=2)$$
\end{enumerate}
\begin{tcolorbox}
TODO: Your solution here.
\end{tcolorbox}
\newpage
\section*{Task 4 (Joint Densities)}
Suppose that $X,Y$ are jointly continuous rv's with joint density
$$f_{X,Y}(x,y)=
\begin{cases}
6x^2y & 0\le x\le 1,0\le y\le 1 \\
0 & \text{otherwise}
\end{cases}$$
(Observe that this is a probability density function since it is non-negative and we can use nested integrals to show that
$$\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} f_{X,Y}(xy) ~dy ~dx=\int_0^1 \int_0^1 6x^2 y ~dy ~dx=\int_0^1 \left(3x^2y^2\Big|^{y=1}_{y=0}\right)~dx
=\int_0^1 3x^2 ~dx=x^3\Big|^{x=1}_{x=0}=1.)$$
Your answers below should \textbf{not} be evaluated unless otherwise specified. Your answers should usually be in terms of integrals or nested double integrals.
\begin{enumerate}[label=\alph*)]
\item (5 points) Write an expression used nested integrals that we can evaluate to find $\Pr(Y\ge X)$. Hint: draw the region of the joint density, and the desired region.
\item (5 points) Write an expression using using a single integral that we can evaluate to find the marginal density $f_X(x)$. Be sure to specify the value of $f_X(x)$ for all $x\in\mathbb{R}$. Do the same for $f_Y(y)$.
\item (5 points) Are $X$ and $Y$ independent? Justify your answer. (You may need to evaluate an integral or two to do this.)
\end{enumerate}
\begin{tcolorbox}
TODO: Your solution here.
\end{tcolorbox}
\newpage
\section*{Task 5 (More Joint Densities)}
Let $X,Y,Z$ be independent and uniformly distributed over (0,1) Compute $$\Pr(X \ge YZ).$$
Your answer should be a number.
Hint: You just need to integrate over the relevant region of the joint density $f_{X,Y,Z}(x,y,z)$.
\begin{tcolorbox}
TODO: Your solution here.
\end{tcolorbox}
\end{document}