\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.} (15) Consider the example in pp.163ff. Say we observe 8 of the
logins to Jill's account.  Assume they are independent and that they are
really Jill.  Let $M$ denote the number of logins in which Jill accesses
at least 535 disk sectors.  Find $Var(M)$.

{\bf 2.} (15) Suppose $X$ has a N(10,4) distribution. Give code that finds
the number $c$ for which $P(X < c) = 0.168$.

{\bf 3.} Suppose $f_X(t) = ct^3$ on (0,4), 0 elsewhere.

\begin{itemize}

\item [(a)] (10) Find $c$.

\item [(b)] (10) Find $EX$.

\item [(c)] (10) Find $E[\max(X,1)]$.

\item [(d)] (15) Give a function {\bf rt3(n)} that generates {\bf n}
random numbers from this density.

\end{itemize}

{\bf 4.} (15) On p.172, it states, ``One can also show that Var(Y) = 2k.''
Deduce from this the value of $E(X^4)$, where $X$ has a N(0,1)
distribution.

{\bf 5.} (10) Consider the museum example of the Central Limit Theorem
in Sec.\ 8.15. We want to explain the CLT using a ``notebook'' view.
Fill in the following blanks with terms or symbols from these sources:
Theorem 14; Section 8.15; and ``notebook-ology.'' (Example terms from
the latter are {\it row}, {\it column}, {\it long-run proportion}, {\it
repetition}, {\it experiment} and so on.)  The number of rows of pins is
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_, and the number of
balls is \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_,

\onecolumn

\newpage

{\bf Solutions:}

{\bf 1.} $M$ is binomial, so $Var(Y) = np(1-p) = 8 (0.01) (1 - 0.01)$.

{\bf 2.}

\begin{lstlisting}
qnorm(0.168,10,2)
\end{lstlisting}

{\bf 3.a} 

\begin{equation}
1 = \int_{0}^{4} ct^3~ dt, 
\end{equation}

so $c = 1/64$

{\bf 3.b} 

\begin{equation}
EX = \int_{0}^{4} t \cdot \frac{1}{64} t^3 ~ dt
\end{equation}

{\bf 3.c}

\begin{equation}
E[max(X,1)] = 
\int_{0}^{1} 1 \cdot \frac{1}{64} t^3 ~ dt +
\int_{1}^{4} t \cdot \frac{1}{64} t^3 ~ dt
\end{equation}

{\bf 3.d} We need $F_x^{-1}(t)$.

\begin{equation}
t =  F_X(s) = \frac{1}{64} \cdot \frac{1}{4} v^4 \biggr|_{0}^{s} =
\frac{1}{256} s^4
\end{equation}

Solve for $s$:

\begin{equation}
F_x^{-1(t)} = s = 4 t^{0.25}
\end{equation}

So the function is

\begin{lstlisting}
rt3 <- function(n) 4 * (runif(n))^{0.25}
\end{lstlisting}

{\bf 4.} For convenience, let $W = X^2$.  Then

\begin{equation}
\label{x4}
E(X^4) = E[W^2] = Var(W) + (EW)^2
\end{equation}

But we are told in the text that $Var(Y) = 2k$.  In (8.34), each $Z_i^2$
is a $W$, and they are independent.  Thus we must have

\begin{equation}
Var(W) = 2
\end{equation}

Also, (8.36) shows that $EW = 1$.  So (\ref{x4}) shows that

\begin{equation}
E(X^4) = 3
\end{equation}

{\bf 5.} $n$, number of rows of the notebook.

\end{document}

