\documentclass[11pt]{report}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{epsfig,epsf,psfrag}
\setlength{\textwidth}{16cm} \setlength{\textheight}{20cm}
\setlength{\topmargin}{0cm} \setlength{\oddsidemargin}{0.5cm}
\setlength{\evensidemargin}{0.5cm}
\newcommand{\bq}{\begin{eqnarray*}}
\newcommand{\eq}{\end{eqnarray*}}
\begin{document}
\pagestyle{empty} \large
{\bf 2005 STAT 324 midterm 1 solution} Moo K. Chung mchung@stat.wisc.edu\\


Grade distribution $29.65 \pm 6.18$.


\begin{figure}[h]
\centering
\includegraphics[width=80mm]{midterm.eps}
\end{figure}



\begin{enumerate}

\item (a) Suppose that $A$ and $B$ are independent events such that the probability
that neither occurs is $\frac{1}{2}$ and the probability of $B$
occurring is $\frac{1}{3}$. Determine the probability of
$A$ occurring.\\
{\em Solution.} $P ((A \cup B)^c) = 1-P(A \cup B)=1/2$. So $P(A \cup
B)=1/2$. Since $A$ and $B$ are independent $P(A \cap
B)=P(A)P(B)=P(A)/3$. By substituting terms into $P(A \cup B)  =
P(A)+P(B) - P(A \cap B)$, we have $1/2 = P(A) + 1/3 - P(A)/3$. Hence
$P(A) = 1/4$.

(b) If $A$ and $B$ are independent events, prove that $A^c$ and $B$
are also independent.\\
{\em Solution.} Since $A$ and $B$ are independent, $P(A \cap B) =
P(A)P(B)$. We need show $P(A^c \cap B) = P(A^c)P(B)$. $P(B) = P(A
\cap B) + P(A^c \cap B) = P(A)P(B) + P(A^c \cap B)$. Hence $P(A^c
\cap B) = P(B) -P(A)P(B) = (1-P(A))P(B)=P(A^c)P(B)$.


\item A lie detector will show a positive reading (indicates a lie)
$10\%$ of the time when a person is telling the truth and $90\%$ of
the time when the person is lying. Suppose two people are suspects
in a crime and only one is guilty. The guilty one will be lying
while the innocent one will be telling the truth.\\ (a) What is the
probability that the detector shows
positive readings for both suspects?\\
{\em Solution.} \bq P(postive) &=& P(positive \cap lying) +
P(positive \cap truth)\\
&=& P(positive|lying)P(lying) + P(positive|truth)P(truth)\\
&=& 0.1 \times 0.5 + 0.9 \times 0.5 =0.5\eq

(b) What is the probability that a person is lying when the detector shows a negative reading?\\
{\em Solution.} \bq P(lying | negative) &=&
\frac{P(negative|lying)P(lying)}{P(negative)}\\
& =& \frac{P(negative|lying)P(lying)}{P(negative|lying)P(lying) +
P(negative|truth)P(truth)}.\eq $P(negative|lying)=
1-P(positive|lying) = 1 - 0.9=0.1$.\\ $P(negative|truth)=
1-P(positive|truth) = 1 - 0.1=0.9$. Hence $$P(lying |
negative)=\frac{0.1 \cdot 0.5}{0.1 \cdot 0.5 + 0.9 \cdot 0.5}=0.1.$$

\item A man with $n$ keys wants to open his door and tries the keys at random.
Exactly one key will open the door.\\ (a) Suppose unsuccessful keys
are {\bf not eliminated} from $n$ keys. Determine the probability
distribution of the number of trials until he opens the door.

{\em Solution}. A similar problem was solved during the review. Let
$X$ be the number of trials until he opens the door. Then $P(X=1)=
\frac{1}{n}, P(X=2)=\frac{n-1}{n}\frac{1}{n},
P(X=3)=(\frac{n-1}{n})^2\frac{1}{n}$. In general,
$P(X=i)=(\frac{n-1}{n})^{i-1}\frac{1}{n}$. So $X$ is a geometric
random distribution with $p=\frac{1}{n}$.\\
(b) Suppose unsuccessful keys are {\bf eliminated} from $n$ keys.
Determine the probability distribution of the number of trials until
he opens the door.

{\em Solution.} This is identical to the problem in one of the
lecture notes. $P(X=1) = \frac{1}{n}, P(X=2) =
\frac{n-1}{n}\frac{1}{n-1}=\frac{1}{n},\cdots,
P(X=n)=\frac{n-1}{n}\dots \frac{1}{2}=\frac{1}{n}.$ This type of
distribution is called a discrete {\em uniform} distribution.


\item We have a probability density $f(x)= kx^2$ for $0 < x < 1$ and
$f(x)=0$ otherwise. (a) Compute the variance and the expected value
of the distribution.\\
{\em Solution.} $k=3$ to make $f$ a probability density. Note that
$\mathbb{E} X = \int_0^1 3x^3 \;dx=
\frac{3}{4}x^4|_0^1=\frac{3}{4}.$ $\mathbb{E} X^2 = \int_0^1 3x^4
\;dx= \frac{3}{5}x^5|_0^1=\frac{3}{5}.$ Hence $\mathbb{V} X =
\frac{3}{5} - (\frac{3}{4})^2 = 0.0375$.

(b) Determine the $75$-th percentile point. \\
{\em Solution.} Let $\eta$ to be the 75-th percentile, then
$\int_0^{\eta} 3x^2\;dx = 0.75$. Then we have $\eta =
0.75^{1/3}=0.9086$.

{\bf Assigned Problems} Homework III due on Thursday March 3,
9:30AM. Do assigned problems in Lecture 07-10.
\end{enumerate}
\end{document}
