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"), 
    header = TRUE)
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)
  1. Plot side by side boxplots of electricity for each month.

  2. Fit a linear regression for electricity with a fixed effect for each month and a linear term for the year.
    I.e. , in ST512 shorthand.
    Or, , where indexes month and indexes year, in linear model notation.

  3. Plot the fitted values against the date.

  4. Plot the residuals against the date.