Is there a relationship?

We can use the explained and residual sums of squares to test whether there is any relationship between the response and the explanatory variables.

Hypotheses Meaning
neither X1 nor X2 are related to Y
there is some relationship between Y and the explanatory variables

Anova table

As in simple linear models, we again form an analysis of variance table by adding extra columns to the table of sums of squares.

Degrees of freedom
The explained (regression) degrees of freedom are 2 since we are simultaneously testing whether 2 parameters are zero. The total degrees of freedom remain (n - 1) so the degrees of freedom for the residual sum of squares is (n - 3).
Mean sums of squares
Dividing each sum of squares by its degrees of freedom gives its mean sum of squares. The mean residual sum of squares is the best estimate of the error variance, σ2, irrespective of whether H0 or HA is true.

MSSexplained and MSSresidual

F ratio
This is the ratio of the mean regression and residual sums of squares.

The full anova table is shown below.

P-value

The properties of the F ratio allow it to be used as a test statistic. Its distribution is know if the null hypothesis is true (i.e. if both slope parameters are zero), but tends to be higher if one or other explanatory variable does affect the response.

The p-value for the test is the probability of getting such a large F ratio when H0 is true and is the upper tail area of the F distribution


Examples

The diagram below applies the F test to a few data sets. Observe how the F ratio is calculated and how the p-value and conclusion are obtained from the tail area of an F distribution.

Use the pop-up menu to apply the test to other data sets.

Note that there is extremely strong evidence that test marks are related to assignment marks in the Business Statistics data set, even though the relationship is not strong (R2 = 0.117). In large data sets, even weak relationships can be significant.