\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}
\usepackage{fancyvrb}
\usepackage{hyperref}

\usepackage{listings,relsize}

\begin{document}

\lstset{language=R,basicstyle=\smaller}

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

Directions: {\bf Work only on this sheet} (on both sides, if needed); do not
turn in any supplementary sheets of paper. There is actually plenty of room
for your answers, as long as you organize yourself BEFORE starting writing.

{\bf \Large SHOW YOUR WORK!}  

{\bf 1.} (15) Exercise 7(b), Chapter 4, p.97.  Give your answer 
as a decimal or common fraction.

{\bf 2.} (15) Exercise 8(a), Chapter 4, p.97.  Give your answers as 
decimal or common fractions.

{\bf 3.} (20) Suppose X has a uniform distribution on the interval
(20,40), and we know that X is greater than 25.  What is the probability
that X is greater than 32?  Give your answer as a common fraction.

{\bf 4.} (25) Suppose U and V have the 2t/15 density on p.74.  Let N
denote the number of values among U and V that are greater than 1.5.
(CORRECTED SUBSEQUENT TO QUIZ.) (So N is either 0, 1 or 2.)  Find
Var(N), expressing your answer as a decimal or common fraction.

{\bf 5.} (25) What is the (approximate) value returned from the following
R code?

\begin{Verbatim}[fontsize=\relsize{-2}]
mean((rnorm(10000,mean=28,sd=5))^4)
\end{Verbatim}

Your answer must be expressed as a definite integral.

{\bf Solutions:}

{\bf 1}  

$$
F_X(0.2) = \int_{0}^{0.2} 2(1-t) ~ dt = 0.36
$$

$$
EX = \int_{0}^{1} t \cdot 2(1-t) ~dt = 1/3
$$

{\bf 2.}  Let X be the error.   On p.75, we have r = 0.5, q = -0.5.
Using the formulas for the mean and variance at the bottom of p.75, we
have

$$
E(X) = (q+r)/2 = 0
$$

$$
Var(X) = (r-q)^2 / 12 = 1/12 $$

{\bf 3.}  Because of the uniformity, $P(a < X < b) = (b-a)/20$.
Following the pattern on p.79, we have

$$
P(X > 30 | X > 25) = \frac{P(X > 30)}{P(X > 25)} 
= \frac{10/20}{15/20} = 2/3
$$

{\bf 4.}  N has a binomial distribution with n = 2 and 

$$
p = \int_{1.5}^{4} 2t/15 ~ dt =  \frac{11}{12}
$$

So, (once again) using (3.82), we have

$$
Var(N) = 2 \cdot \frac{11}{12} \cdot \frac{1}{12} = \frac{11}{72}
$$

{\bf 5.} The simulation is calculating $E(X^4)$, where X has a normal
distribution with mean 28 and standard deviation 5.  That expected
value, by (4.21), is

$$
\int_{-\infty}^{\infty}
t^4 \cdot \frac{1}{\sqrt{2\pi} \cdot 5} ~ e^{- 0.5 \left (\frac{t-28}{5}
\right )^2} ~ dt
$$

\end{document}

