\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}

\setlength\columnsep{25pt}

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

\usepackage{listings}
\usepackage{amsmath}

\begin{document}

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

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

Directions: MAKE SURE TO COPY YOUR ANSWERS TO A SEPARATE SHEET FOR SENDING
ME AN ELECTRONIC COPY LATER.

{\bf 1.} (10) In the phrasing of the article on Microsoft's new Azure
software, the firm aims the app to \_\_\_\_\_\_\_\_ machine learning.

{\bf 2.} (10) A trucking company transports many things, including
furniture.  Let $X$ be the proportion of a truckload that consists of
furniture.  For instance, if 15\% of given truckload is furniture, then
X = 0.15.  We have data on $X$, and will plot histograms and so on, in
order to find a good model.  Suggest a good parametric distribution
family for modeling $X$.  

{\bf 3.} This problem concerns the material in Section 5.5.5,  The
random variables $T_8$ and $Y$ are as in the bottom of p.122 and the
top of p.124, respectively.  In the case of $T_8$, say the mean lifetime
of ligh bulbs is 120 hours.  If you need the $\Gamma()$ function, R
offers it as {\bf gamma()}.  Also, there are {\bf factorial()} and {\bf
exp()}.

\begin{itemize}

\item [(a)] (10) State the value of $Var(Y)$.

\item [(b)] (10) Find $f_Y(88)$.

\item [(c)] (15) Find $E(1/Y)$.

\item [(d)] (10) Concerning $T_8$, we've asked someone to notify us when the
eighth bulb burns out.  At time 102.2 hours after the first bulb is
installed, we still haven't heard from our notifier.  Find the
probability that at time 222.1, we still have not been notified.

\item [(e)] (15) The text remarks that in Figure 5.2, the curve for r = 10.0
is already looking rather bell-shaped.  By calling {\bf pnorm()},
we can find the normal approximation to, say, the cdf corresponding to that
density, evaluated at 14.2.  What would be our third argument in that
function?  Say that figure used $\lambda = 1$.

\end{itemize}

{\bf 4.} (10) Suppose $f_W(t) = t^{-2}$ for $t > 1$, 0 otherwise.  Find the
median of $W$, i.e.\ the 0.5 quantile.

{\bf 5.} (10) Suppose $Z_1$ and $Z_2$ are independent, each having
distribution N(0,1).  Find $Var(Z_1^2 - Z_2^2$).

\onecolumn

\newpage

{\bf Solutions:}

{\bf 1.} democratize

{\bf 2.} beta distributions

{\bf 3a.} The gamma family has variance $r/\lambda^2$, so

\begin{equation}
Var(Y) = 5/0.01^2
\end{equation}

{\bf 3b.}

\begin{lstlisting}
dgamma(88,5,0.01
\end{lstlisting}

{\bf 3c.}  Use Property E:

\begin{lstlisting}
integrate(function(t) (1/t) * 1/(factorial(4)) * 0.01^5 * t^4 * exp(-0.01*t),0,Inf)
\end{lstlisting}

{\bf 3d.}

\begin{equation}
P(T_8 > 222.1 ~|~ T_8 > 102.2) =
P(T_8 > 222.1 ) ~/~ P(T_8 > 102.2) 
\end{equation}

Then use

\begin{lstlisting}
(1 - pnorm(222.1,5,0.01)) / (1 - pnorm(102.2,5,0.01))
\end{lstlisting}

{\bf 3e.}

\begin{equation}
\textrm{variance }= r/\lambda^2 = 10
\end{equation}

So, we would use the standard deviation, $\sqrt{10}$.

{\bf 4.}  We have $F_W(t) = 1 - 1/t$, so set $0.5 = 1/t$, yielding t = 2.

{\bf 5.}  

\begin{equation}
Var(Z_1^2 - Z_2^2) = 2 Var(Z_1^2)
\end{equation}

$Z_1^2$ has a chi-square distribution with k = 1 degree of freedom.  So,
its variance is $2k = 2$.  The original expression has value 4.

\end{document}

