% This is a simple LaTex sample document that gives a submission format
%   for IEEE PAMI-TC conference submissions.  Use at your own risk.

% Make two column format for LaTex 2e.
\documentclass[11pt,twocolumn]{article} %,twocolumn
%\usepackage[dvips]{graphicx,graphics}
%\usepackage{times,amsmath,amsfonts}

% Use following instead for LaTex 2.09 (may need some other mods as well).
% \documentstyle[times,twocolumn]{article}

% Set dimensions of columns, gap between columns, and paragraph indent
\setlength{\textheight}{9.6in} \setlength{\textwidth}{6.9in}
%\setlength{\columnsep}{0.3125in} \setlength{\topmargin}{0in}
\setlength{\headheight}{0in} \setlength{\headsep}{-1in}
\setlength{\parindent}{1pc}
\setlength{\oddsidemargin}{-.2in}  % Centers text.
\setlength{\evensidemargin}{-.2in}

% Add the period after section numbers.  Adjust spacing.
\newcommand{\Section}[1]{\vspace{-8pt}\section{\hskip -1em.~~#1}\vspace{-3pt}}
\newcommand{\SubSection}[1]{\vspace{-3pt}\subsection{\hskip -1em.~~#1}
        \vspace{-3pt}}
\newcommand{\bqn}{\begin{eqnarray}}
\newcommand{\eqn}{\end{eqnarray}}
\newcommand {\diff}[1] {\frac{\partial}{\partial #1}}
\newcommand{\jacob}[3]{\frac{\partial^2 #3}{\partial #1 \partial #2}}
\newcommand{\der}[2]{\frac{\partial #2}{\partial #1}}
\begin{document}

% Don't want date printed
%\date{January 23, 2003}

% Make title bold and 14 pt font (Latex default is non-bold, 16pt)
\title{Stat 312: Lecture 11\\
Testing on Population Means}

% For single author (just remove % characters)
\author{Moo K. Chung\\
mchung@stat.wisc.edu}
%\date{Feb 20, 2003}
% For two authors (default example)
\maketitle
\thispagestyle{empty}
\section*{Concepts}
\begin{enumerate}

\item $P(\mbox{Type I error}) = P(\mbox{reject } H_0|H_0 \mbox{
true}) =\alpha.$ The resulting $\alpha$ is called the {\em
significance level} of the test and the corresponding test is
called a {\em level $\alpha$ test}. We will use test procedures
that give $\alpha$ less than a specified level (0.05 or 0.01
usually).

\item Testing mean $\mu$ with known variance $\sigma^2$.
$$H_0: \mu=\mu_0 \mbox{ vs. } H_1: \mu < \mu_0$$
Test statistic: $z=\frac{\bar x -\mu_0}{\sigma/\sqrt{n}}.$
Rejection region for level $\alpha$ test: $z \leq -z_{\alpha}.$

\item Testing mean $\mu$ with unknown variance $\sigma^2$.
$$H_0: \mu=\mu_0 \mbox{ vs. } H_1: \mu < \mu_0$$ Test statistic:
$t=\frac{\bar x -\mu_0}{s/\sqrt{n}}.$ Rejection region for level
$\alpha$ test: $z \leq -t_{\alpha,n-1}.$

\item Testing mean $\mu$ when the sample size is large.
$$H_0: \mu=\mu_0 \mbox{ vs. } H_1: \mu < \mu_0$$ Test statistic:
$z=\frac{\bar x -\mu_0}{s/\sqrt{n}}.$ Rejection region for level
$\alpha$ test: $z \leq -z_{\alpha}.$
\end{enumerate}
\section*{In-class problems}
Assume the IQ of a dog follows $X_i \sim N(\mu, 10^2)$. The IQ of
10 dogs are measured: 30, 25, 70, 110, 40, 80, 50, 60, 100, 60. We
want to test if dogs are as smart as people by testing
$$H_0: \mu = 100 \mbox{ vs. } H_1: \mu < 100$$
at level $\alpha = 0.05$.
\begin{verbatim}
> x<-c(30, 25, 70, 110, 40, 80, 50, 60,
100, 60)
> mean(x)
[1] 62.5
> z<-(mean(x)-100)/(10/sqrt(10))
> z
[1] -11.85854
> qnorm(0.05)
[1] -1.644854
\end{verbatim}
Assume the IQ of a dog follows $X_i \sim N(\mu, \sigma^2),$ where
$\sigma$ is unknown. Test
$$H_0: \mu = 100 \mbox{ vs. } H_1: \mu < 100$$
at level $\alpha = 0.05$.
\begin{verbatim}
> t=(mean(x)-100)/(sd(x)/sqrt(10))
> t
[1] -4.205156
> qt(0.05,9)
[1] -1.833113
> t.test(x,mu=100,alternative="less",
 conf.level=0.95)
        One Sample t-test
 data:  x t = -4.2036, df = 9,
 p-value = 0.001147
 alternative hypothesis: true mean is
 less than 100
 95 percent confidence interval:
    -Inf 78.8531
 sample estimates: mean of x 62.5
\end{verbatim}
%\begin{figure}[t]
%\centering
%\renewcommand{\baselinestretch}{1}
%\includegraphics[scale=0.5]{chi.eps}
%\caption{$t_{1000}}
%\end{figure}

\section*{Self-study problems}
Example 8.6., 8.8., 8.9.
\section*{Assignment III.}
Due March 13. 11:00am. 8.24., 8.26, 8.28., 8.36. (a) and (b) only,
8.38.
\end{document}
