Calculating the Least Squares Regression Line Lecture 49
- Slides: 16
Calculating the Least Squares Regression Line Lecture 49 Secs. 13. 3. 2 Wed, Apr 20, 2005
The Least Squares Regression Line The equation of the regression line is y^ = a + bx. n Thus, we need to find the coefficients a and b. n The formulas are n
Example n Consider again the data x 2 3 5 6 9 y 3 5 9 12 16
Method 1 n Compute the means and deviations for x and y. x 2 3 5 6 9 y 3 5 9 12 16 x -3 -2 0 1 4 y -6 -4 0 3 7 x = 5 y = 9
Method 1 n Compute the squared deviations, etc. x 2 3 5 6 9 y 3 5 9 12 16 x – x y – y -3 -2 0 1 4 -6 -4 0 3 7 (x – x)2 (y – y)2 9 4 0 1 16 36 16 0 9 49 (x – x)(y – y) 18 8 0 3 28
Method 1 n Find the sums of the last three columns. x 2 3 5 6 9 y 3 5 9 12 16 x – x y – y -3 -2 0 1 4 -6 -4 0 3 7 (x – x)2 (y – y)2 (x – x)(y – y) 9 4 0 1 16 36 16 0 9 49 18 8 0 3 28 30 110 57
Method 1 n Compute b: n Then compute a:
Method 2 n Consider again the data x 2 3 5 6 9 y 3 5 9 12 16
Method 2 n Compute x 2, y 2, and xy for each row. x 2 3 5 6 9 y 3 5 9 12 16 x 2 y 2 xy 4 9 6 9 25 15 25 81 45 36 144 72 81 256 144
Method 2 n Then find the sums of x, y, x 2, y 2, and xy. x 2 3 5 6 9 25 y x 2 y 2 xy 3 4 9 6 5 9 25 15 9 25 81 45 12 36 144 72 16 81 256 144 45 155 515 282 x = 25 y = 45 x 2 = 155 y 2 = 515 xy = 282
Method 2 n Compute b: n Then compute a:
Example The second method is usually easier. n By either method, we get the equation y^ = -0. 5 + 1. 9 x. n
TI-83 – Regression Line On the TI-83, we could use 2 -Var Stats to get the basic summations. Then use the formulas for a and b. n For our example, 2 -Var Stats reports that n n=5 n x = 25 n x 2 = 155 n y = 45 n y 2 = 515 n xy = 282 n
TI-83 – Regression Line n Or we can use the Lin. Reg function. Put the x values in L 1 and the y values in L 2. n Select STAT > CALC > Lin. Reg(a+bx). n Press Enter. Lin. Reg(a+bx) appears in the display. n Enter L 1, L 2. n Press Enter. n
TI-83 – Regression Line n The following appear in the display. The title Lin. Reg. n The equation y = a + bx. n The value of a. n The value of b. n The value of r 2 (to be discussed later). n The value of r (to be discussed later). n
Let’s Do It! n Let’s Do It! 13. 3, p. 754 – Oil Change Data. n Use the TI-83!
- Least squares regression line definition
- How to find least squares regression line on statcrunch
- Least squared regression line
- Www.whfreeman/tps5e
- Least squares regression line definition
- Least squares regression line minitab
- Least squares problem
- Polynomial regression least squares
- Bivariate least squares regression
- Least squares regression
- Ordinary least squares
- Properties of least squares estimator proof
- How many squares
- My age
- Least square solution
- Lms cis
- Recursive least squares derivation