Stat 552

# Homework 3

## Part One

Hardcopy handed in (may be handwritten or typeset)

1. Using the matrix set up for simple linear regression, find the variance of the slope and intercept estimates and the correlation between them.

2. Consider the balanced one-way anova model, for $J$ treatment groups, with $K$ replications in each group:

where Treatj is an indicator variable for the j’th treatment group. That is

Without loss of generality, you can assume the data are ordered by treatment group, i.e. the first K observations are from treatment group 1, the next K from treatment group 2, etc.

a. Write out the form of the design matrix, $X$.

b. Verify that the $\beta_j$ represent the treatment group means.

c. Show that the estimates of the treatment group means all have the same variance and are uncorrelated.

3. Consider data generated according to the following model:

where $X_{n \times p}$ and $Z_{n \times q}$ are fixed covariate matrices, $\beta$ and $\gamma$ unknown parameter vectors and $\text{E}(\epsilon) = 0$ and $\text{Var}(\epsilon) = \sigma^2 I$.

Now imagine you are fitting a regression model to the data but have failed to recognise $Z$ as covariates. That is, you fit the model:

a. Find the expected value of your estimates.

b. When is $\hat{\beta}$ unbiased?

## Part Two

Hand in a .Rmd file on canvas, and as a hardcopy of the compiled .Rmd file.

1. Faraway Problem 2.7

2. Continued from HW#2 Part II #1. Using dataset teengamb and the model from the previous homework.

a. Find the estimate of $\sigma$. Intepret this estimate in a sentence in context of the data.

b. Find the estimated variance-covariance matrix of the coefficient estimates using matrix algebra.