SlidesRLec7

0 05 00 05 theoretical quantiles 10 fitting a line

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: q q q 50 100 150 gas 5 200 250 300 −1.0 −0.5 0.0 0.5 Theoretical Quantiles 1.0 Fitting a Line by Least Squares Fitting a straight line model to yi = α + β xi + where i y = weight with i and x = gas, i.e., ∼ i .i .d . N (0, σ 2 ) i captures measurement error or the extent to which a line i th data point. does not t the data at the α and β are found by the method of least squares, minimizing n n 2 ((yi − y ) + (¯ − β x − α) − β (xi − x ))2 ¯ y ¯ ¯ (yi − α − β xi ) = i =1 i =1 SXY SXX n n i =1 6 n (xi − x )2 −2β ¯ (yi −y )2 +n(¯−β x −α)2 +β 2 ¯ y ¯ = i =1 (xi − x )(yi − y ) ¯ ¯ i =1 Fitting a Line by Least Squares (continued) n (yi − y )2 + n(¯ − β x − α)2 ¯ y ¯ = i =1 +SXX β 2 − 2β SXY + SXX SXY SXX 2 n (yi − y )2 + n(¯ − β x − α)2 + β − ¯ y ¯ = SXY SXX − SXX i =1 SXY SXX 2 − 2 SXY 2 SXX clearly minimized by zeroing the two middle terms ˆ β=β= with tted values SXY SXX and α = α = y − βx ˆ ¯ ˆ¯ yi = α + β xi = y + β (xi − x ) ˆ ˆˆ ¯ˆ ¯ and ¯ y = y. ˆ¯ n from the above minimization (yi −yi )2 = SYY − ˆ ⇒ RSS = i =1 7 SXY 2 SXX Sum of Squares Decomposition n SYY n 2 (yi − yi + yi − y )2 ˆˆ¯ (yi − y ) = ¯ = i =1 n i =1 n (yi − yi )2 + ˆ = i =1 n (ˆi − y )2 + 2 y ¯ i =1 (yi − yi )(ˆi − y ) ˆy ¯ i =1 = RSS + SSreg SSreg sum of squares of tted values due to regression n n (yi − y − β (xi − x ))(xi − x )β ¯ˆ ¯ ¯ˆ (yi − yi )(ˆi − y ) = ˆy ¯ since i =1 i =1 ˆ ˆ = β SXY − β 2 SXX = 0...
View Full Document

This note was uploaded on 02/25/2014 for the course STAT 302 taught by Professor Fritz during the Winter '13 term at University of Washington.

Ask a homework question - tutors are online