\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
pnorm()}, etc.  

Note too the R function {\bf integrate()}, e.g.

\begin{lstlisting}
> integrate(function(x) x^2,0,1)
0.3333333 with absolute error < 3.7e-15
\end{lstlisting}

The limits of integration must be numbers or Inf or -Inf, not symbols.
Thus one cannot use it for the inner integral in a double integral.

{\bf 1.} Consider the computer worm example in Sec. 8.3.  Say g = 5.

\begin{itemize}

\item [(a)] (25) Find the probability that the time spent at state 2
(before going to state 3) is greater than 0.10.

\item [(b)] (15) Let $T_{35}$ denote the time needed to go from state 3
to state 5.  Find $f_{T_{35}}(0.3)$.

\end{itemize}

{\bf 2.} In each of the following, state---using mathematical symbols,
e.g. E(), P(), F, f, $>$, names of the variables used in the example
(don't make up your own names), etc.---what the integral is calculating.
Use an underscore for subscripts in your {\bf Answers} file, e.g.
write \lstinline{U_1} for $U_1$.

\begin{itemize}

\item [(a)] (0) $\int_{0.2}^{0.8} 2(1-v) ~ dv$ in Section 8.3.4.

\item [(b)] (25) $\int_{0}^{1}  \int_{0}^{1} ~ st (2-s-t) ~ dt ~ ds$ in
Section 8.2.4.

\item [(c)] (20) $\int_{1}^{8} \frac{1}{(8-s)^2} \frac{1}{s^2}  ~ ds
$, where we have independent random variables X and Y with density $1/
w^2$ on $(1,\infty)$. 

\end{itemize}

{\bf 3.} (15) Suppose X and Y be independent and each have a uniform
distribution on the interval (0,1).  Let Z = min(X,Y).  Find $f_Z(0.8)$.

\onecolumn

{\bf Solutions:}

{\bf 1.a}  The text says that the time spent at state 2 is exponentially
distributed with parameter 2x3 = 6.  So, the probability is

\begin{lstlisting}
1-pexp(0.10,6} 
\end{lstlisting}

{\bf 1.b} Have sum of two independent exponentials, but with different
$\lambda$ values---just like the backup battery example.  So,
$f_{T_{35}}(0.3)$ is equal to \lstinline{exp(-0.3/6) + exp(-0.3/4}
(where $6 = 3 \cdot 2$ and $4 = 4 \cdot 1$).

{\bf 2.a} $P(0.2 < S < 0.8)$ (error in original problem statement)

{\bf 2.b} E(XY)

{\bf 2.c} $f_{X+Y}(8)$

{\bf 3.} Using the same derivation as on p.168,

\begin{eqnarray}
F_Z(t) &=& P(Z \leq t) \\ 
&=& 1 - P(Z > t) \\
&=& 1 - P(X > t \textrm{ and } Y > t) \\
&=& 1 - (1-t)^2
\end{eqnarray}

So, $f_Z(t) = 2(1-t)$ and $f_Z(0.8) = 0.4$.

{\bf 4.} This is the density of X+Y, where X and Y are independent with
the given density.

\end{document}

