\documentclass[11pt,titlepage]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{verbatim}
\allowdisplaybreaks

\jot=.2in \pagestyle{plain} \setlength{\topmargin}{-.5 in}
% \setlength{\footheight}{0 in}
\setlength{\textheight}{9.0 in} \setlength{\oddsidemargin}{-0.2in}
\setlength{\evensidemargin}{0in} \setlength{\textwidth}{6.7in}
\font\heada=cmbx10 scaled\magstep3 \font\headb=cmsl10
scaled\magstep1 \font\headc=cmr8 \pretolerance=10000
\setlength{\parindent}{2 em}
%\input macros

\newdimen\digitwidth
\newdimen\minuswidth
\setbox0=\hbox{\rm0}
\digitwidth=\wd0
\setbox1=\hbox{$-$}
\minuswidth=\wd1
\newdimen\starr
\setbox2=\hbox{${}^*$}
\starr=\wd2

{\catcode`?=\active
\def?{\kern\digitwidth}
\catcode`@=\active
\def@{\kern\minuswidth}
\catcode`|=\active
\def|{\kern\starr}}



\begin{document}
\begin{center}
{\heada Project 3: Solutions}\\
{\headb Statistics 401: Spring 2007}\\
\end{center}
%\bigskip

\begin{enumerate}
\item (4 pts) According to ``Your Brain on Meth: Forest Fire of Carnage" in {\em Discover}, January,
2005:


\begin{verse}
\noindent The parts of the brain harmed by methamphetamine abuse are
the same ones affected by the early stages of Alzheimer’s disease
... And abuse of the drug is at epidemic proportions: [about] 35
million people throughout the world are thought to use it regularly,
which is more than twice as many as abuse cocaine (15 million) or
heroin (10 million).
\end{verse}

\begin{enumerate}

\item Assuming that there are 6 billion people on the planet, then the percentage of addicts of meth is
$\frac{35,000,000}{6,000,000,000}=\frac{35}{6000}\approx .0058 =
.58\%$.  The percentage of cocaine users is
$\frac{15}{6000}=.0025=.25\%$.   The percentage of heroin users is
$\frac{10}{6000}=\approx .0017 = .17\%$

\item Figure 1 contains a bar plot showing percentages of different
abusers.  See Appendix 1 for R code.

\begin{center}
{\bf Figure 1: Bar Chart of Abused Drugs}

\includegraphics[angle=0,width=3.25in,height=3in]{project3barchart.ps}
\end{center}

\item The sample proportion $p=\frac{35 \mbox{million}}{6 \mbox{billion}}$ estimates $\pi$, the true population proportion of meth users on the
planet.

\end{enumerate}


\item (8 pts) The numbers of hikers at Bear Trap Canyon trail-head was
observed on ten different afternoons in the month of August 2006:
64, 48, 42, 41, 57, 32, 34, 35, 42, 58.

\begin{enumerate}
\item The stem-plot showing the distribution of the number
of hikers observed at Bear Trap Canyon trailhead is given by Figure
2.

\bigskip



{\bf Figure 2: Stem Plot of Hiker data}
\bigskip
\begin{verbatim}
  3 | 245
  4 | 1228
  5 | 78
  6 | 4
\end{verbatim}

\item The sample median number of hikers is $\tilde x=42$ while the sample mean
number of hikers is $\bar x=45.3$.   The mean is larger than the
median due to the presence of the right skew in the stem-plot.

\item The true population mean number of
hikers at Bear Trap over all afternoons is $\mu$.  The true
population median number of hikers at Bear Trap over all afternoons
is $\tilde \mu$.

\item The IQR of the data is 18.25 hikers, the sample standard
deviation is $s=11.086$ hikers, and the sample variance is
$s^2=122.9$ hikers$^2$.

\item The true population standard deviation of the number of hikers at Bear Trap over all
afternoons is $\sigma$.
\end{enumerate}



\item (4 pts) Insomnia is frequently related to patients suffering from different psychological disorders.
According to RxList.com, a study compared the incidences of insomnia
among samples of patients with Major Depressive Disorder,
Generalized Anxiety Disorder (GAD), and Social Anxiety Disorder. The
results are given in Table 1.

\begin{center}
{\bf Table 1: : Incidence of Insomnia by Disorder} \bigskip
\begin{tabular}{l|ccc}
Insomnia? & Major Depressive & GAD & Social Anxiety \\\hline
Yes & 31 & 56 & 19\\
No & 254 & 500 & 255\\\hline
\end{tabular}
\end{center}

\begin{enumerate}

\item Since no treatment is being applied, this is an observational
study.

\item Figure 3 gives a segmented bar chart comparing the distributions (by
disorder) for those patients who have insomnia versus those patients
who do not have insomnia. The R code is in the Appendix.

\begin{center}
{\bf Figure 3: Segmented Bar Chart of Insomnia by Psychological
Disorder}
\includegraphics[angle=0,width=3.25in,height=3in]{project3segchart.ps}
\end{center}

\item The percentage of patients who have insomnia in each disorder appear to be approximately equal, at about 10\% for Major .
Depressive Disorder and GAD, and at about 7\% for those with Social
Anxiety (see the Appendix).  Thus, there does not appear to be a
relationship between type of disorder and insomnia.
\end{enumerate}

\newpage
\item (6 pts) On October 21, 2005, {\em The Bozeman Daily Chronicle} ran the
AP article ``Congress approves gun-lawsuit shield."  According to
the article, incidences of murder, robberies and aggravated assault
are down from 1990's highs.
\begin{enumerate}
\item Figure 4 shows a scatterplot of the years (1991-2003) versus number of violent US
crimes.  See the Appendix for the R code.

\begin{center}
{\bf Figure 4: US violent crimes from 1991 - 2003}

\includegraphics[angle=0,width=3.25in,height=3in]{project3scatter.ps}
\end{center}

\item Based on the scatterplot, it appears that there is a strong negative linear
relationship between the years 1991-2003 and number of US violent
crimes.

\item The sample correlation between year and crime is $r\approx-.96$.

\item The true population correlation between year and crime is represented by $\rho$.

\end{enumerate}

\item (8 pts) For the Jellyfish data, where the length
and breadth (in mm) of jellyfish were measured from two different
locations, Dangar Island and Salamander Bay:

\begin{enumerate}
\item Figure 5 shows a scatterplot of Length versus
Breadth for Dangar Island and Salamander Bay.


\newpage
\begin{center}
{\bf Figure 5: Scatterplot of Length versus Breadth for Dangar
Island and Salamander Bay.}

\includegraphics[angle=0,width=3.25in,height=3in]{project3scatter2.ps}
\end{center}

\item \label{discrimination} According to the scatterplot,
the breadth and length measurements of the jellyfish at Salamander
Bay appear to be larger on average than the measurements of
jellyfish at Dangar Island.

\item The 5 number summary of the lengths at Dangar Island and
Salamander Bay is given in Table 2.

\bigskip

\begin{center} {\bf Table 2: Five Number Summaries for Length by
Location}

\bigskip

\begin{tabular}{|l|c|c|c|c|c|}
  \hline
  % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
   & min & $Q_1$ & median & $Q_3$ & max \\\hline
  Dangar Island & 8.00  & 10.00 &  12.00 &  14.00 &  19.00 \\ \hline
  Salamander Bay & 14.00 &  18.00 &  19.00 &  20.00 &  22.00 \\
  \hline
\end{tabular}
\end{center}


\item The comparative boxplots of length for each of the
two locations is given in Figure 6.



\newpage
\begin{center}
{\bf Figure 6: Side by side boxplots of Lengths for Dangar Island
and Salamander Bay.}

\includegraphics[angle=0,width=3.25in,height=3in]{project3boxplots.ps}
\end{center}

\item The distribution of the lengths of jellyfish from
Dangar Island is below the distribution of the lengths of jellyfish
from Salamander Bay, and there is very little overlap. In fact, the
minimum jellyfish length from Salamander Bay is larger than 75\% of
the jellyfish observed from Dangar Island (that is, minimum
jellyfish length from Salamander Bay is larger than the third
quartile from Dangar Bay).  This supports the conclusion from
\ref{discrimination}.
\end{enumerate}
\end{enumerate}


\newpage
\subsection*{Appendix: R code and output}

\verbatiminput{project3Rcode.txt}

\end{document}

