Problem Sheet 4 -- ANOVA and Linear Regression

ANOVA

Consider the inbuilt R dataset chickwts (you can access this in R using the data command data(chickwts)) which is comprised of experimental data on chicken weight for various types of feed.

F distributions

Devise a method that would allow you to determine F_{2,30} by direct sampling from normal distributions and implement it.

Linear regression

The lecture states that in linear regression the regression line always goes through the means of the independent/dependent variable. To explore this,

  • generate a dataset of 100 datapoints given by sampling two variables X and Z from a normal distribution with mean 100 and standard deviation 10 and calculating adding the sample points to obtain Y. What intercept and slope do you expect from linear regression? Calculate a line of best fit and check if it goes through the means of X and Y.
  • Prove the above statement analytically.