% 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[12pt]{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}{8in} \setlength{\textwidth}{6.875in}
%\setlength{\columnsep}{0.3125in} \setlength{\topmargin}{0in}
\setlength{\headheight}{0.7in} \setlength{\headsep}{-1in}
\setlength{\parindent}{1pc}
\setlength{\oddsidemargin}{-.1875in}  % Centers text.
\setlength{\evensidemargin}{-.1875in}

% 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{Stat312: Midterm Exam I.}

% For single author (just remove % characters)
\author{Instructor: Moo K. Chung\\
mchung@stat.wisc.edu}
% For two authors (default example)
\maketitle
\thispagestyle{empty}
\begin{center}
\small
Answer all questions clearly and {\bf circle your final answer}.\\
Your answers should be correct up to the {\bf second decimal places}.\\
One page note and a calculator are allowed.\\
No textbooks, scrap papers or hand-held computers, PDA are allowed.\\
This exam booklet consists of {\bf 3 problems} and {\bf 6 pages}.\\

\vspace{1cm}
\large
{\bf Name:}\underline{\hspace{10.5cm}}\\
{\bf Student ID:}\underline{\hspace{10cm}}\\

\normalsize
\vspace{1cm}
Pledge: On my honor, I have neither given nor received unauthorized\\
aids on this examination.\\
\vspace{1cm}
\large
{\bf Signature:}\underline{\hspace{10cm}}\\
\vspace{1cm}

\begin{tabular}{|r|l|c|}\hline
Question & Points}\\
\hline
1 & \\
\hline
2 & \\
\hline
3 & \\
%\hline
%4&\\
\hline
%5&\\
%\hline
%4 & \\
%\hline
Total & \\
\hline
\end{tabular}
\end{center}

\newpage
%
%\begin{verbatim}
%> qnorm(c(0.99,0.975,0.95,0.925,0.9))
%[1] 2.33, 1.96, 1.64, 1.44, 1.28
%> qt(c(0.99,0.975,0.95,0.925,0.9),2)
%[1] 6.96 4.303 2.92 2.28 1.89
%> qt(c(0.99,0.975,0.95,0.925,0.9),3)
%[1] 4.54 3.18 2.35 1.92 1.64
%> qt(c(0.99,0.975,0.95,0.925,0.9),4)
%[1] 3.75 2.77 2.13 1.78 1.53 x
%\end{verbatim}


\begin{enumerate}

\item Suppose a random sample $X_1, \cdots, X_n$ are coming from a normal distribution with mean 0 and variance $\sigma^2$. We
are interested in estimating $\sigma^2$.
 \begin{itemize}
\item[(1)] Write the likelihood function (5pts).

\item[(2)] By maximizing the likelihood function, find the maximum likelihood
estimator for $\sigma^2$. Derive everything (5pts).
\newpage
\item[(3)] Determine if the estimator in (2) is unbiased (5pts, no point given if (2) is not solved).

\item[(4)] By matching moments, estimate $\sigma^2$ (5pts).
\end{itemize}
\newpage
\item Consider a random sample $X_1,X_2, X_3$ coming from
distribution $$f(x) = \frac{1}{\theta}e^{-x/\theta}, x > 0.$$
\item[(1)] Write the loglikelihood function (5pts).

\item[(2)] By maximizing the loglikelihood function, find the maximum likelihood
estimator for $\theta$. Derive everything (5pts).
\newpage

\item[(3)] What is the maximum likelihood estimator of $P(X_1 > 1)$.

\newpage


\item 49 students take a midterm exam in STAT 312. If $x_i$ is the grade for the $i$-th student,
we have $\sum_{i=1}^{49} x_i= 3675$ and $\sum_{i=1}^{49} x_i^2 =
275,625$.
\item[(1)] What is the sample variance? (5pts).
\item[(2)] Construct $6\%$ confidence interval for the average grade. You may use the following {\tt R} output (5pts).

\begin{verbatim}
> qnorm(1:10/100)
> [1] -2.326348 -2.053749 -1.880794 -1.750686 -1.644854
> [6] -1.554774 -1.475791 -1.405072 -1.340755 -1.281552
\end{verbatim}
\end{enumerate}


\end{document}
