% This is the quiz 2 for Stat 6502

\documentclass{article}

\addtolength{\oddsidemargin}{-1in}
\addtolength{\evensidemargin}{-1in}
\addtolength{\textwidth}{2in}
\addtolength{\topmargin}{-0.5in}
\setlength{\textheight}{9in}

\begin{document}

\thispagestyle{empty}

\centerline{\bf{CALIFORNIA STATE UNIVERSITY, EAST BAY }}
\centerline{\bf{STATISTICS DEPARTMENT}} \centerline{ }
\centerline{\bf{Statistics 6502 Mathematical Statistics}}
\centerline{\bf{Spring 2013}}

\medskip
\noindent \centerline{\bf{Quiz II}}

\begin{enumerate}


% *******************************************************************
\item

{\bf ( 30 points )} Suppose that $X \sim$ Negative Binomial($r_1,p_1$) and $Y \sim$ Negative Bionomial($r_2,p_2$).
Recall the Negative Binomial distribution.
\begin{eqnarray*}
f(x|p) &=& {{x-1} \choose {r-1}} (1-p)^r p^{x-r} \ \ \ \ \ x = r, r+1, ...
\end{eqnarray*}
Assume that $X$ and $Y$ independent, we wish to test whether the
proportions are equal, $H_0:p_1 = p_2 = p$ versus $H_1: p_1 \ne
p_2$, where $p$ is unknown.
\begin{enumerate}
\item
The parameter space $\Omega = (0,1) \times (0,1) = \{(p_1,p_2)|\ 0
< p_1 < 1, 0 < p_2 <1\}$, and the subset corresponding to $H_0$ is
$\Omega_0 = \{(p_1,p_2)|\ 0 < p_1 = p_2 <1\}$.  Sketch and label these sets on one graph.
\item
Find the MLE's of $p_1$ and $p_2$ over $\Omega$.
\item
Find the MLE of $p$ over $\Omega_0$.
\item
Find the GLR statistic. Note that the test statistic does not simplify
much, but can be computed easily.
\item
Using the appropriate large sample approximation, specify the GLR
test for the significance level $\alpha$.
\item
What R code could be used to compute the critical value of test?
\end{enumerate}

% *******************************************************************
\item
{\bf ( 40 points )} Let $X$ have one of the following four
distributions:
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
  % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
  \hline
  $x$ & $f_0(x)$ & $f_1(x)$ & $f_2(x)$ & $f_3(x)$\\
  \hline
  $x_1$ & 0.2 & 0.5 & 0.3 & 0 \\
  $x_2$ & 0.3 & 0.1 & 0.0 & 0 \\
  $x_3$ & 0.1 & 0.2 & 0.4 & 0.5 \\
  $x_4$ & 0.4 & 0.2 & 0.3 & 0.5 \\ \hline
\end{tabular}
\end{center}
Determine the G.L.R. test $\phi(x)$ for testing the following
simple null hypothesis versus the composite alternative hypothesis
\begin{center}
\begin{eqnarray}
H_0: X \sim f_0(x)\nonumber
\end{eqnarray}
\begin{eqnarray}
H_1: X \sim f_1(x)  \quad or \quad X \sim f_2(x) \quad or \quad X
\sim f_3(x) \nonumber
\end{eqnarray}
\end{center}
at the $\alpha = 0.10$ level?  What is the test at the $0.30$
level?

% *******************************************************************
\item
{\bf ( Extra Credit )} You are given a single observation from either
the standard normal or the uniform distribution on $(-4, 4)$
distribution.
\begin{enumerate}
\item
Accurately sketch a picture of the null and alternative densities
on one set of axes.
\item
Find the most powerful test of size $\alpha = 0.05$ for
\begin{eqnarray*}
  H_0: X \sim Normal(0,1^2)
\end{eqnarray*}
versus
\begin{eqnarray*}
  H_1: X \sim Uniform(-4,4).
\end{eqnarray*}
\item
Calculate the power, $\pi$, of the test.
\item
Calculate the probability of Type II Error, $\beta$, for the the test.
\end{enumerate}

% *******************************************************************



\end{enumerate}

\end{document}
