\documentclass[30pt,landscape]{foils}

\usepackage{amsmath}

\usepackage{pause}               \usepackage{background}
\usepackage{graphicx}           \usepackage{geometry}
\usepackage{hyperref}

\usepackage{pp4slide}
\geometry{headsep=3ex,hscale=0.9}

\newtheorem{example}{Example} 
\newtheorem{question}[example]{Question}
\newtheorem{definition}[example]{Definition}
\newtheorem{theorem}[example]{Theorem}
\newtheorem{fact}[example]{Fact}
\newtheorem{notation}[example]{Notation}

\newcommand{\pz}{\pause}
\newcommand{\pb}{\pagebreak}

\definecolor{bgblue}{rgb}{0.03,0.39,0.23}
\vpagecolor{bgblue}

\hypersetup{pdftitle={lecture},
  pdfsubject={A mathematics lecture},
  pdfauthor={Dev Sinha, University of Oregon},
  pdfkeywords={pdftex, acrobat},
  pdfpagemode={FullScreen},
  linkcolor={red}
}

\begin{document}

{\large Review of last lecture} \pz

We have been looking at how data gets accumulated
before we ultimately analyze it. \pz
There are roughly two categories of ways in which data is collected: \pz
{\em surveys}, which are usually {\em sampled} from a larger
population; \pz and {\em experimental studies}, where individuals
are treated (or not treated, which constitutes a kind of treatment)
in various ways and the outcomes of these treatments are measured. \pz
In all ways of gathering data, one has to be aware of sources of
{\em bias} which can lead to data which does not represent the true
situation.  \pz

\begin{example}
Look at the study at 
{\tt http://abcnews.go.com/Health/Healthology/story?id=674607} and say 
first what kind of study it is, the sample size and other basic data, 
and what its strengths and weaknesses are.
\end{example} 


\pb

{\Large Stratified random sample} \pz

In gathering data by survey, the standard method to avoid bias is to take
a {\em simple random sample}, \pz which means to assign a number
to each individual being studied and then use a random number
generator to pick the numbers of those who will be surveyed. \pz

An elaboration on this idea, which can help guarantee that various
sub-populations are appropriately represented, is the {\em 
stratified random sample}. \pb

\begin{definition}
A stratified random sample is obtained by first dividing the population
into groups of individuals, called {\em strata}.  Then a simple
random survey is taken of each stratum.  The results of these
SRS's get combined into a full sample. \pz
\end{definition}

\begin{example}
Use Table B from the book to generated a stratified sample of twenty out of a population with
30 single people, 50 married people, and 20 divorced people. 
(Assumed that numbers are automatically assigned).  \pz  Compare this with
what you would get if a simple random survey were applied to the entire population
(which we will carry out multiple times
with random numbers from random.org, instead of the table). \pz
\end{example}

In order for the results to be representative, 
one must be careful that the strata do not get too small. \pz

On the other hand, if one starts with an enormous population,
one can apply multiple stratified samples. \pz
For example, in surveying the US, one might first divide
into urban and rural zip-codes from which one samples randomly, \pz
and then within each zip-code one could choose strata according to
race or gender or other socio-economic factors. \pb

{\Large Cautions about sampling}\pz


Some common problems with surveys are that, short of stalking
people or offering large amounts of money for participation,
you cannot guarantee that the people you may have 
chosen perfectly random to participate will in fact participate.  
This is known as {\em nonresponse}. \pz This problem, or the method
in which one stratifies a survey, or any other number of factors, can
lead to counting individuals from one group less than others, 
known as {\em undercoverage}. \pz

Basic question design can change results wildly (``pray while smoking''
vs. ``smoke while praying'').  \pz

But even if one is meticulous about representing all groups appropriately,
phrasing things carefully, getting a high response rate, you still don't know 
how good your data is until you know something about extrapolating
from a small data set to a large one.  \pz  We will come back to this
question in some detail after we study the mathematics of
probability. \pb

{\Large Experimental design} \pz

Experiments require a lot more energy than surveys, \pz but
that energy can be worth it in that one can {\em isolate
variables}.  \pz For example, in seeing whether wine consumption
effects heart disease, it could be that looking at data by country
we are missing some other driving factors which mirror wine
consumption (lifestyle, diet, exercise...). \pz  In an experimental
study, we could gather groups of people who behave identically in
all of these other ways, \pz split them into groups who do and do
not drink a glass of wine three times a week, \pz and
then observe their cardiac health over a long period of time. \pz
Such a study would be much more accurate, and much more
expensive than a survey! \pz   Keep this in mind  any time you
see data. \pb

Just measuring something can have an effect, so to get an 
appropriate analysis one must have at least two groups on which
one experiments.  \pz One group may be a {\em 
control group}, which is treated ``normally''.  \pz
In medical (and some other similar areas), the way one gives
no treatment without a patient knowing is by giving
a {\em placebo} or ``dummy treatment.'' \pz  To minimize
the effects of hidden variables, one {\em randomizes}
(that is, picks at random members of) the groups getting
treated.  \pz Finally, when possible one should keep everyone
involved unaware of which individuals are being treated by
which treatment; such a protocol is called {\em double-blind}. \pz

\begin{example} 
Is the data gathering at 
{\tt http://www.shelbystar.com/portal/ASP/article.asp?ID=15518} an
experiment or a survey? \pz
\end{example}

\begin{example}
Discuss the experiment described at the following websites in relation
to the terminology developed above. \\
{\tt http://www.iht.com/articles/2005/04/13/healthscience/snbreast.html} \\
{\tt http://www.cancer.gov/newscenter/pressreleases/Hope-Too}
\end{example} \pb

\begin{example}
Design an experiment to measure the effects on safety of having car headlights
on during normal daytime driving.  \pz Discuss the problem(s) with doing
the same for measuring the effect of taking a driver's education course. \pz
\end{example} \pb

{\large Big question: when are studies or experiments ``statistically significant''?} \pz

What if our drug study just happened to randomly select the people who were
going to overcome their illness anyways?  \pz  (what are the chances of such
a selection?) \pz Is it enough to have a 50\% better
result for one group over another?  10\%? 2\%? \pz

As with our discussion of sample size for surveys, we will develop the mathematics
of probability first and then come back to the question of statistical significance. \pb

{\Large Basic probability} \pz

The theory of probability let's us answer questions such as ``what are the 
chances that at random these ten people will get well (in our study) but those
ten people will not?''\pz  In general probability theory helps in predict
what will happen for a random process {\em over many trials}. \pz

``Randomness'' is a more difficult concept than you would think, but there
are some clear examples. \pz
Observationally, the outcome of a coin toss is
random since we can't predict heads or tails. \pz

Simultaneously, however, there is a  long-term \emph{pattern} to the outcome. \pz
If enough tosses are made,  approximately half will be heads, and half
tails.  \pause 

This does \emph{not} mean that every ``heads'' will be followed by a
``tail.''  Just that if you toss long enough, you expect to see half
heads and half tails. 

\newpage

Famous question:  If you toss a coin 5 times in a row and get heads
every time, what is the probability of getting tails the next time?\pause

Same kind of question:  If you have 4 girls already, are you more
likely to have a boy as your next child?


\newpage

\includegraphics{Figures/Pascal_2.jpg}
\begin{center}Blaise Pascal, 1623-1662;  Probability: 1654\end{center}

\newpage

\begin{notation}[Notation by example]
  
\begin{itemize}
\item We let $X$ be the result of a coin toss.  It can
be $H$ or $T$.  $\{H,T \}$ is called the \emph{{sample space}}. \pz
\item We write $P (X=H) = .5$ to mean the \emph{{probability}} of the
result of the coin toss being heads is $.5$. \pz
\item $P (X=H \; or\;  X=T) = 1$ since those are the only possibilities. 
\end{itemize}
\end{notation}

\pb

\begin{example} 
Let $X$ be the result of two successive coin
tosses.  What is the sample space? \pz
What are the probabilities of each member of the sample space?
\end{example}
%The sample space is now $\{HH, HT, TH, TT \}$, and all these
%outcomes are equally likely.
%\begin{itemize}
%\item $P (X=HH) = .25$
%\item $P (X=HT) = P (X=TH) = .25$ since that is the
%probability of either $TH$ or $HT$.
%\item $P (X=TT) = .25$
%\end{itemize}
Notice that if we add the probability for each event in our sample
space we get 1. \pause 

\begin{example}
\noindent Basically same example, different sample space:  answer
the same questions when  $X$ is the
{number of heads in two successive coin tosses}.  
\end{example}
%The sample space is
%the possible values of $X$.  Now it is $\{0,1, 2 \}$.
%\begin{itemize}
%\item $P (X=0) = .25$
%\item $P (X=1) = .5$
%\item $P (X=2) = .25$
%\end{itemize}
%We still get $1$ if we add the probabilities of each event in our
%sample space.\pause 


\newpage

\end{document}
 