\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: DESCRIPTIVE STATISTICS}\\
{\headb Statistics 401: Fall 2006}\\
{\it Due: Friday, February 16}
\end{center}
%\bigskip

\noindent In this project, you will use R to summarize different
data sets using numerical and graphical techniques. Two of these
data sets need to be downloaded from the Stat 401 web site:
crime.txt and jellyfish.txt. You will need to assemble the tables,
plots, and answers into a coherent write-up.  Remember to label all
of your graphs, and reference them from the body of your report as
oultined in Chapter 4 of the Course Notes.  Put ALL R code in an
Appendix. Your write-up must be typed. Please number your answers as
the questions were numbered. Your grade will be determined by how
well you answer the questions and by the professionalism and clarity
of our write-up. Note, you will need the ``pastecs" library in R to
complete the last problem. You should have downloaded it when you
installed R. If you did not, then check out the Chapter 1 Handout
for download instructions.


\begin{enumerate}
\item 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,
convert the numbers of addicts of meth, cocaine and heroin to
percentages.

\item Graphically display the three categories meth, cocaine and heroin versus their percentages using a bar
chart.  One way to insert the plot into your report: have the plot
window in R selected and hit {\bf Ctrl C} to copy. Go to your report
document and hit {\bf Ctrl V} to paste.

\item Consider the statistic $p=\frac{35 \mbox{million}}{6 \mbox{billion}}$ from above.   Give the
symbol which symbolizes the true proportion of meth users on the
planet.

\end{enumerate}


\item 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 Graphically display this distribution using a stem-plot, and insert this graph into your
report.

\item Use the sample mean and sample median to give two different measures of
the center of the distribution.  Why are they different?

\item Give the symbols which represent the true mean and median number of
hikers at Bear Trap over all afternoons.

\item Give the values of two measures of the spread of the data, one of which is
resistant to outliers.

\item Give the symbol which represents the true standard deviation
of the number of hikers at Bear Trap over all afternoons.
\end{enumerate}



\newpage
\item 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}
\smallskip
\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 What type of study was performed, an experiment or an observational study?

\item Construct a segmented bar chart to compare the distributions
for those patients who have insomnia versus those patients who do
not have insomnia. Be sure to put the categories of Disorder across
the horizontal axis. Include the segmented bar chart in your report.
\vspace{0.1in}

\item Based on the segmented bar chart, does there appear to be a
relationship between type of disorder and insomnia?   Explain why or
why not.
\end{enumerate}


\item 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.  The data file ``crime.txt" on the
STAT401 web site shows the incidences of these crimes (in the
millions) for the odd years from 1991 to 2003.   Download this file
to perform the following analysis.
\begin{enumerate}
\item Construct a scatterplot with the variable Year on the
$x$-axis and Crime on the $y$-axis.

\item Based on the scatterplot, give a brief description of the
relationship between the Year and Crime. Be certain to describe the
form, direction, and strength of the relationship. \vspace{0.1in}

\item Use R to calculate the sample correlation between Year and Crime.

\item Give the symbol which represents the true correlation between
Year and Crime.

\end{enumerate}

\item Recall the Jellyfish data from Project \#1, where the length
and breadth (in mm) of jellyfish were measured from two different
locations, Dangar Island and Salamander Bay. Download the data
file ``jellyfish.txt" from the Stat 401 web site to perform the
following analysis.

\begin{enumerate}
\item Construct a scatterplot with breadth on the $x$-axis and
length on the $y$ axis while using different symbols for the data
from Dangar Island versus Salamander Bay.  Include the scatterplot
in your report. \vspace{0.1in}

\item \label{discrimination} Does this scatterplot provide
evidence that the jellyfish at one of the two locations is larger
than the other? \vspace{0.1in}



\item Give the 5 number summary of the lengths for each location.

\item Construct comparative boxplots of length for each of the two
locations. Include the comparative boxplot in your report.
\vspace{0.1in}

\item Discuss the similarities and differences in the boxplots.
 Do the boxplots support your answer to \ref{discrimination}? Explain.\vspace{0.1in}
\end{enumerate}
\end{enumerate}


\end{document}

