Stat 565

# Prerequisite Self Test

##### Winter 2016

The prerequisites for this class are 511 & 512 and 521 & 522. This is not an exhaustive list of what you need to know, but rather a diagnostic tool for you to decide if ST565 is right for you.

## Math Stat

1. $Y$ is a random variable with $E(Y) = 0$ and $Var(Y) = \sigma^2$. Let $X = \alpha Y + \beta$. What are $E(X)$, $Var(X)$, and $Cov(X, Y)$?

2. What does it mean for an estimate to be unbiased?
What does it mean for an estimate to be asymptotically unbiased?
What does it mean for an estimate to be consistent?

You should be familiar with the “Properties” sections of Expectation and Covariance.

## Regression

1. Write down the model for the response in a multiple regression, given p explanatory variables.

2. What are the assumptions of linear regression?

## R

All the computing we do in this class will be in R (and all the textbooks also use R). I encourage you to try out RStudio if you don’t already use it. If you need to get R installed (or updated) look at my instructions from ST552.

Use the following code to read in the chocolate, beer and electricity dataset from C&M Section 1.4.3.

cbe <- read.table(url("http://staff.elena.aut.ac.nz/Paul-Cowpertwait/ts/cbe.dat"),
cbe$date <- seq.Date(as.Date("1958-01-01"), as.Date("1990-12-01"), by = "month") cbe$year <- as.POSIXlt(cbe$date)$year
cbe$month <- factor(months(cbe$date), levels = month.name)

I.e. $\mu \{ \text{ electricity } | \text{ MONTH}, \text{ year} \} = MONTH + year$, in ST512 shorthand.
Or, $\text{electricity}_{ij} = \alpha_i + \beta \times year_{ij} + \epsilon_{ij}$, where $i=1, \ldots, 12$ indexes month and $j = 1, \ldots, 33$ indexes year, in linear model notation.