Session Ready
Exercise

Overall Tests I

The F test statistic represents the 'explained' variance divided by the 'error' variance. In our experiment on how much giving people money and smiling at them predicts them liking us, R tells us that the F-statistic is 8.984.

Let's see how R found this!

The F-statistic is calculated by dividing the regression mean square by the mean square error.

The regression mean square is calculated by $$\frac{SS_{total} - SS_{residual}}{k-1}$$, where \(k\) is the number of predictors plus one for the intercept.

The mean square error is calculated by $$\frac{SS_{residual}}{n-k}$$, where \(n\) is the number of observations and \(k\) is the number of predictors plus one for the intercept.

Luckily for us we already found the total sum of squares (sst) and the residual sum of squares (ssr) when we found the R squared. Let's rearrange these to find the F-statistic.

Instructions
100 XP
  • Assign the value of the regression mean square to object rms.
  • Assign the value of the mean square error to object mse.