% \documentclass[twocolumn]{article}
\documentclass{article}

\setlength{\oddsidemargin}{-0.5in}
\setlength{\evensidemargin}{-0.5in}
\setlength{\topmargin}{0.0in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\textwidth}{7.0in}
\setlength{\textheight}{9.5in}
\setlength{\parindent}{0in}
\setlength{\parskip}{0.05in}
\setlength{\columnseprule}{0.3pt}
\usepackage{fancyvrb}
\usepackage{relsize}

\usepackage{amsmath}

\usepackage{graphicx}

\begin{document}

Name: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

Directions: {\bf Work only on this sheet} (on both sides, if needed); do not
turn in any supplementary sheets of paper. There is actually plenty of room
for your answers, as long as you organize yourself BEFORE starting writing.
In order to get full credit, SHOW YOUR WORK.

{\bf 1.} Consider the density $f_X(t) = 2t$ on (0,1), 0 elsewhere.

\begin{itemize}

\item [(a)] (10) Find the hazard function h(t) for t in (0,1).

\item [(b)] (10) Find $P(X < 0.6 | X > 0.5)$.  (You may leave your answer
in numerical arithmetic form, e.g. (2+5.2)/8888.8888.)

\end{itemize}

{\bf 2.}  Graph the cdfs of the following random variables.

\begin{itemize}

\item [(a)] (10) X, the number of dots we get by tossing a die once.

\item [(b)] (10) $X_1$, from the ALOHA example.

\end{itemize}

{\bf 3.}  (10) Consider the ALOHA network example, with the following
change: Instead of each node having probability p of attempting to send
when it is active, suppose each node has its own probability for this.
Naming the nodes 1 and 2, say that node i has probability $p_i$ of
sending when it is active.  For instance, if node 2 is currently active,
it will either try to send, with probability $p_2$ or not send, with
probability $1-p_2$.  The probability of an inactive node becoming active is
still q.  Find $P(X_2 = 0)$.

{\bf 4.} (10) Choose six cards from a standard deck, one at a time WITHOUT
replacement.  Let N be the number of kings we get.  Does N have a
binomial distribution?  Choose one: (a)  Yes.  (b) No, since trials are
not independent.  (c) No, since the probability of success is not
constant from trial to trial.  (d) No, since the number of trials is not
fixed.  (e) (b) and (c).  (f) (b) and (d).  (g) (c) and (d).

{\bf 5.} Consider the example of disk seek time on p.8 of our PLN on
multivariate distributions.

\begin{itemize}

\item [(a)] (10) Find the probability that the seek distance will be more
than 0.5.

\item [(b)] (10) Find the variance of the seek time.

\end{itemize}

{\bf 6.} (10) Suppose we have n independent trials, with the probability
of success on the i$^{th}$ trial being $p_i$.  Let X = the number of
successes.  Use the fact that ``the variance of the sum is the sum of
the variance'' for independent random variables to derive Var(X).

{\bf 7.} (10) Suppose X is a nonnegative, continuous random variable and let
$Y = X^2$.  Find $f_Y$ in terms of $f_X$.  (Hint:  First find $F_Y$.)

{\bf Solutions:}

{\bf 1.a} For t in (0,1), $F_X(t) = t^2$, so $h_X(t) = 2t/(1-t^2)$.

{\bf 1.b} 

\begin{eqnarray}
P(X < 0.6 | X > 0.5) &=& \frac{P(X < 0.6 \textrm{ and } X > 0.5)}{P(X >
0.5)}\\ 
&=&  \frac{F_X(0.6) - F_X(0.5)}{1-F_X(0.5} ~~ (\textrm{or integrate } f_X)\\
&=& \frac{0.36-0.25}{0.25}
\end{eqnarray}

\newpage

{\bf 2.a}

\includegraphics[width=3in]{Prob2a.pdf}

{\bf 2.b}

\includegraphics[width=3in]{Prob2b.pdf}

{\bf 3.} 

\begin{eqnarray}
P(X_2 = 0) &=& P(X_1 = 1 \textrm{ and } X_2 = 0) \\ 
&=& P(\textrm{node 1 succeeds in sending, then node 2, or vice versa} \\
&=& 
p_1 (1-p_2) \cdot (1-q) p_2 +
p_2 (1-p_1) \cdot (1-q) p_1 
\end{eqnarray}

{\bf 4.}  The correct answer is (b).  The probability of success on each
trial is 4/52.  For instance, think of the second trial.  Any of the 52
cards could be drawn in that trial, with each likelihood, and there are
4 kings, so the probability of getting a king on that trial is 4/52.  The
{\it conditional} probabilities do change from trial to trial, but not
the ``plain'' probabilities.

{\bf 5.a}  Let A = $\{(s,t): |s-t| > 0.5\}$.  Then

\begin{eqnarray}
P(|X-Y| > 0.5) &=& \int \int_A f_{X,Y}(s,t) ~ dt ds \\ 
&=& \int \int_A 1 ~ dt ds \\ 
&=& \textrm{the area of A} \\
&=& 0.25
\end{eqnarray}

{\bf 5.b}  Let U denote the seek, i.e. |X-Y|.  $Var(U) = E(U^2) -
(EU)^2 = E(U^2) - \frac{1}{9}$.

\begin{equation}
E(U^2) = E[(X-Y)^2] = 
\int_{0}^{1} \int_0^1 (s-t)^2 \cdot 1 ~ dt ds = ...
\end{equation}

{\bf 6.}  Following the derivation of Var(X) in the binomial case (p.21
of the original PLN on discrete probability), write $X = B_1+...+B_n$,
where $B_i$ is 1 or 0, according to whether there is a success or
failure on the i$^{th}$ trial.  Continuing as on p.21,

\begin{equation}
Var(X) = \sum_{i=1}^n Var(B_i) = \sum_{i=1}^n p_i(1-p_i)
\end{equation}

since $B_i$ is binomial for one trial and success probability $p_i$.
(Or just compute $Var(B_i)$ ``by hand.'')

{\bf 7.}

\begin{eqnarray}
f_Y(t) &=& \frac{d}{dt} F_Y(t) \\ 
&=& \frac{d}{dt} P(Y \leq t) \\
&=& \frac{d}{dt} P(X^2 \leq t) \\
&=& \frac{d}{dt} P(X \leq t^{0.5}) \\
&=& \frac{d}{dt} F_X(t^{0.5}) \\
&=& f_X(t^{0.5}) \cdot \frac{d}{dt} t^{0.5} ~~ (\textrm{Chain rule})\\
&=& 0.5t^{-0.5} f_X(t^{0.5})
\end{eqnarray}

\end{document}


