[Solution] Data on blood pressure levels of patients are classified by age (young/old), and by gender (male/female). The following regression model is to be
Question: Data on blood pressure levels of patients are classified by age (young/old), and by gender (male/female). The following regression model is to be fitted to the data:
\[y=\beta_{0}+\beta_{1} x_{1}+\beta_{2} x_{2}+\beta_{3} x_{1} x_{2}\]where \(x_{1}=-1\) if the patient is young and \(+1\) if the patient is old. Similarly, \(x_{2}=-1\) if the patient is male and \(+1\) if the patient is female.
-
Suppose there are four patients, one in each group: young male, young female, old male, and old female. Denote their observed blood pressure by \(y_{1}, y_{2}, y_{3}, y_{4}\) respectively, write down the \(X\) matrix for these data.
Hint: the \(x_{1} x_{2}\) column will be the multiplication of the \(x_{1}\) and \(x_{2}\) columns. - Calculate \(X^{\prime} X\). What makes this matrix easy to invert? Find \(\left(X^{\prime} X\right)^{-1} .\)
- What's the least square estimate of \(\beta_{0}, \beta_{1}, \beta_{2}, \beta_{3}\).
- Now suppose we use a different coding, where \(x_{1}=0\) if the patient is young and 1 if the patient is old. Similarly, \(x_{2}=0\) if the patient is male and \(+1\) if the patient is female. Write out the \(\left(X^{\prime} X\right)\). Is the new \(\left(X^{\prime} X\right)\) easy to inverse like the previous coding?
Price: $2.99
Solution: The downloadable solution consists of 3 pages
Deliverable: Word Document 