% 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.2in} \setlength{\textwidth}{6.875in}
%\setlength{\columnsep}{0.3125in} \setlength{\topmargin}{0in}
\setlength{\headheight}{0in} \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: Sample Midterm I.}

% For single author (just remove % characters)
\author{Moo K. Chung\\
mchung@stat.wisc.edu}
% For two authors (default example)
\maketitle
\thispagestyle{empty}

Answer all questions clearly and circle your final answer. If you
submit two contradicting computations and answers, the grade will be
the minimum of two. Correct answers without valid computation or
explanation will not get full credit. If you used a wrong formula
without much explanation of what you are doing and ended up
submitting a wrong solution, you will get almost nothing.

\begin{enumerate}

\item Let $X_1,\cdots,X_n$ be a random sample from a normal
distribution with mean $\mu$ and variance $\sigma^2$.\\
(a) What is $\mathbb{E}(S^2/\sigma^2)$? $S^2$ is the sample
variance. Explain your result (5 points).\\
(b) Among all estimators of the form $aX_1 + bX_2$, find the
minimum variance unbiased estimator of $2\mu$ (10 points).


\item Consider the sample of fat content of 10 randomly selected
dogs: 25, 21, 22, 17, 29, 25, 16, 20, 19, 22. Suppose that these
are from a normal population.\\
(a) Find the sample standard deviation using two numbers 216 and
4806 in R output. No point will be given if you do not use these
two numbers (5 points).\\
(b) Find a $95\%$ confidence interval of the mean fat content (5
points).\\
(c) Find a $95\%$ confidence interval of the standard deviation of
fat content (5 points).
\begin{verbatim}
>X<-c(25,21,22,17,29,25,16,20,19,22)
>sum(X)
[1] 216
>sum(X^2)
[1] 4806
> qnorm(c(0.025,0.05))
[1] -1.96 -1.64
> qt(0.025,c(9,10))
[1] -2.26 -2.23
> qchisq(0.025,c(9,10))
[1] 2.70 3.25
> qchisq(0.975,c(9,10))
[1] 19.02277 20.48318
\end{verbatim}


\item Suppose you tossed $n=200$ biased coins and observed 140
heads.\\
(a) Compute a $98\%$ confidence interval for the
probability of
getting head (10 points).\\
(b) Compute a $98\%$ confidence interval for the following ratio:
probability of getting tail/probability of getting head (5
points).
\begin{verbatim}
>qnorm(0.02)
[1] -2.053749
>qnorm(0.01)
[1] -2.326348
\end{verbatim}

\item Let $X_1,\cdots,X_n$ be a random sample from Bernoulli
distribution with parameter $p$.\\
(a) Find the likelihood function and the maximum likelihood
estimator of $p$ (5 points).\\
(b) Find the maximum likelihood estimator of $p^2$ (5 points).\\
(c) Find an unbiased estimator of $p^2$ (5 points).
\end{enumerate}

\end{document}
