\documentclass[12pt]{article} %\usepackage{amsbsy} % for \boldsymbol and \pmb %\usepackage{graphicx} % To include pdf files! \usepackage{amsmath} \usepackage{amsbsy} \usepackage{amsfonts} %\usepackage[colorlinks=true, pdfstartview=FitV, linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref} % For links \usepackage{fullpage} % Good for US Letter paper \topmargin=-0.75in \textheight=9.5in \usepackage{fancyhdr} \renewcommand{\headrulewidth}{0pt} % Otherwise there's a rule under the header \setlength{\headheight}{15.2pt} \fancyhf{} \pagestyle{fancy} \cfoot{Page \thepage {} of 2} %\pagestyle{empty} % No page numbers \begin{document} \enlargethispage*{1000 pt} \begin{flushright} Name \underline{\hspace{60mm}} \\ $\,$ \\ Student Number \underline{\hspace{60mm}} \end{flushright} \vspace{5mm} \begin{center} {\Large \textbf{STA 441s 2024 Quiz 5}}\\ \vspace{3 mm} \end{center} \noindent Hens (female chickens) are randomly assigned to one of three different feed types: $A$, $B$ or $C$. The response variable is the mean weight of the eggs they lay, based on 100 eggs from each chicken. Hen's age is a covariate. Assume that the relationship between age and expected egg weight can be approximated by a straight line over the range of the data. % I changed this to eliminate random assignment. This could be a good question some day. \begin{enumerate} \item \label{eqslopes} % Zero if there are product terms. \begin{enumerate} \item (1 point) Write a regression equation that assumes the lines relating age and expected egg weight have the \emph{same slope} for each feed type. You need not say how your dummy variables are defined. You will do that in the next part. \vspace{5mm} $E(Y|\mathbf{x}) = $ \vspace{5mm} \item (2 points) Make a table with three rows, one for each feed type. Make columns showing how your dummy variables are defined. Add another, wider column showing expected egg weight for each feed type. The \emph{symbols} for the dummy variables for feed type will not appear in this last column. \vspace{60mm} \item (1 point) Controlling for hen's age, is egg weight related to the type of feed? Give the null hypothesis, using symbols from your regression equation. \vspace{20mm} \item (1 point) Controlling for hen's age, is expected egg weight different for feed types $A$ and $B$? Give the null hypothesis, using symbols from your regression equation. \end{enumerate} % End equal slopes part \pagebreak ~ \vspace{20mm} % herehere \item \begin{enumerate} \item (1 point) Now write a regression equation in which the lines relating age and expected egg weight might have \emph{different slopes} for each feed type. \vspace{5mm} $E(Y|\mathbf{x}) = $ \vspace{25mm} \item (2 points) Make a table with three rows, one for each feed type. Make columns showing how your dummy variables are defined. Add another, wider column showing expected egg weight for each feed type. The \emph{symbols} for the dummy variables for feed type will not appear in this last column. \vspace{80mm} % \item (1 point) Are the three slopes the same? Give the null hypothesis, using symbols from your regression equation. \vspace{20mm} \item (1 point) Does the effect of feed type depend on the chicken's age? Give the null hypothesis, using symbols from your regression equation. \vspace{20mm} \item (1 point) Does expected egg weight change with age at the same rate for feed types $A$ and $B$? \end{enumerate} % End unequal slopes part \end{enumerate} % End of all questions \end{document}