\documentclass[twocolumn]{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}

\setlength\columnsep{25pt}

\usepackage{fancyvrb}
\usepackage{relsize}
\usepackage{hyperref}

\usepackage{listings}
\usepackage{amsmath}

\begin{document}

\lstset{xleftmargin=5mm,framexleftmargin=10mm,basicstyle=\footnotesize}

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

Directions: {\bf \Large Work only on this sheet} (on both sides, if
needed).  MAKE SURE TO COPY YOUR ANSWERS TO A SEPARATE SHEET FOR SENDING
ME AN ELECTRONIC COPY LATER.

{\bf Important note:}  Remember that in problems calling for R code, you
are allowed to use any built-in R function, e.g. {\bf choose()}.

{\bf 1.} Consider the random variable X on p.92.

\begin{itemize}

\item [(a)] (15) Find the probability that X is between 0.1 and 0.2.
[Should have been 1.1 and 1.2.  Otherwise the probability is 0.]

\item [(b)] (15) Find $E(\sqrt{X})$.

\end{itemize}

{\bf 2.} Consider the ALOHA Markov chain example, beginning on p.68, but
with 4 nodes in the network, not just 2.

\begin{itemize}

\item [(a)] (10) How many rows will the P matrix now have?

\item [(b)] (15) Find $p_{43}$, for the case q = 0.2, p = 0.6.

\end{itemize}

{\bf 3.} Suppose light bulb lifetimes are exponentially distributed with
mean 10.0 months.  We try them one at a time, until we find the third
one that lasts longer than 5.0.  Let N denote the number of light bulbs we try.

\begin{itemize}

\item [(a)] (15) What famous parametric family does the distribution of N belong
to?

\item [(b)] (15) Find Var(N).

\end{itemize}

{\bf 4.} (15) In the network intrusion example, p.97, suppose Jill logs in
twice.  Let X and Y denote the number of disk sectors she reads in the
two sessions, assumed to be independent.  Find $P(X + Y > 1088)$.

\onecolumn

{\bf Solutions:}

{\bf 1.a}  See note in problem statement.  Probability is 0 as stated.
For 1.1, 1.2:

\begin{equation}
P(1.1 < X < 1.2) = \int_{1.1}^{1.2} 2t/15 ~ dt 
\end{equation}

{\bf 1.b}

\begin{equation}
E(\sqrt{X} = \int_{1}^{4} t^{0.5} 2t/15 ~ dt = \frac{4}{75} \cdot 31
\end{equation}

{\bf 2.a} 5

{\bf 2.b}

\begin{equation}
p_{43} = \binom{4}{1} p^1 (1-p)^3 = 0.1536
\end{equation}

{\bf 3.a} Negative binomial.

{\bf 3.b} From (3.114):

\begin{equation}
Var(N) = r \cdot \frac{1-p}{p^2}
\end{equation}

Here r = 3 and 

\begin{equation}
p = \int_{5.0}^{\infty} 0.1 e^{-0.1 t}~ dt
\end{equation}

The integral can be computed by hand, or as 

\begin{lstlisting}
1 - pexp(5.0,0.1)
\end{lstlisting}

{\bf 4.}  X+Y has a normal distribution with mean $2 \cdot 500$ and
variance $2 \cdot 15^2$.  The specified probability is then
computed as

\begin{lstlisting}
1 - pnorm(1088,1000,sqrt(450))
\end{lstlisting}

\end{document}

