% 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,color}
\usepackage{times,amsmath,amsfonts}


\setlength{\textheight}{10in} \setlength{\textwidth}{6.875in}
\setlength{\columnsep}{0.3125in} \setlength{\topmargin}{-0.5in}
\setlength{\headheight}{0in} \setlength{\headsep}{0in}
\setlength{\parindent}{1pc}
\setlength{\oddsidemargin}{-.2in}  % Centers text.
\setlength{\evensidemargin}{-.2in}

% Add the period after section numbers.  Adjust spacing.

\newcommand{\bqn}{\begin{eqnarray}}
\newcommand{\eqn}{\end{eqnarray}}
\newcommand{\bq}{\begin{eqnarray*}}
\newcommand{\eq}{\end{eqnarray*}}

\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 08\\
Large sample confidence intervals}

% For single author (just remove % characters)
\author{Moo K. Chung\\
mchung@stat.wisc.edu}
% For two authors (default example)
\maketitle
\thispagestyle{empty}

\begin{enumerate}

\item The sample size is inversely related to the width of confidence
interval. Example 7.4.
\item {\em Central Limit Theorem.} Let $X_1,\cdots,X_n$ be a random
sample with mean $\mu$ and variance $\sigma^2$. For sufficiently
large $n$,
$$Z=\frac{\bar X-\mu}{\sigma /\sqrt{n}} \sim N(0,1).$$

\item Let $X_1,\cdots,X_n$ be a random
sample with mean $\mu$. For sufficiently large $n$,
$$Z=\frac{\bar X-\mu}{S /\sqrt{n}} \sim N(0,1)$$
where $S$ is the sample standard deviation. If $n$ is sufficiently
large, approximate $100(1-\alpha)\%$ confidence interval for $\mu$
is
$$\bar x \pm z_{\alpha/2}\frac{s}{\sqrt{n}},$$ where $s$ is the sample standard deviation.

\item {\em General large sample confidence interval.} Suppose $\hat
\theta$ is an unbiased estimator of some parameter $\theta$, Then
$100(1-\alpha)\%$ confidence interval is
$$\hat \theta + z_{\alpha/2}\sqrt{\mathbb{V} \hat \theta}.$$
In many applications, $\mathbb{V} {\hat \theta}$ is a function of
$\theta$ which makes computation of CI complicated. In this
situation, we need to estimate $\mathbb{V} {\hat \theta}$ further.

{\em Example.} Toss $n=100$ biased coins with $P(H)=p$. Suppose you
observe 38 heads. Construct 95$\%$ CI of $p$.

\begin{verbatim}
> X<-rbinom(100,1,0.4)
> X
  [1] 1 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0
 [17] 0 0 1 1 0 1 0 1 1 0 1 0 1 0 1 0
 [33] 1 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0
 [49] 0 1 0 0 0 0 1 1 0 1 0 1 1 0 0 1
 [65] 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0
 [81] 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1
 [97] 0 1 1 0
> sqrt(0.38*(1-0.38)/100)*1.96
[1] 0.09513574
> 0.38+0.095
[1] 0.475
> 0.38-0.095
[1] 0.285

\end{verbatim}

\item One-sided confidence interval:
An $100(1 - \alpha)\%$ upper confidence bound for $\theta$ is
$$\theta < \bar x + z_{\alpha}\sqrt{\mathbb{V}\hat \theta}$$
and a lower confidence bound for $\mu$ is
$$\theta > \bar x - z_{\alpha}\sqrt{\mathbb{V}\hat \theta}.$$
\end{enumerate}
{\em Review Problems.} Example 7.8, 7.10.
\end{document}
