

% STA 2001S2001 Assignment 7


\documentclass[12pt]{article} 
\usepackage{amsbsy} % for \boldsymbol and \pmb 
%\pagestyle{empty} % No page numbers

\oddsidemargin=0in                   % better for US Letter paper
\evensidemargin=0in
\textwidth=6.3in

\topmargin=-0.4in
\headheight=0.2in
\headsep=0.5in
\textheight=9.4in                 


\begin{document}
%\enlargethispage*{1000 pt} 

\begin{center}   
{\Large \textbf{STA 2201S 2001 Assignment 7: }}\\
\vspace{1 mm}
Quiz on Thursday, March 15th: Do this assignment in preparation for the quiz. Bring printout.
\end{center}

Start by reading sections 5.1-5.3 (pages 224-235) in the text. You are not responsible for the proof that Hotelling's $T^2$ is a likelihood ratio test, but we will use the fact later. 

 \begin{enumerate}

    \item Let $\mathbf{X}_1, \ldots, \mathbf{X}_n$ be independent $MVN(\boldsymbol{\mu},\boldsymbol{\Sigma})$ random vectors, and let $\boldsymbol{\Sigma}$ be fixed and \emph{known}. To find distributions, you may use the fact that the moment-generating function of a multivariate normal is $e^{\mathbf{t}^\prime\boldsymbol{\mu} + 
\frac{1}{2}\mathbf{t}^\prime\boldsymbol{\Sigma}\mathbf{t}}$.   
 \begin{enumerate}
    \item Find the distribution of $\overline{\mathbf{X}}$. Show your work.
    \item Find the distribution of $\overline{\mathbf{X}}-\boldsymbol{\mu}$. Show your work.
    \item Derive the MLE of $\boldsymbol{\mu}$.
    \item Derive the likelihood ratio test of $H_0: \boldsymbol{\mu} = \boldsymbol{\mu}_0$. Show that it leads to a chi-square test (but don't bother to show that the quadratic form has a chisquare distribution). What are the degrees of freedom?
    \item Suppose the data are not normal and $\boldsymbol{\Sigma}$ is \emph{not} known, but the sample is large. What test statistic would you use?
 \end{enumerate}

    \item A fast-food restaurant chain selects a random sample of 272 restaurants, and requires all employees at each selected restaurant to rate their job satisfaction on a ten-point scale. The mean employee satisfaction is recorded for each restaurant on four occasions over the course of a year (that is, the data are recorded quarterly for four quarters.) Management want to know whether satisfaction is changing over the course of the year. Give an $\mathbf{A}$ matrix for testing $H_0: \mathbf{A}\boldsymbol{\mu}=\mathbf{0}$.

\item It has been suggested that mega-doses of certain vitamins may improve the
intellectual and social functioning of children with Down Syndrome (a kind of mental
retardation). A sample of children participate in the study for one year. Each child takes
eight pills a day. The pills contain different concentrations of vitamins --- either none
(placebo treatment), a low, a medium or a high dose. The pills are taken according to one
of three schedules --- either all in the morning, all in the evening, or at regular
intervals throughout the day. Each child participates in all twelve combinations of dose
level and schedule, staying with each treatment combination for a month.  Naturally,
each child experiences the treatment combinations in a different order. At the end of 
every month, each
child receives a standard intelligence test, and also is observed under controlled
conditions to obtain an index of social functioning, where higher scores indicate better
functioning.
    \begin{enumerate}
        \item The data provided by subject $i$ may be labelled $X_{i,1}, \ldots, X_{i,p}$. What is $p$?
        \item Specify what each of the $p$ variables is. This is just because different people may choose different orders, and it makes a difference in checking whether the $\mathbf{A}$ matrix is  right.
        \item Give the $\mathbf{A}$ matrix for testing the main effects of dose level, simultaneously for intelligence test score and social functioning score.
        \item Give the $\mathbf{A}$ matrix for testing the main effects of schedule, just for social functioning score.
        \item Give the $\mathbf{A}$ matrix for testing the interaction of schedule and dose level, just for intelligence test score.
    \end{enumerate}

    \item A total of 508 patients received three drugs labelled $A$, $B$ and $C$. Some had a favorable response to a single drug, some to two, and some to all three. The patterns of response and the number of patents showing each pattern are presented below. The table says, for example, that 62 people had favorable responses to all three drugs. 
{\begin{center}
Tabulation of Response to Drugs A, B, and C\\
(1 denotes favorable response, 0 denotes unfavorable response)\\
\begin{tabular}{|c|c|c|c|} \hline
\multicolumn{3}{|c|}{Drug} & \\ \hline
A & B & C & Number \\ \hline
1 & 1 & 1 & 62  \\ \hline
1 & 1 & 0 & 186 \\ \hline
1 & 0 & 1 & 27  \\ \hline
1 & 0 & 0 & 41  \\ \hline
0 & 1 & 1 & 16  \\ \hline
0 & 1 & 0 & 46  \\ \hline
0 & 0 & 1 & 62  \\ \hline
0 & 0 & 0 & 68  \\ \hline
\end{tabular}
\end{center}}
For each drug, estimate the probability of a favorable response; that is, give a number between zero and one. Test whether the probability of a favorable response is the same for the three drugs using $\alpha=0.05$. Give the $p$-value, and state whether or not you reject the null hypothesis. Also state whether there is a significant difference in probability of favorable response to the drugs. For your convenience, the file \texttt{bigdrug.dat} is provided, though the table above has all the information you need. 

 \end{enumerate}
  
\end{document}

   
