\documentclass[12pt]{article}

\usepackage{amsmath,amsthm,amssymb,amsfonts}

%\usepackage{undertilde}

\newcommand{\tmpcrap}{\dsp \vphantom{\frac{\frac{X}{Y}^{\frac{A}{B}}}{\frac{X}{Y}^{\frac{C}{D}}}}}

% Original margins

\addtolength{\textheight}{1.8truein}
\addtolength{\topmargin}{-.90truein}

\addtolength{\oddsidemargin}{-0.5truein}
\addtolength{\evensidemargin}{-0.5truein}
\addtolength{\textwidth}{1.0truein}


\newcommand{\dsp}{\displaystyle}

\newcommand{\argmin}{\mathop{\rm argmin}}

\newcommand{\real}{\ensuremath{\mathbb{R}}}


\newcommand{\comment}[1]{} 
\newcommand{\vsph}{\vspace{.50cm}}
\newcommand{\vsp}{\vspace{.2cm}}
\newcommand{\vecc}[1]{\text{\boldmath $#1$}}
%\newcommand{\utilde}[1]{\underset{\widetilde{}}{#1}}
\newcommand{\G}{\,|\,}
\newcommand{\field}[1]{\mathbb{#1}}

\def\EE{ {\rm I} \kern-.15em {\rm E} }

\newcounter{qnum} \newcounter{pnum}[qnum]


% \newcommand{\topic}[1]{\vsph \hrule \vsph \mbox{} \hfill { \it #1}
%   \hfill \mbox{} }

% \newcommand{\QQ}{\vsph \hrule \vsph \stepcounter{qnum} {\noindent \bf
%     Problem \theqnum.} \hspace{.2cm} }

\newcommand{\QQ}[1]{
\pagebreak[2] 
\vsph \hrule \vsph \stepcounter{qnum} {\noindent \bf
    Problem \theqnum.}\hspace{.03cm} (#1) \hspace{.1cm} }

\newcommand{\cont}{{\noindent \bf Problem \theqnum \ continued:\,}
  }

\newcommand{\sep}{\vsph \hrule \vsph}

\newcommand{\PP}{\stepcounter{pnum} \item[{\bf (\alph{pnum})}]\, }

\newenvironment{parts}{
  \begin{list}{}{\setlength{\topsep}{2.0ex}\setlength{\itemsep}{1.5ex}
      \setlength{\leftmargin}{2.3em}\setlength{\labelsep}{0.8em}}
  }{\end{list}}

\def\god{{\buildrel {\cal D} \over \longrightarrow}}
\def\goas{{\buildrel {\rm a.s.} \over \longrightarrow}}

\def\r{\rightarrow} \def\p{\stackrel{p}{\r}} \def\d{\stackrel{d}{\r}}
\def\argmax{\mathop{\rm argmax}}

\newcommand{\var}{\mbox{Var}}


\usepackage{amsfonts}

\newcommand{\RR}{\mathbb {R}}

\newcommand{\eps}{\varepsilon}


\newenvironment{clist}
{%\vspace{-1cm}
\begin{list}{$\bullet$}
{
%\setlength{\topsep}{0.0cm}
%\setlength{\itemsep}{0.0cm} 
%\setlength{\parsep}{0.0cm}}
\setlength{\topsep}{.1cm}
\setlength{\itemsep}{.1cm} 
\setlength{\parsep}{.1cm}}
}{\end{list}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% For 5166 and 5198

\usepackage{amsmath,amsfonts,amsthm,amssymb}

\usepackage[table]{xcolor}
\usepackage{graphicx}

%\usepackage{undertilde}


\newcommand{\twobytwo}[4]{\mbox{%
\ensuremath{
 \begin{array}{r|r|r|}
\multicolumn{1}{c}{} & \multicolumn{1}{c}{D} & 
              \multicolumn{1}{c}{\overline{D}} \\
\cline{2-3}
E  & #1 & #3 \\
\cline{2-3}
\overline{E} & #2 & #4\\
\cline{2-3}
 \end{array}
}%
}}
\newcommand{\OR}{\textnormal{OR}}
\newcommand{\E}{\textnormal{E}}
\newcommand{\V}{\textnormal{Var}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\mbox{}

\vspace{-.8in}

\begin{center}
  \bf \large

  Ph.D.\ Qualifying Exam\\
  Wednesday--Thursday, August 17--18, 2022

\end{center}

\vspace{.1in}

{\bf $\bullet$ Begin your solution to each problem on a new sheet of paper.

\vsp

$\bullet$ Statistics PhD students should do the 5106 problems.

\vsp

$\bullet$ Biostatistics PhD students should do the 5198 problems.

\vsp

$\bullet$ All students should do the 5166 and 5167 problems.
}

\vsp

% \vspace{.2in}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% xxx Day 1 problems begin here.


\QQ{5106} Let $(X_1, Y_1), (X_2, Y_2), \ldots, (X_n, Y_n)$ be a
sequence of i.i.d.\ paired samples, where
$X_i \in {\bf R}^{d}, Y_i \in {\bf R}, i = 1, \ldots, n$.  Conditioned
on $X_i$, $Y_i$ follows a Poisson distribution with mean parameter
$\lambda_{X_i} = e^{\beta^T X_i}$, where $\beta \in {\bf R}^d$ and
$\beta^T$ indicates the transpose of $\beta$.  That is,
$$ Y_i \,|\, X_i, \beta \sim \text{Poisson}(\lambda_{X_i})\,.$$
Our goal is to find the maximum likelihood estimate (MLE) of $\beta$ with the observations $\{(X_i, Y_i)\}_{i=1}^n$. 
\begin{parts}
\PP 
Derive an expression for the log-likelihood function 
$$ l(\beta) = \sum_{i=1}^n \log(f(Y_i|X_i, \beta)), $$
such that the MLE is given by 
$$ \hat \beta = \argmax_\beta\, l(\beta)\,.$$
\PP 
Find the expressions for the gradient $L = \dsp \frac{\partial {l}(\beta)}{\partial \beta}$ and Hessian matrix $H= \dsp \frac{\partial^2 {l}(\beta)}{\partial \beta \partial \beta^T}$.  Prove that the log-likelihood function $l(\beta)$ is concave. (Hint: show that $H$ is semi-negative definite.)
\PP
Write out the Newton-Raphson algorithm to find the root of the gradient $L$. 
\end{parts}


\QQ{5106} Consider a data set of observations $\{x_n\}$ where
$n = 1, \ldots, N$, and $x_n$ is a Euclidean variable with
dimensionality $D$.  Our goal is to project the data onto a space
having dimensionality $M < D$ while maximizing the variance of the
projected data.  Prove that the optimal linear projection for which
the variance of the projected data is maximized is defined by the $M$
eigenvectors $U_1, \ldots, U_M$ of the data covariance matrix $S$
corresponding to the $M$ largest eigenvalues
$\lambda_1, \ldots, \lambda_M$.


\QQ{5166} Table~\ref{tab:data} summarizes the observed data for a study with the outcome being the measurement of some blood biomarkers. Two factors, A and B, are of interest. Each factor indicates the absence (0) or presence (1) of some potential risk factor. Twelve subjects were recruited for the study, three for each of the four combinations of the two factors. Answer the following questions. Conduct all hypothesis tests at the 0.05 significance level.

\begin{table}[!htbp]
\centering
\caption{Observed data for the study.}
\label{tab:data}
\begin{tabular}{|c|ccc|}
\hline
Subject & Outcome & A & B \\
\hline
1 & 42.4 & 1 & 1 \\
2 & 43.2 & 1 & 1 \\
3 & 42.2 & 1 & 1 \\
4 & 43.6 & 1 & 0 \\
5 & 42.3 & 1 & 0 \\
6 & 41.2 & 1 & 0 \\
7 & 42.5 & 0 & 1 \\
8 & 42.7 & 0 & 1 \\
9 & 42.6 & 0 & 1 \\
10 & 39.7 & 0 & 0 \\
11 & 41.5 & 0 & 0 \\
12 & 40.4 & 0 & 0 \\
\hline
\end{tabular}
\end{table}

\begin{parts}
\PP (3 points) Write the factor-effects model for this study, including the main effects and interaction. Define all quantities that appear in your model specification, and state all model assumptions.

\PP (5 points) Some output results for the model fit are shown in Table~\ref{tab:anova}. Find the values of the missing items [i] to [viii] in the table. Show your derivations and justifications.

\begin{table}[!htbp]
\centering
\caption{Analysis of variance table.}
\label{tab:anova}
\begin{tabular}{lrrrrr}
\texttt{Source} & \texttt{Df} & \texttt{Sum Sq} & \texttt{Mean Sq} & \texttt{F value} & \texttt{Pr(>F)} \\
\texttt{A} & \texttt{1} & \texttt{2.5208} & \texttt{2.5208} & \texttt{3.9439} & \texttt{0.08229} \\
\texttt{B} & \texttt{[i]} & \texttt{[iv]} & \texttt{3.9675} & \texttt{6.2073} & \texttt{0.03744} \\
\texttt{A:B} & \texttt{[ii]} & \texttt{[v]} & \texttt{[vii]} & \texttt{3.9439} & \texttt{0.08229} \\
\texttt{Residuals} & \texttt{[iii]} & \texttt{[vi]} & \texttt{[viii]} & & \\
\end{tabular}
\end{table}

\PP (5 points) Based on these results, compute a $F$-statistic and state the degrees of freedom for a joint test of whether or not the interaction term and the main effect of B are significant. Give the conclusion of this joint test. You may need the information from the critical values of $F$-distribution in Table~\ref{tab:crival}.

\begin{table}[!htbp]
\centering
\caption{Critical values for $F$-distribution with degrees of freedom (df$_1$, df$_2$) and 0.05 tail probability.}
\label{tab:crival}
\begin{tabular}{|c|cccc|}
\hline
& df$_1$ = 1 & 2 & 3 & 4 \\
\hline
df$_2$ = 5 & 6.608 & 5.786 & 5.409 & 5.192 \\
6 & 5.987 & 5.143 & 4.757 & 4.534 \\
7 & 5.591 & 4.737 & 4.347 & 4.120 \\
8 & 5.318 & 4.459 & 4.066 & 3.838 \\
9 & 5.117 & 4.256 & 3.863 & 3.633 \\
10 & 4.965 & 4.103 & 3.708 & 3.478 \\
\hline
\end{tabular}
\end{table}

\PP (3 points) Compute a $F$-statistic and state the degrees of freedom for testing whether the overall effects of the two factors are significant. Give the conclusion of this joint test. You may need the information from the critical values of $F$-distribution in Table~\ref{tab:crival}.

\PP (4 points) Suppose we fit an additive effects model (no interaction) to the data. Will the MSE change? If so, how and why? If the MSE will change, compute the new MSE and the various $F$ statistics.


\end{parts}


\QQ{5166} Suppose that we aim to determine the effects of 6 factors in an experiment. We refer to these 6 factors as A, B, C, D, E, and F.
\begin{parts}
\PP (8 points) Construct a $2^{6-2}$ fractional factorial design such that its resolution is as high as possible. Specify the generators of your design. What is the resolution?

\PP (8 points) What is the defining relation of your design? Give the confounding pattern.

\PP (4 points) Which effects are confounded with the main effect of factor A in your design? Which effects are confounded with the two-factor interaction AB?

\end{parts}


\QQ{5167}
Consider the following simple linear regression model of $Y$ on $X_1$: 
\begin{equation}\label{eq1}
Y=\alpha+\beta X_1+e\,.
\end{equation}

Suppose $n=45$, $\bar X_1=-3.3$, $\bar Y=5.5$, $SXX=100.0$, $SYY=123.4$, and $SXY=88.8$\,.

\begin{parts}
  \PP Find the following: RSS, $R^2$,
  $\hat\alpha$, $\hat\beta$, and $\hat{\sigma}^2\equiv\widehat{var}(e)$.

\PP Test the hypothesis (at level 0.05) that $\beta=1$ versus $\beta>1$.

\PP What assumptions (in addition to (1)) are required for the test in
part (b)?

\PP Find the 95\% prediction interval for a new observation $X_1^\star=-2$. 

\PP Consider the following regression model, 
$$
Y_i = \mu + \epsilon_i,\quad i=1,\dots,n,
$$
where $\mathrm{var}(\epsilon_i)=\sigma^2$ for all $i$, and $\mathrm{Corr}(\epsilon_i,\epsilon_j)=\rho>0$ for $i\neq j$. Is the sample mean $\overline Y=\sum_{i=1}^n Y_i/n$ still the MLE for $\mu$? What is the variance of $\overline Y$? Does the variance go to zero when $n\rightarrow\infty$ in this case, and why?

\item[Note:] Here is some {\sc R} output that might be helpful. 
\begin{verbatim}
> qt(c(0.95,0.975,0.99,0.995),42)
[1] 1.681952 2.018082 2.418470 2.698066
> qt(c(0.95,0.975,0.99,0.995),43)
[1] 1.681071 2.016692 2.416250 2.695102
> qt(c(0.95,0.975,0.99,0.995),44)
[1] 1.680230 2.015368 2.414134 2.692278
\end{verbatim}

\end{parts}


\QQ{5167}
Suppose we have two response variables $Y_1,Y_2\in\mathbb{R}$  and a multivariate predictor $X=(X_1,\dots,X_p)^T\in\mathbb{R}^p$. We are interested in the following regression model,
$$
Y_1=\beta_0+\beta^TX+\varepsilon,$$
$$ Y_2=\gamma_0+\gamma^TX+\delta,
$$ 
where $(\varepsilon,\delta)$ is bivariate normal with mean zero and $\mathrm{corr}(\varepsilon,\delta)=\rho>0$. Suppose the data are i.i.d., $(Y_{1i},Y_{2i},X_i^T)\sim(Y_{1},Y_{2},X^T)$, $i=1,\dots,n$.
\begin{parts}
\PP Write down the ordinary least squares estimates for $\beta_0,\beta,\gamma_0,\gamma$ and prove that these are the maximum likelihood estimators.

\PP Derive an estimator (e.g., the maximum likelihood estimator) for $\rho$.

\PP Discuss how $\rho=0$ would affect the estimates in parts (a) and (b).

\PP If $\rho$ is given, how can you improve the estimates in parts (a)
and (b)?

\end{parts}

% xxx Finished proof-reading to here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\QQ{5198} It is widely believed that the influenza vaccine can lower risk for myocardial infarction (MI). 
The data below come from a study investigating the association between the influenza vaccine and MI among people aged 65 years and older. Electronic health records (EHRs) were used to identify patients who had no record of a previous flu vaccine and received the flu vaccine between Sept. 1, 1996 and January 31, 1997. Unvaccinated patients in the EHRs were designated as controls. This ``1997 cohort'' was followed for a year, with subjects censored upon death, subsequent flu vaccination (for controls), and departing their clinical practice.\\[6pt]
The ``1997 Cohort'':
\[
\begin{array}{r|r|r|r}
\multicolumn{1}{c}{} & \multicolumn{1}{c}{\textnormal{MI}} & 
              \multicolumn{1}{c}{\textnormal{No MI}} & \multicolumn{1}{c}{\textnormal{Total}} \\
\cline{2-3}
\textnormal{Flu Vaccine}  & 80 & 7,607 & 7,687 \\
\cline{2-3}
\textnormal{No Flu Vaccine} & 423 & 54,534 & 54,957\\
\cline{2-4}
\multicolumn{1}{c}{}& \multicolumn{1}{c}{}& \multicolumn{1}{c}{}& 62,644
 \end{array}
\]

\begin{parts}
\PP Estimate the odds ratio for MI associated with vaccination vs no vaccination for these data. Provide a 95\% confidence interval and interpret. 

% xxx stopped proof reading here.

\PP The investigators also classified patients according to whether they had comorbidities associated with increased risk for MI. Among the patients with comorbidities, they found $\widehat{\mbox{OR}}_{co} = 1.50$ with 95\% CI (1.16, 1.92); among those without comorbidities, they found $\widehat{\mbox{OR}}_{noco} = 0.16$, 95\% CI (0.04, 0.67). Moreover, when considering presence/absence of comorbidities as strata, they found
\begin{itemize}
\item The Mantel-Haenszel estimate of the common OR is 1.23 with 95\% CI (0.96, 1.56).
\item The Cochran-Mantel-Haenszel test that the common OR is 1.0 yields the test statistic of 2.71 on 1 degree of freedom.
\item The Breslow-Day test yields a test statistic of 13.5 on 1 degree of freedom.
\end{itemize}
Interpret these analyses -- what do you conclude about whether cormorbidities \emph{confound} the association between vaccination and MI risk? Do comorbidities  \emph{interact} with vaccine status to affect risk for MI? Be sure to clearly state all associated hypotheses. 

\end{parts}


\QQ{5198}

\begin{parts}
\PP
In the usual 2$\times$2 table (see formula sheet), derive the approximate variance for log of the odds ratio estimate
\begin{equation}
\label{eq:star}
\widehat{\mbox{Var}}\left(\log \widehat{\mbox{OR}}\right) \approx
\frac{1}{a} + \frac{1}{b} +
\frac{1}{c} + \frac{1}{d} .
\end{equation}
\emph{Justify every step} in your derivation.


\PP What is an approximate variance for the odds ratio estimate (i.e., not the log OR estimate) that follows from (\ref{eq:star})?

\end{parts}

% xxx Finished proofing to here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
% BEGIN FORMULA SHEET
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{center}
\large \bf  Formula Sheet for STA 5198 Problems
\end{center}


\noindent Some known formulae based on the usual $2 \times 2 $
table $\twobytwo{a}{c}{b}{d}$.
%\[
%\twobytwo{a}{c}{b}{d}.
%\]

\begin{align}
\mbox{RR} &= \mbox{relative risk}\nonumber\\
\mbox{OR} &= \mbox{odds ratio}\nonumber\\
\mbox{AR} &= \mbox{attributable risk} = \frac{R - R_{\overline{E}}}{R}, \text{ where $R$ is the overall risk}
\label{eq:AR}
\end{align}
\begin{align}
\widehat{\mbox{Var}}\left(\log \widehat{\mbox{RR}}\right) &\approx
\frac{1}{a} - \frac{1}{a+b} +
\frac{1}{c} - \frac{1}{c+d} \\
\widehat{\mbox{Var}}\left(\log \widehat{\mbox{OR}}\right) &\approx \frac{1}{a} + \frac{1}{b} +
\frac{1}{c} + \frac{1}{d}
\end{align}
Approximate $100(1-\alpha)\%$ confidence interval for $\mbox{AR}$ is
given by
\begin{equation}
\frac{(ad - bc)\exp(\pm u)}{nc + (ad-bc)\exp(\pm u)},
\end{equation}
where
\[
u = \frac{z_{\alpha/2}(a + c)(c + d)}{ad-bc} \sqrt{\frac{ad(n-c) +
    c^2b}{nc(a+c)(c+d)}}.
\]
\hrule
\begin{itemize}
\item Mantel-Haenszel estimate of the odds ratio: 
\begin{equation}\left(\sum_i \frac{a_i d_i}{n_i}\right)/\left( \sum_i \frac{b_i c_i}{n_i}\right)
\end{equation}
\item Cochran-Mantel-Haenszel test for significance of the E-D association adjusted for confounder:
\begin{equation}
X^2 = \frac{\left(\sum a_i - \sum E(a_i)\right)^2}{\sum \V(a_i)}
\end{equation}
\[
\E(a_i) = \frac{D_i E_i}{n_i}, \qquad \V(a_i) = \frac{D_i \overline{D}_i E_i \overline{E}_i}{n_i^2(n_i -1)}
\]
\item Breslow-Day test for homogeneity of the relative risks (or odds ratios) across strata:
\begin{equation}
X^2 = \sum\frac{(a_i - \E(a_i))^2}{\V(a_i)},
\end{equation}
where now $\E(a_i)$ and $\V(a_i)$ are computed using the Mantel-Haenszel estimate of the common relative risk across strata.

\item $\chi^2$ test for association in 2-way table with observed counts $\{O_{ij}\}$:
\begin{equation}
X^2 = \sum_{i,j} \frac{(O_{ij} - E_{ij})^2}{E_{ij}}, \qquad E_{ij} = \frac{O_{i\cdot}}{n}\frac{O_{\cdot j}}{n}n
\end{equation}

\item $\chi^2$ test for trend in $\ell \times 2$ table with exposure scores $x_1, x_2, \ldots, x_\ell$:
\begin{equation}
X^2_{(L)} = \frac{(T_1 - \frac{n_D}{n} T_2)^2}{V},
\end{equation}
where $T_1 = \sum a_i x_i$, $T_2 = \sum m_i x_i$, $T_3 = \sum m_i x_i^2$ and $V = n_Dn_{\bar{D}}(nT_3 - T_2^2)/[n^2(n-1)]$


\item $\kappa$ statistic for agreement in square 2-way table with observed counts $\{O_{ij}\}$ and expected counts (assuming independence of rows and columns) $\{E_{ij}\}$:
\begin{equation}
\kappa = \frac{p_O - p_E}{1 - p_E}, \qquad p_O = \sum O_{ii}/n, \ \ p_E = \sum E_{ii}/n
\end{equation}

\item Some normal quantiles.  Here $Z \sim N(0, 1)$.
%\[
%\begin{array}{|r|cccccc|}
%\hline
%z & 2.33 & 1.96 & 1.64 & 1.28 & 1.04 & 0.84\\
%\hline
%P(Z \le z) & 0.99 & 0.975 & 0.95 & 0.90 & 0.85 & 0.80 \\
%\hline
%\end{array}
%\]
\[
\begin{array}{|r|cccccc|}
\hline
z & 0.84 & 1.04 & 1.28 & 1.64& 1.96 & 2.33 \\
\hline
P(Z \le z) & 0.80 & 0.85 & 0.90 & 0.95 & 0.975 & 0.99 \\
\hline
\end{array}
\]

\item 
Critical values of the $\chi^2_{\nu}$ distribution.  For $W \sim \chi^2_{\nu}$, the entries are $q$ such that $\Pr(W \ge q) = p$.
	\[
	\begin{array}{r|rrrr}
	\multicolumn{1}{c}{}& \multicolumn{4}{c}{\mbox{Probability}\ \  p} \\
	\multicolumn{1}{c|}{\nu = \mbox{df}} & 0.10 & 0.05 & 0.025 & 0.01\\
		\hline
		1 & 2.7 & 3.8 & 5.0 & 6.6 \\
		2 & 4.6 & 6.0 & 7.4 & 9.2 \\
		3 & 6.3 & 7.8 & 9.2 & 11.3 \\
		4 & 7.8 & 9.5 & 11.1 & 13.3 \\
		5 & 9.2 & 11.1 & 12.8 & 15.1 \\
		6 & 10.6 & 12.6 & 14.4 & 16.8
	\end{array}
	\]
	
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% END FORMULA SHEET
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% End Day 1.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pagebreak

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Begin Day 2.
 
\mbox{}

%\vspace{-0.6in}


{\bf Begin your solution to each problem on a new sheet of paper.}

\vspace{.2in}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% xxx Day #2 problems begin here.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\QQ{5326} A monkey types {\large \bf 13} digits at random. (Each
keystroke is independent of the others, and all 10 digits
$0,1,2,\ldots,9$ are equally likely with probability 1/10.) Let $X_i =$
the number of digits which appear {\bf exactly} $i$ times in the monkey's
typed output.  Find the following.  Explain your answers.

\begin{parts}

\PP $P(X_4=3)$

\PP $E X_3$

\PP $P(X_5=0)$

\end{parts}

\QQ{5326} Let $X_1$ and $X_2$ be independent $N(0,1)$ random variables.

\begin{parts}

\PP Find the density (pdf) of $\dsp Y= \frac{(X_1 - X_2)^2}{2}$.

\PP Find the density  (pdf) of $\dsp Z= \frac{X_1^2}{X_1^2 + X_2^2}$\,.
  
\end{parts}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\sep

\vspace{.50cm}

The following table will be useful for solving the STA 5327 problems.\\


\begin{tabular}{|c|c|c|c|c|}

  % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...
  \hline
  \textbf{Name} & \textbf{Notation} & $f(x)$&E(X)&Var(X) \\ 
  \hline 
Normal & $\mathrm{N}(\mu, \sigma^2)$& $\tmpcrap
 \frac{1}{\sqrt{2 \pi} \sigma} e^\frac{-(x-\mu)^2}{2 \sigma^2},\quad-\infty<x<\infty$&$\mu $&$\sigma^2$\\
\hline
Bernoulli&$\mathrm{Bernoulli}(p)$&$\tmpcrap p^x(1-p)^{(1-x)},\quad x=0,1$&$p$&$p(1-p)$\\
  \hline
Beta&$\mathrm{Beta}(\alpha,\beta)$&$\tmpcrap \dfrac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha,\beta)},\quad 0<x<1$&$\dfrac{\alpha}{\alpha+\beta}$&$\dfrac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)} $\\ 
  \hline
  \end{tabular}\\[4pt]
where $B(\alpha,\beta)=\dfrac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}$ and $\Gamma$ is the Gamma function.

\newpage


\QQ{5327} We consider $X_1,\ldots,X_n$ i.i.d.\ from $N(\mu,\sigma^2)$,
where the parameter space is
$\Theta=\{(\mu,\sigma^2): \sigma^2>0,|\mu|\le\sigma/10\}$.

\begin{parts}
\PP Find the method of moment (MOM) estimator for $\mu$. Call it $\hat \mu$.
\PP Find the mean squared error (MSE) for the MOM estimator $\hat\mu$. Recall that $\text{MSE}_{\mu}(\hat\mu)=E(\hat\mu-\mu)^2$.
\PP Consider the estimator 
$$
\tilde\mu=\frac{1}{n}\sum_{i=1}^n\frac{X_i}{1+\lambda}\,,
$$
where $\lambda\ge 0$ is a constant.  For what values of $\lambda$ do we have
$$
\text{MSE}_{\mu}(\tilde\mu)\le\text{MSE}_{\mu}(\hat\mu)
$$
for any $|\mu|\le\sigma/10$, where $\hat\mu$ is the MOM estimator?

\end{parts}


\QQ{5327} We consider $X_1,\ldots,X_n$ i.i.d from
$\text{Bernoulli}(p)$, where the parameter space is
$\Theta=\{p:0.25\le p\le 0.75\}$.

\begin{parts}
\PP Find the maximum likelihood estimator for $p$.

\PP Find the maximum likelihood estimator for $\log{(\frac{p}{1-p})}$.

\PP The Beta distribution is the conjugate prior for the Bernoulli distribution. If we want to construct a Bayesian estimator for $p$, would you use the Beta distribution as the prior distribution? Why or why not?

\end{parts}

\newpage

\QQ{6346} Let $(\Omega, \mathcal{F}, \mu)$ be a probability space.

\begin{parts}
  
\PP Give the definition of a probability measure.


\PP Suppose $X$ is a random variable on $(\Omega, \mathcal{F}, \mu)$ with $X\geq 0$ and $\field{E}X=1$. Let $\nu(A)=\field{E}(X1_A)$ for all $A\in \mathcal{F}$. Show $\nu$ is a probability measure on $(\Omega, \mathcal{F})$.

\PP Show that $\mu(A)=0$ implies $\nu(A)=0$.

\PP If $X>0$ instead of $X\geq 0$, show that $\field{E}_{\nu}Y=\field{E}_{\mu}(XY)$ where $\field{E}_{\lambda}$ is the expectation with respect to the measure $\lambda$.

\end{parts}

\QQ{6346}  Answer the following.

\begin{parts}
  
\PP Define convergence in probability.

\PP Let $X$ and $Y_n$ be random variables with
$\field{E}Y_n = var(Y_n) = 1/n$. Show $X_n=X+Y_n$ converges to $X$ in
probability.

\PP Let $W_n$ be a sequence of random variables. Prove that $W_n$ converges in probability if and only if for every $\varepsilon > 0$,
$$
P(|W_n-W_m|>\varepsilon) \rightarrow 0
$$
as $n$ and $m$ go to infinity.

\end{parts}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
