The first line y^=5+3x
x3579y8183032y^14202632The sum of the squared deviations between observed and predicted y values is
(8−14)2+(18−20)2+(30−26)2+(32−32)2=56
The second line y^=−2+4x
x3579y8183032y^10182634The sum of the squared deviations between observed and predicted y values is
(8−10)2+(18−18)2+(30−26)2+(32−34)2=24Since 56>24, then according to the least-squares criterion, the second line y^=−2+4x is a better fit to the data than the first line y^=5+3x.
Comments