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

{\bf 1.} Suppose X has the density $2/t^3$ on $(1,\infty)$, 0 elsewhere.
Note:  This problem is numerical (as are most of our Quiz problems), so
it requires R expressions as answers.  That R expression must
evaluate to a number.  You may use {\bf integrate()} if you know how,
but it's easier just to do the integration yourself.

\begin{itemize}

\item [(a)] (15) Find $F_X(2)$.

\item [(b)] (20) Find EX.

\end{itemize}

{\bf 2.} Consider the Markov model of bus ridership, pp.87ff.

\begin{itemize}

\item [(a)] (15) Find $p_{11}$.

\item [(b)] (10) Suppose we wish to find the long-run average number of
passengers that alight from the bus, per stop.  This will be 

$$
\sum_{i=0}^{20} \pi_i w_i
$$

Give the value of $w_1$.

\end{itemize}

{\bf 3.} (20) Suppose in modeling disk performance, we describe the position
X of the read/write head as a number between 0 and 1, representing the
innermost and outermost tracks, respectively.  Say we assume X has a
uniform distribution on (0,1).  Consider two consecutive positions (i.e.
due to two consecutive seeks), $X_1$ and $X_2$, which we'll assume are
independent.  Find $Var(X_1 + X_2)$.

{\bf 4.} (20) Consider the network intrusion model, pp.104-105.  Assume
there is never an intrusion, i.e. all logins are from Jill herself.  Say
we've set our network intrusion monitor to notify us every time Jill
logs in and accesses 535 or more disk sectors.  In what proportion of
all such notifications will Jill have accessed at least 545 sectors?

{\bf Solutions:}

{\bf 1.a} 

$$
F_X(2) = \int_{1}^{2} \frac{2}{t^3}~ dt = \frac{3}{4}
$$

{\bf 1.b} 

$$
EX = \int_{1}^{\infty} t \cdot \frac{2}{t^3}~ dt = 2
$$

{\bf 2.a} 

$$
(1-0.2) \cdot 0.5 + 0.2 \cdot 0.4
$$

{\bf 2.b} 0.2

{\bf 3.}  1/12 + 1/2

{\bf 4.}  This is $P(X \geq 545 | X \geq 535)$.  By an analysis similar
to that in Section 5.5.2.3, this probability is

\begin{lstlisting}
(1 - pnorm(545,500,15) / (1 - pnorm(535,500,15))
\end{lstlisting}


\end{document}

