\bigskip
\textit{\textbf{Note:} This homework consists of two parts. The first part (questions 1-5) will be graded and will determine your score for this homework. The second part (questions 6-8) will be graded if you submit them, but will not affect your homework score in any way. You are strongly advised to attempt all the questions in the first part. You should attempt the problems in the second part only if you are interested and have time to spare.}
\rule{6in}{2px}
\begin{center}
For each problem, justify all your answers unless otherwise specified.
\end{center}
\section*{Part 1: Required Problems}
\bigskip
\Question{Warm-up}
Give numerical answers; no justification necessary.
\begin{Parts}
\Part You throw darts at a board until you hit the center area. Assume that the throws are i.i.d. and the probability of hitting the center area is $p = 0.17$. What is the probability that you hit the center on your eighth throw?
\Part Let $X \sim \Geom(0.2)$. Calculate the expectation and variance of $X$.
\Part Suppose the accidents occuring weekly on a particular stretch of a highway is Poisson distributed with average number of accidents equal to 3. Calculate the probability that there is at least one accident this week.
\Part Consider an experiment that consists of counting the number of $\alpha$ particles given off in a one-second interval by one gram of radioactive material. If we know from past experience that, on average, $3.2$ such $\alpha$-particles are given off per second, what is a good approximation to the probability that no more that $2$ $\alpha$-particles will appear?
\end{Parts}
\Question{Class Enrollment}
Lydia has just started her CalCentral enrollment appointment.
She needs to register for a marine science class and CS 70.
There are no waitlists, and she can attempt to enroll once per day in either class or both.
The CalCentral enrollment system is strange and picky, so the probability of enrolling successfully in the marine science class on each attempt is $\mu$ and the probability of enrolling successfully in CS 70 on each attempt is $\lambda$.
Also, these events are independent.
%Let $M$ be the number of days it takes to enroll in the music class, and $C$ be the number of days it takes to enroll in CS 70.
\begin{Parts}
\Part Suppose Lydia begins by attempting to enroll in the marine science class everyday and gets enrolled in it on day $M$.
What is the distribution of $M$?
\Part Suppose she is not enrolled in the marine science class after attempting each day for the first 5 days. What is the conditional distribution of $M$ given $M > 5$?
\Part Once she is enrolled in the marine science class, she starts attempting to enroll in CS 70 from day $M+1$ and gets enrolled in it on day $C$.
Find the expected number of days it takes Lydia to enroll in both the classes, i.e. $\E[C]$.
%\nosolspace{1cm}
\Part Suppose instead of attempting one by one, Lydia decides to attempt enrolling in both the classes from day 1.
Let $M$ be the number of days it takes to enroll in the marine science class, and $C$ be the number of days it takes to enroll in CS 70.
What is the distribution of $M$ and $C$ now? Are they independent?
\Part Let $X$ denote the day she gets enrolled in her first class and let $Y$ denote the day she gets enrolled in both the classes.
What is the distribution of $X$?
\Part What is the expected number of days it takes Lydia to enroll in both classes now, i.e. $\E[Y]$.
\Part What is the expected number of classes she will be enrolled in by the end of 14 days?
%\Part For some integer $k \geq 1$, what is the probability that she is enrolled in both classes before day $k$?
%\nosolspace{1cm}
\end{Parts}
\Question{Student Life}
In an attempt to avoid having to do laundry often, Marcus comes up with a system. Every night, he designates one of his shirts as his dirtiest shirt. In the morning, he randomly picks one of his shirts to wear. If he picked the dirtiest one, he puts it in a dirty pile at the end of the day (a shirt in the dirty pile is not used again until it is cleaned). When Marcus puts his last shirt into the dirty pile, he finally does his laundry, and again designates one of his shirts as his dirtiest shirt (laundry isn't perfect) before going to bed. This process then repeats.
\begin{Parts}
\Part If Marcus has $n$ shirts, what is the expected number of days that transpire between laundry events? Your answer should be a function of $n$ involving no summations.
%\nosolspace{4cm}
\Part Say he gets even lazier, and instead of organizing his shirts in his dresser every night, he throws his shirts randomly onto one of $n$ different locations in his room (one shirt per location), designates one of his shirts as his dirtiest shirt, and one location as the dirtiest location.
In the morning, if he happens to pick the dirtiest shirt, \textit{and} the dirtiest shirt was in the dirtiest location, then he puts the shirt into the dirty pile at the end of the day and does not throw any future shirts into that location and also does not consider it as a candidate for future dirtiest locations (it is too dirty). What is the expected number of days that transpire between laundry events now? Again, your answer should be a function of $n$ involving no summations.
%\nosolspace{4cm}
\end{Parts}
\Question{Unreliable Servers}
In a single cluster of a Google competitor, there are a huge number of servers $n$, each with a uniform and independent probability of going down in a given day. On average, 4 servers go down in the cluster per day. As each cluster is responsible for a huge amount of internet traffic, it is fair to assume that $n$ is a very large number. Recall that as $n \to \infty$, a $\text{Binom}(n, \lambda/n)$ distribution will tend towards a $\text{Poisson}(\lambda)$ distribution.
\begin{Parts}
\item What is an appropriate distribution to model the number of servers that crash on any given day for a certain cluster?
\nosolspace{1cm}
\item Compute the expected value and variance of the number of crashed servers on a given day for a certain cluster.
\nosolspace{1cm}
\item Compute the probability that fewer than 3 servers crashed on a given day for a certain cluster.
\nosolspace{2cm}
\item Compute the probability at least 3 servers crashed on a given day for a certain cluster.
\nosolspace{2cm}
\end{Parts}
\Question{Shuttles and Taxis at Airport}
In front of terminal 3 at San Francisco Airport is a pickup area where shuttles and taxis arrive according to a Poisson process. The shuttles arrive at a rate $\lambda_1 = 1/20$ (i.e. 1 shuttle per 20 minutes) and the taxis arrive at a rate $\lambda_2 = 1/10$ (i.e. 1 taxi per 10 minutes) starting at 00:00. The shuttles and the taxis arrive independently.
\begin{Parts}
\Part What is the distribution of the following:
\begin{enumerate}[(i)]
\item The number of taxis that arrive between times 00:00 and 00:20?
\item The number of shuttles that arrive between times 00:00 and 00:20?
\item The total number of pickup vehicles that arrive between times 00:00 and 00:20?
\end{enumerate}
\Part What is the probability that exactly 1 shuttle and 3 taxis arrive between times 00:00 and 00:20?
\Part Given that exactly 1 pickup vehicle arrived between times 00:00 and 00:20, what is the conditional probability that this vehicle was a taxi?
\Part Suppose you reach the pickup area at 00:20. You learn that you missed 3 taxis and 1 shuttle in those 20 minutes. What is the probability that you need to wait for more than 10 mins until either a shuttle or a taxi arrives?
\end{Parts}
\bigskip
\textit{\textbf{Note:} This concludes the first part of the homework. The problems below are optional, will not affect your score, and should be attempted only if you have time to spare.}
\rule{6in}{2px}
\bigskip
\section*{Part 2: Optional Problems}
\bigskip
\Question{Alternating Technicians}
%Two faulty machines, $M_1$ and $M_2$, are repeatedly run synchronously in parallel (i.e., both machines execute one run, then both execute a second run, and so on).
%On each run, $M_1$ fails with probability $p_1$ and $M_2$ fails with probability $p_2$, all failure events being independent.
%Let the random variables $X_1$, $X_2$ denote the number of runs until the first failure of $M_1$, $M_2$ respectively; thus $X_1$, $X_2$ have geometric distributions with parameters $p_1$, $p_2$ respectively. Let $X$ denote the number of runs until the first failure of \emph{either} machine.
A faulty machine is repeatedly run and on each run, the machine fails with probability $p$ independent of the number of runs.
Let the random variable $X$ denote the number of runs until the first failure.
Now, two technicians are hired to check on the machine every run.
They decide to take turns checking on the machine every run.
What is the probability that the first technician is the first one to find the machine broken?
%\begin{Parts}
%\Part Show that $X$ also has a geometric distribution, with parameter $p_1+p_2-p_1p_2$.
%\Part Now, two technicians are hired to check on the machines every run. They decide to take turns checking on the machines every run. What is the probability that the first technician is the first one to find a faulty machine?
%\end{Parts}
%\nosolspace{1.5in}
\Question{Exploring the Geometric Distribution}
\begin{Parts}
%\Part Let $X \sim \operatorname{Geometric}(p)$ and $Y \sim \operatorname{Geometric}(q)$ are independent. Find the distribution of
%$\min\{X, Y\}$ and justify your answer.
\Part Let $X$, $Y$ be i.i.d.\ geometric random variables with parameter $p$.
Let $U = \min\{X, Y\}$ and $V = \max\{X, Y\} - \min\{X, Y\}$.
Compute the joint distribution of $(U, V)$
\Part Prove that $U$ and $V$ are independent.
\end{Parts}
\Question{Boutique Store}
Consider a boutique store in a busy shopping mall. Every hour, a large number of people visit the mall, and each independently enters the boutique store with some small probability. The store owner decides to model $X$, the number of customers that enter her store during a particular hour, as a Poisson random variable with mean $\lambda$.
Suppose that whenever a customer enters the boutique store, they leave the shop without buying anything with probability $p$. Assume that customers act independently, i.e.~you can assume that they each flip a biased coin to decide whether to buy anything at all. Let us denote the number of customers that buy something as $Y$ and the number of them that do not buy anything as $Z$ (so $X = Y+Z$).
\begin{Parts}
\Part What is the probability that $Y=k$ for a given $k$? How about $\Pr[Z=k]$?
\textit{Hint}: You can use the identity
\begin{align*}
\e^x=\sum_{k=0}^{\infty}\frac{x^k}{k!}.
\end{align*}
\Part State the name and parameters of the distribution of $Y$ and $Z$.
\Part Prove that $Y$ and $Z$ are independent.
\end{Parts}