10.07.2015 Views

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Linear regression 277the simulation. The center and rightplots are histograms of andThe total variation in the y values about the mean isAlgebraically, this can be shown to be the sum of two easily interpreted terms:(10.6)The first term is the residual sum of squares, or RSS. The second is the total variation <strong>for</strong>the fitted model about the mean and is called the regression sum of squares, SSReg.Equation 10.6 becomesSST=RSS+SSReg.For each term, a number—called the degrees of freedom—is assigned that depends on thesample size and the number of estimated values in the term. For the SST there are n datapoints and one estimated value, leaving n−1 degrees of freedom. For RSS there areagain n data points but two estimated values, and so n−2 degrees of freedom. Thisleaves 1 degree of freedom <strong>for</strong> the SSReg, as the degrees of freedom are additive in thiscase. When a sum of squares is divided by its degrees of freedom it is referred to as amean sum of squares.We rewrite the <strong>for</strong>m of the prediction line:If is close to 0, and are similar in size, so we would have SST ≈ RSS. In this caseSSReg would be small. Whereas, if is not close to 0, then SSReg is not small. So,SSReg would be a reasonable test statistic <strong>for</strong> the hypothesisH 0 : β 1 =0. What do small and big mean? As usual, we need to scale the value by theappropriate factor. The F statistic is the ratio of the mean regression sum of squaresdivided by the mean residual sum of squares.(10.7)Under the null hypothesis H 0 : β 1 =0, the sampling distribution of F is known to be the F-distribution with 1 and n−2 degrees of freedom.This allows us to make the following significance test.F-test <strong>for</strong> β 1 =0A significance test <strong>for</strong> the hypothesesH 0 : β 1 =0, H A : β 1 ≠0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!