\documentclass[10pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage[small]{titlesec}
\usepackage{palatino, mathpazo}
\usepackage{inconsolata}
\usepackage{amsmath}
\newcommand{\ds}{\displaystyle}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\Var}{\operatorname{Var}}
\newpagestyle{main}[\small]{
\headrule
\sethead[\usepage][][]
{}{}{\usepage}
}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1.5ex}
\title{\sc Math 20 -- Homework 5 \framebox{Solutions!}}
\author{due Wednesday, August 2}
\date{}
\begin{document}
\maketitle
\pagestyle{main}
\textbf{Instructions:} This assignment is due at the \emph{beginning} of class. Staple your work together (do not just fold over the corner). Please write the questions in the correct order. If I cannot read your handwriting, you won't receive full credit.\\
\emph{You may use Wolfram Alpha to compute any necessary sums or integrals.}\\
\textbf{If you're using facts about distributions to answer the questions, be very clear about which distribution you're using to model that problem and why that distribution is appropriate.}
\begin{enumerate}
\item When you listen to your ``Math Homework'' playlist on shuffle on Spotify, you usually hear your favorite song about once every two days. If you then go a whole week without hearing it, how surprised are you? (In other words, what's the probability of this occurring?)
\textbf{Solution:} This situation is best modeled with a Poisson distribution. When your song is played, that is a success, and there are not a fixed number of trials. The rate of success is given to us as
\[
\texttt{1 play / two days}
\]
but the question asks about one week time scale. So, we translate the given rate to match the time scale:
\[
\lambda = \texttt{7/2 plays / one week.}
\]
The probability distribution function for the Poisson distribution tells us that the probability of zero successes in one unit of time is
\[
P(X=0) = \frac{\lambda^0 e^{-\lambda}}{0!} = e^{-7/2} \approx 0.0320.
\]
Hence, the probability that this happens is about 3.2\%. Personally, I would only be a little surprised.
\hrulefill
\item On an average 8-hour school day, 1000 people walk into Kemeny Hall. Assume this happens completely randomly\footnote{Of course, this is a terrible assumption---people are more likely to arrive in the short periods between classes. But let's ignore that for now.}. What is the probability that exactly six people enter Kemeny Hall in a ten minute span?
\textbf{Solution:} This is another situation that is modeled by a Poisson distribution. The successes are the arrivals of people. The given rate is
\[
\texttt{1000 people / 8 hours}
\]
but the question asks about a 10 minutes time scale. As there are $6 \cdot 8 = 48$ ten-minute spans in 8 hours, we adjust the rate to be
\[
\lambda = \texttt{1000/48 people / 10 minutes} = \texttt{125/6 people / 10 minutes}.
\]
The probability of exactly six arrivals in one unit of time is
\[
P(X=6) = \frac{\lambda^6 e^{-\lambda}}{6!} = 0.0001017.
\]
So, at $0.01\%$, this even is extremely unlikely.
\hrulefill
\item Let $X_1, X_2, \ldots, X_k$ be $k$ random variables that are mutually independent and uniformly distributed on the interval $[0,1]$. Define a new random variable $Y = \min(X_1, X_2, \ldots, X_k)$ such that the value of $Y$ is the smallest of the values of $X_1, X_2, \ldots, X_k$. Find $\E[Y]$.
\textbf{Solution:} In order to find the expected value of the continuous random variable $Y$, we must first figure out its probability density function. To do this, we'll instead figure out the cumulative density function, then differentiate. In other words, we must determine
\[
P(Y \leq r)
\]
for all real numbers $r$. Because each $X_i$ only takes values on $[0,1]$, it's easy to see that if $r < 0$ then $P(Y \leq r) = 0$ and if $r > 1$ then $P(Y \leq r) = 1$. What about $P(Y \leq r)$ for some $r \in [0,1]$?
First, note that for all $r$, $P(Y \leq r) = 1 - P(Y > r)$, as the events $Y \leq r$ and $Y > r$ are complements. In order for the minimum of $k$ random variables to be greater than $r$, all of the random variables themselves must take value greater than $r$. Phrased mathematically, the event
\[
Y > r
\]
is equivalent to
\[
X_1 > r, \qquad X_2 > r, \qquad \cdots \qquad X_k > r.
\]
Since each $X_k$ is uniformly distributed on $[0,1]$,
\[
P(X_i > r) = 1-r
\]
for all $i$. As these events are independent,
\[
P(Y > r) = P(X_i > r\text{ for all }i) = P(X_1 > r)P(X_2 > r)\cdots P(X_k > r) = (1-r)^k.
\]
This allows us to find the cumulative density function for $Y$: for $r \in [0,1]$,
\[
F(r) = P(Y \leq r) = 1 - (1-r)^k.
\]
The probability density function is found by taking the derivative with respect to $r$:
\[
f(r) = F'(r) = k(1-r)^{k-1},
\]
for $r \in [0,1]$ and $f(r) = 0$ elsewhere.
Lastly, we compute the expected value:
\[
\E[X] = \int_{-\infty}^{\infty} rf(r)dr = \int_{0}^1 kr(1-r)^{k-1}dr = \frac{1}{k+1}.
\]
[The integral can be computed using Wolfram Alpha.]
\hrulefill
\item Let $X$ be a discrete random variable that takes only positive integer values. Our normal formula for the expected value of $X$ says
\[
\E[X] = \sum_{k=1}^\infty kP(X=k).
\]
Prove the following alternate formula:
\[
\E[X] = \sum_{k=1}^\infty P(X \geq k).
\]
\textbf{Solution:} The common formula for expected value is
\[
\E[X] = \sum_{k=1}^\infty kP(X=k).
\]
Since $k$ is always an integer, we can use the fact that
\[
k \cdot P(X=k) = \underbrace{P(X=k) + P(X=k) + \cdots + P(X=k)}_{k\text{ times}}.
\]
Note also that since $X$ takes only positive integer values
\begin{equation}
P(X \geq k) = P(X=k) + P(X=k+1) + \cdots.
\end{equation}
Suppose that we take the sum
\[
\sum_{k=1}^\infty P(X \geq k)
\]
and use equation (1) to expand. We get
\[
\sum_{k=1}^\infty ( P(X = k) + P(X = k+1) + P(X = k+2) + \cdots ).
\]
How often is a particular term $P(X=N)$ counted in this sum? It appears once in $P(X \geq 1)$, once in $P(X \geq 2)$, etc, all the way up to $P(X \geq N)$, and then it doesn't appear in the rest of the terms. Thus, $P(X=N)$ is counted $N$ times---once in each of the first $N$ terms. Therefore,
\[
\sum_{k=1}^\infty P(X \geq k) = \sum_{k=1}^\infty kP(X = k) = \E[X]
\]
and the identity is proved.
\hrulefill
\end{enumerate}
\end{document}