Equations of Least Squares

Download Report

Transcript Equations of Least Squares

Slide 1

Least Squares Equation /
Coefficient of Correlation
Section 1.3
Prepared by E. Gretchen Gascon

1

Least Squares Equation /
Correlation Coefficient
Real data does not very often fall on a straight line when graphed, but
we can estimate what the linear equation might be, and then decide
how well we did on our estimate.

The estimate of the linear equation is called the Least Squares Equation
The number that tells us if the estimate is good or not is called the
Correlation Coefficient
Remember these two terms!

2

Equation of a line:
The standard equation of a line is given
by the formula y = m x + b, where (x,y)
represents any point on the line. m
represents the slope and b the y-value of
the y-intercept (0,b)
 This is called the slope-intercept form of
a linear equation.


3

Equations to use in finding
Least Squares Equation
m 

n  xy    x    y 
n x   x 
2

b  y  m x w here y 



2

y

n

,x 

x
n

Important to have in your notes!

4

How to find the Least Squares
Equation (algebraic method)
Start with the ordered
pair of data points.

Next: find ∑x, ∑y, ∑x², ∑y², ∑xy

There
are 10
data
points,
n=10

m 

 x y 
n x   x 

n  xy 

2

(1 0 * 1 3 2 9 )  (5 5 * 2 0 5)

m 
Substitute
(1 0 * 3 8 5)  (5 5 ^ 2 )
into the first
13290  11275
equation and
m 
solve for m
3850  3025
m 

2015
825

b  y  mx

2

Substitute the
expression
for b into the
second
equation

b

 y m x
n

b

205

n
 2.4424 *

10

55
10

b  20.5  2.4424 * 5.5

m  2 .4 4 2 4 2 4 2 4 2 4

b  20.5  13.4333

m  2 .4 4 2 4

b  7.0666

Next
Slide
5

How to find the Least Squares
Equation (algebraic method) p2
m 

n  xy    x    y 
n x   x 
2

m 
m 
m 

2

(10 *1329)  (55 * 205)
(10 * 385)  (55 ^ 2)
13290  11275
3850  3025

Next: find b.
b  y  mx
b



y

m

n
b

205

x
n

 2.4424 *

10

55
10

2015

b  20.5  2.4424 * 5.5

825

b  20.5  13.4333

m  2.4424242424

b  7.0666

m  2.4424

Write the equation of
Least Squares using
m as the slope, and
b as the y-intercept

y = 2.442 x + 7.067

6

How to find the Least Squares
Equation (Graphing in Excel)
How to graph the xy scatter plot, can be seen in the previous
presentation “linear equations.” There is also a PDF (Excel
graphing) tutorial in the support material .

Graphing the ordered pair of point and finding the trend line,
yields the same equation.
7

Formula for Correlation Coefficient

r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

2

2

2

Important to have in your notes!

8

Correlation Coefficient (algebraic method)
Substitute the
appropriate values
into the correlation
coefficient equation
r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

r 

2

2

10(1 329 )  (55)( 205)
10(385)  55  10( 4735)  205
2

If r is close to +1 or -1
then the Equation of
Least Squares (trend line)
is a good fit for the data.
If it is close to 0 , it is not.

r 
r 
r 

2

2

13290  11275
3850  3025  47350  42025
2015
825  5325
2015
4536900



2015

 .946

2130

The equation found in the
previous slide is a good fit.
9

Correlation Coefficient (Excel method)
EITHER:
When you graphed the
data and created the
trend line , check the box

OR
Use the CORREL
Excel function

Next: Take the square root of r² to find value for r.
10

Comments
Was there anything about this
PowerPoint presentation that you would
like explained further? PLEASE CALL
 Post comments or questions to the Main
Forum or your Individual Forum.
 For more examples be sure to review the
Practice Exercises posted in the course
materials Forum of our class.


11


Slide 2

Least Squares Equation /
Coefficient of Correlation
Section 1.3
Prepared by E. Gretchen Gascon

1

Least Squares Equation /
Correlation Coefficient
Real data does not very often fall on a straight line when graphed, but
we can estimate what the linear equation might be, and then decide
how well we did on our estimate.

The estimate of the linear equation is called the Least Squares Equation
The number that tells us if the estimate is good or not is called the
Correlation Coefficient
Remember these two terms!

2

Equation of a line:
The standard equation of a line is given
by the formula y = m x + b, where (x,y)
represents any point on the line. m
represents the slope and b the y-value of
the y-intercept (0,b)
 This is called the slope-intercept form of
a linear equation.


3

Equations to use in finding
Least Squares Equation
m 

n  xy    x    y 
n x   x 
2

b  y  m x w here y 



2

y

n

,x 

x
n

Important to have in your notes!

4

How to find the Least Squares
Equation (algebraic method)
Start with the ordered
pair of data points.

Next: find ∑x, ∑y, ∑x², ∑y², ∑xy

There
are 10
data
points,
n=10

m 

 x y 
n x   x 

n  xy 

2

(1 0 * 1 3 2 9 )  (5 5 * 2 0 5)

m 
Substitute
(1 0 * 3 8 5)  (5 5 ^ 2 )
into the first
13290  11275
equation and
m 
solve for m
3850  3025
m 

2015
825

b  y  mx

2

Substitute the
expression
for b into the
second
equation

b

 y m x
n

b

205

n
 2.4424 *

10

55
10

b  20.5  2.4424 * 5.5

m  2 .4 4 2 4 2 4 2 4 2 4

b  20.5  13.4333

m  2 .4 4 2 4

b  7.0666

Next
Slide
5

How to find the Least Squares
Equation (algebraic method) p2
m 

n  xy    x    y 
n x   x 
2

m 
m 
m 

2

(10 *1329)  (55 * 205)
(10 * 385)  (55 ^ 2)
13290  11275
3850  3025

Next: find b.
b  y  mx
b



y

m

n
b

205

x
n

 2.4424 *

10

55
10

2015

b  20.5  2.4424 * 5.5

825

b  20.5  13.4333

m  2.4424242424

b  7.0666

m  2.4424

Write the equation of
Least Squares using
m as the slope, and
b as the y-intercept

y = 2.442 x + 7.067

6

How to find the Least Squares
Equation (Graphing in Excel)
How to graph the xy scatter plot, can be seen in the previous
presentation “linear equations.” There is also a PDF (Excel
graphing) tutorial in the support material .

Graphing the ordered pair of point and finding the trend line,
yields the same equation.
7

Formula for Correlation Coefficient

r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

2

2

2

Important to have in your notes!

8

Correlation Coefficient (algebraic method)
Substitute the
appropriate values
into the correlation
coefficient equation
r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

r 

2

2

10(1 329 )  (55)( 205)
10(385)  55  10( 4735)  205
2

If r is close to +1 or -1
then the Equation of
Least Squares (trend line)
is a good fit for the data.
If it is close to 0 , it is not.

r 
r 
r 

2

2

13290  11275
3850  3025  47350  42025
2015
825  5325
2015
4536900



2015

 .946

2130

The equation found in the
previous slide is a good fit.
9

Correlation Coefficient (Excel method)
EITHER:
When you graphed the
data and created the
trend line , check the box

OR
Use the CORREL
Excel function

Next: Take the square root of r² to find value for r.
10

Comments
Was there anything about this
PowerPoint presentation that you would
like explained further? PLEASE CALL
 Post comments or questions to the Main
Forum or your Individual Forum.
 For more examples be sure to review the
Practice Exercises posted in the course
materials Forum of our class.


11


Slide 3

Least Squares Equation /
Coefficient of Correlation
Section 1.3
Prepared by E. Gretchen Gascon

1

Least Squares Equation /
Correlation Coefficient
Real data does not very often fall on a straight line when graphed, but
we can estimate what the linear equation might be, and then decide
how well we did on our estimate.

The estimate of the linear equation is called the Least Squares Equation
The number that tells us if the estimate is good or not is called the
Correlation Coefficient
Remember these two terms!

2

Equation of a line:
The standard equation of a line is given
by the formula y = m x + b, where (x,y)
represents any point on the line. m
represents the slope and b the y-value of
the y-intercept (0,b)
 This is called the slope-intercept form of
a linear equation.


3

Equations to use in finding
Least Squares Equation
m 

n  xy    x    y 
n x   x 
2

b  y  m x w here y 



2

y

n

,x 

x
n

Important to have in your notes!

4

How to find the Least Squares
Equation (algebraic method)
Start with the ordered
pair of data points.

Next: find ∑x, ∑y, ∑x², ∑y², ∑xy

There
are 10
data
points,
n=10

m 

 x y 
n x   x 

n  xy 

2

(1 0 * 1 3 2 9 )  (5 5 * 2 0 5)

m 
Substitute
(1 0 * 3 8 5)  (5 5 ^ 2 )
into the first
13290  11275
equation and
m 
solve for m
3850  3025
m 

2015
825

b  y  mx

2

Substitute the
expression
for b into the
second
equation

b

 y m x
n

b

205

n
 2.4424 *

10

55
10

b  20.5  2.4424 * 5.5

m  2 .4 4 2 4 2 4 2 4 2 4

b  20.5  13.4333

m  2 .4 4 2 4

b  7.0666

Next
Slide
5

How to find the Least Squares
Equation (algebraic method) p2
m 

n  xy    x    y 
n x   x 
2

m 
m 
m 

2

(10 *1329)  (55 * 205)
(10 * 385)  (55 ^ 2)
13290  11275
3850  3025

Next: find b.
b  y  mx
b



y

m

n
b

205

x
n

 2.4424 *

10

55
10

2015

b  20.5  2.4424 * 5.5

825

b  20.5  13.4333

m  2.4424242424

b  7.0666

m  2.4424

Write the equation of
Least Squares using
m as the slope, and
b as the y-intercept

y = 2.442 x + 7.067

6

How to find the Least Squares
Equation (Graphing in Excel)
How to graph the xy scatter plot, can be seen in the previous
presentation “linear equations.” There is also a PDF (Excel
graphing) tutorial in the support material .

Graphing the ordered pair of point and finding the trend line,
yields the same equation.
7

Formula for Correlation Coefficient

r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

2

2

2

Important to have in your notes!

8

Correlation Coefficient (algebraic method)
Substitute the
appropriate values
into the correlation
coefficient equation
r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

r 

2

2

10(1 329 )  (55)( 205)
10(385)  55  10( 4735)  205
2

If r is close to +1 or -1
then the Equation of
Least Squares (trend line)
is a good fit for the data.
If it is close to 0 , it is not.

r 
r 
r 

2

2

13290  11275
3850  3025  47350  42025
2015
825  5325
2015
4536900



2015

 .946

2130

The equation found in the
previous slide is a good fit.
9

Correlation Coefficient (Excel method)
EITHER:
When you graphed the
data and created the
trend line , check the box

OR
Use the CORREL
Excel function

Next: Take the square root of r² to find value for r.
10

Comments
Was there anything about this
PowerPoint presentation that you would
like explained further? PLEASE CALL
 Post comments or questions to the Main
Forum or your Individual Forum.
 For more examples be sure to review the
Practice Exercises posted in the course
materials Forum of our class.


11


Slide 4

Least Squares Equation /
Coefficient of Correlation
Section 1.3
Prepared by E. Gretchen Gascon

1

Least Squares Equation /
Correlation Coefficient
Real data does not very often fall on a straight line when graphed, but
we can estimate what the linear equation might be, and then decide
how well we did on our estimate.

The estimate of the linear equation is called the Least Squares Equation
The number that tells us if the estimate is good or not is called the
Correlation Coefficient
Remember these two terms!

2

Equation of a line:
The standard equation of a line is given
by the formula y = m x + b, where (x,y)
represents any point on the line. m
represents the slope and b the y-value of
the y-intercept (0,b)
 This is called the slope-intercept form of
a linear equation.


3

Equations to use in finding
Least Squares Equation
m 

n  xy    x    y 
n x   x 
2

b  y  m x w here y 



2

y

n

,x 

x
n

Important to have in your notes!

4

How to find the Least Squares
Equation (algebraic method)
Start with the ordered
pair of data points.

Next: find ∑x, ∑y, ∑x², ∑y², ∑xy

There
are 10
data
points,
n=10

m 

 x y 
n x   x 

n  xy 

2

(1 0 * 1 3 2 9 )  (5 5 * 2 0 5)

m 
Substitute
(1 0 * 3 8 5)  (5 5 ^ 2 )
into the first
13290  11275
equation and
m 
solve for m
3850  3025
m 

2015
825

b  y  mx

2

Substitute the
expression
for b into the
second
equation

b

 y m x
n

b

205

n
 2.4424 *

10

55
10

b  20.5  2.4424 * 5.5

m  2 .4 4 2 4 2 4 2 4 2 4

b  20.5  13.4333

m  2 .4 4 2 4

b  7.0666

Next
Slide
5

How to find the Least Squares
Equation (algebraic method) p2
m 

n  xy    x    y 
n x   x 
2

m 
m 
m 

2

(10 *1329)  (55 * 205)
(10 * 385)  (55 ^ 2)
13290  11275
3850  3025

Next: find b.
b  y  mx
b



y

m

n
b

205

x
n

 2.4424 *

10

55
10

2015

b  20.5  2.4424 * 5.5

825

b  20.5  13.4333

m  2.4424242424

b  7.0666

m  2.4424

Write the equation of
Least Squares using
m as the slope, and
b as the y-intercept

y = 2.442 x + 7.067

6

How to find the Least Squares
Equation (Graphing in Excel)
How to graph the xy scatter plot, can be seen in the previous
presentation “linear equations.” There is also a PDF (Excel
graphing) tutorial in the support material .

Graphing the ordered pair of point and finding the trend line,
yields the same equation.
7

Formula for Correlation Coefficient

r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

2

2

2

Important to have in your notes!

8

Correlation Coefficient (algebraic method)
Substitute the
appropriate values
into the correlation
coefficient equation
r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

r 

2

2

10(1 329 )  (55)( 205)
10(385)  55  10( 4735)  205
2

If r is close to +1 or -1
then the Equation of
Least Squares (trend line)
is a good fit for the data.
If it is close to 0 , it is not.

r 
r 
r 

2

2

13290  11275
3850  3025  47350  42025
2015
825  5325
2015
4536900



2015

 .946

2130

The equation found in the
previous slide is a good fit.
9

Correlation Coefficient (Excel method)
EITHER:
When you graphed the
data and created the
trend line , check the box

OR
Use the CORREL
Excel function

Next: Take the square root of r² to find value for r.
10

Comments
Was there anything about this
PowerPoint presentation that you would
like explained further? PLEASE CALL
 Post comments or questions to the Main
Forum or your Individual Forum.
 For more examples be sure to review the
Practice Exercises posted in the course
materials Forum of our class.


11


Slide 5

Least Squares Equation /
Coefficient of Correlation
Section 1.3
Prepared by E. Gretchen Gascon

1

Least Squares Equation /
Correlation Coefficient
Real data does not very often fall on a straight line when graphed, but
we can estimate what the linear equation might be, and then decide
how well we did on our estimate.

The estimate of the linear equation is called the Least Squares Equation
The number that tells us if the estimate is good or not is called the
Correlation Coefficient
Remember these two terms!

2

Equation of a line:
The standard equation of a line is given
by the formula y = m x + b, where (x,y)
represents any point on the line. m
represents the slope and b the y-value of
the y-intercept (0,b)
 This is called the slope-intercept form of
a linear equation.


3

Equations to use in finding
Least Squares Equation
m 

n  xy    x    y 
n x   x 
2

b  y  m x w here y 



2

y

n

,x 

x
n

Important to have in your notes!

4

How to find the Least Squares
Equation (algebraic method)
Start with the ordered
pair of data points.

Next: find ∑x, ∑y, ∑x², ∑y², ∑xy

There
are 10
data
points,
n=10

m 

 x y 
n x   x 

n  xy 

2

(1 0 * 1 3 2 9 )  (5 5 * 2 0 5)

m 
Substitute
(1 0 * 3 8 5)  (5 5 ^ 2 )
into the first
13290  11275
equation and
m 
solve for m
3850  3025
m 

2015
825

b  y  mx

2

Substitute the
expression
for b into the
second
equation

b

 y m x
n

b

205

n
 2.4424 *

10

55
10

b  20.5  2.4424 * 5.5

m  2 .4 4 2 4 2 4 2 4 2 4

b  20.5  13.4333

m  2 .4 4 2 4

b  7.0666

Next
Slide
5

How to find the Least Squares
Equation (algebraic method) p2
m 

n  xy    x    y 
n x   x 
2

m 
m 
m 

2

(10 *1329)  (55 * 205)
(10 * 385)  (55 ^ 2)
13290  11275
3850  3025

Next: find b.
b  y  mx
b



y

m

n
b

205

x
n

 2.4424 *

10

55
10

2015

b  20.5  2.4424 * 5.5

825

b  20.5  13.4333

m  2.4424242424

b  7.0666

m  2.4424

Write the equation of
Least Squares using
m as the slope, and
b as the y-intercept

y = 2.442 x + 7.067

6

How to find the Least Squares
Equation (Graphing in Excel)
How to graph the xy scatter plot, can be seen in the previous
presentation “linear equations.” There is also a PDF (Excel
graphing) tutorial in the support material .

Graphing the ordered pair of point and finding the trend line,
yields the same equation.
7

Formula for Correlation Coefficient

r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

2

2

2

Important to have in your notes!

8

Correlation Coefficient (algebraic method)
Substitute the
appropriate values
into the correlation
coefficient equation
r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

r 

2

2

10(1 329 )  (55)( 205)
10(385)  55  10( 4735)  205
2

If r is close to +1 or -1
then the Equation of
Least Squares (trend line)
is a good fit for the data.
If it is close to 0 , it is not.

r 
r 
r 

2

2

13290  11275
3850  3025  47350  42025
2015
825  5325
2015
4536900



2015

 .946

2130

The equation found in the
previous slide is a good fit.
9

Correlation Coefficient (Excel method)
EITHER:
When you graphed the
data and created the
trend line , check the box

OR
Use the CORREL
Excel function

Next: Take the square root of r² to find value for r.
10

Comments
Was there anything about this
PowerPoint presentation that you would
like explained further? PLEASE CALL
 Post comments or questions to the Main
Forum or your Individual Forum.
 For more examples be sure to review the
Practice Exercises posted in the course
materials Forum of our class.


11


Slide 6

Least Squares Equation /
Coefficient of Correlation
Section 1.3
Prepared by E. Gretchen Gascon

1

Least Squares Equation /
Correlation Coefficient
Real data does not very often fall on a straight line when graphed, but
we can estimate what the linear equation might be, and then decide
how well we did on our estimate.

The estimate of the linear equation is called the Least Squares Equation
The number that tells us if the estimate is good or not is called the
Correlation Coefficient
Remember these two terms!

2

Equation of a line:
The standard equation of a line is given
by the formula y = m x + b, where (x,y)
represents any point on the line. m
represents the slope and b the y-value of
the y-intercept (0,b)
 This is called the slope-intercept form of
a linear equation.


3

Equations to use in finding
Least Squares Equation
m 

n  xy    x    y 
n x   x 
2

b  y  m x w here y 



2

y

n

,x 

x
n

Important to have in your notes!

4

How to find the Least Squares
Equation (algebraic method)
Start with the ordered
pair of data points.

Next: find ∑x, ∑y, ∑x², ∑y², ∑xy

There
are 10
data
points,
n=10

m 

 x y 
n x   x 

n  xy 

2

(1 0 * 1 3 2 9 )  (5 5 * 2 0 5)

m 
Substitute
(1 0 * 3 8 5)  (5 5 ^ 2 )
into the first
13290  11275
equation and
m 
solve for m
3850  3025
m 

2015
825

b  y  mx

2

Substitute the
expression
for b into the
second
equation

b

 y m x
n

b

205

n
 2.4424 *

10

55
10

b  20.5  2.4424 * 5.5

m  2 .4 4 2 4 2 4 2 4 2 4

b  20.5  13.4333

m  2 .4 4 2 4

b  7.0666

Next
Slide
5

How to find the Least Squares
Equation (algebraic method) p2
m 

n  xy    x    y 
n x   x 
2

m 
m 
m 

2

(10 *1329)  (55 * 205)
(10 * 385)  (55 ^ 2)
13290  11275
3850  3025

Next: find b.
b  y  mx
b



y

m

n
b

205

x
n

 2.4424 *

10

55
10

2015

b  20.5  2.4424 * 5.5

825

b  20.5  13.4333

m  2.4424242424

b  7.0666

m  2.4424

Write the equation of
Least Squares using
m as the slope, and
b as the y-intercept

y = 2.442 x + 7.067

6

How to find the Least Squares
Equation (Graphing in Excel)
How to graph the xy scatter plot, can be seen in the previous
presentation “linear equations.” There is also a PDF (Excel
graphing) tutorial in the support material .

Graphing the ordered pair of point and finding the trend line,
yields the same equation.
7

Formula for Correlation Coefficient

r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

2

2

2

Important to have in your notes!

8

Correlation Coefficient (algebraic method)
Substitute the
appropriate values
into the correlation
coefficient equation
r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

r 

2

2

10(1 329 )  (55)( 205)
10(385)  55  10( 4735)  205
2

If r is close to +1 or -1
then the Equation of
Least Squares (trend line)
is a good fit for the data.
If it is close to 0 , it is not.

r 
r 
r 

2

2

13290  11275
3850  3025  47350  42025
2015
825  5325
2015
4536900



2015

 .946

2130

The equation found in the
previous slide is a good fit.
9

Correlation Coefficient (Excel method)
EITHER:
When you graphed the
data and created the
trend line , check the box

OR
Use the CORREL
Excel function

Next: Take the square root of r² to find value for r.
10

Comments
Was there anything about this
PowerPoint presentation that you would
like explained further? PLEASE CALL
 Post comments or questions to the Main
Forum or your Individual Forum.
 For more examples be sure to review the
Practice Exercises posted in the course
materials Forum of our class.


11


Slide 7

Least Squares Equation /
Coefficient of Correlation
Section 1.3
Prepared by E. Gretchen Gascon

1

Least Squares Equation /
Correlation Coefficient
Real data does not very often fall on a straight line when graphed, but
we can estimate what the linear equation might be, and then decide
how well we did on our estimate.

The estimate of the linear equation is called the Least Squares Equation
The number that tells us if the estimate is good or not is called the
Correlation Coefficient
Remember these two terms!

2

Equation of a line:
The standard equation of a line is given
by the formula y = m x + b, where (x,y)
represents any point on the line. m
represents the slope and b the y-value of
the y-intercept (0,b)
 This is called the slope-intercept form of
a linear equation.


3

Equations to use in finding
Least Squares Equation
m 

n  xy    x    y 
n x   x 
2

b  y  m x w here y 



2

y

n

,x 

x
n

Important to have in your notes!

4

How to find the Least Squares
Equation (algebraic method)
Start with the ordered
pair of data points.

Next: find ∑x, ∑y, ∑x², ∑y², ∑xy

There
are 10
data
points,
n=10

m 

 x y 
n x   x 

n  xy 

2

(1 0 * 1 3 2 9 )  (5 5 * 2 0 5)

m 
Substitute
(1 0 * 3 8 5)  (5 5 ^ 2 )
into the first
13290  11275
equation and
m 
solve for m
3850  3025
m 

2015
825

b  y  mx

2

Substitute the
expression
for b into the
second
equation

b

 y m x
n

b

205

n
 2.4424 *

10

55
10

b  20.5  2.4424 * 5.5

m  2 .4 4 2 4 2 4 2 4 2 4

b  20.5  13.4333

m  2 .4 4 2 4

b  7.0666

Next
Slide
5

How to find the Least Squares
Equation (algebraic method) p2
m 

n  xy    x    y 
n x   x 
2

m 
m 
m 

2

(10 *1329)  (55 * 205)
(10 * 385)  (55 ^ 2)
13290  11275
3850  3025

Next: find b.
b  y  mx
b



y

m

n
b

205

x
n

 2.4424 *

10

55
10

2015

b  20.5  2.4424 * 5.5

825

b  20.5  13.4333

m  2.4424242424

b  7.0666

m  2.4424

Write the equation of
Least Squares using
m as the slope, and
b as the y-intercept

y = 2.442 x + 7.067

6

How to find the Least Squares
Equation (Graphing in Excel)
How to graph the xy scatter plot, can be seen in the previous
presentation “linear equations.” There is also a PDF (Excel
graphing) tutorial in the support material .

Graphing the ordered pair of point and finding the trend line,
yields the same equation.
7

Formula for Correlation Coefficient

r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

2

2

2

Important to have in your notes!

8

Correlation Coefficient (algebraic method)
Substitute the
appropriate values
into the correlation
coefficient equation
r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

r 

2

2

10(1 329 )  (55)( 205)
10(385)  55  10( 4735)  205
2

If r is close to +1 or -1
then the Equation of
Least Squares (trend line)
is a good fit for the data.
If it is close to 0 , it is not.

r 
r 
r 

2

2

13290  11275
3850  3025  47350  42025
2015
825  5325
2015
4536900



2015

 .946

2130

The equation found in the
previous slide is a good fit.
9

Correlation Coefficient (Excel method)
EITHER:
When you graphed the
data and created the
trend line , check the box

OR
Use the CORREL
Excel function

Next: Take the square root of r² to find value for r.
10

Comments
Was there anything about this
PowerPoint presentation that you would
like explained further? PLEASE CALL
 Post comments or questions to the Main
Forum or your Individual Forum.
 For more examples be sure to review the
Practice Exercises posted in the course
materials Forum of our class.


11


Slide 8

Least Squares Equation /
Coefficient of Correlation
Section 1.3
Prepared by E. Gretchen Gascon

1

Least Squares Equation /
Correlation Coefficient
Real data does not very often fall on a straight line when graphed, but
we can estimate what the linear equation might be, and then decide
how well we did on our estimate.

The estimate of the linear equation is called the Least Squares Equation
The number that tells us if the estimate is good or not is called the
Correlation Coefficient
Remember these two terms!

2

Equation of a line:
The standard equation of a line is given
by the formula y = m x + b, where (x,y)
represents any point on the line. m
represents the slope and b the y-value of
the y-intercept (0,b)
 This is called the slope-intercept form of
a linear equation.


3

Equations to use in finding
Least Squares Equation
m 

n  xy    x    y 
n x   x 
2

b  y  m x w here y 



2

y

n

,x 

x
n

Important to have in your notes!

4

How to find the Least Squares
Equation (algebraic method)
Start with the ordered
pair of data points.

Next: find ∑x, ∑y, ∑x², ∑y², ∑xy

There
are 10
data
points,
n=10

m 

 x y 
n x   x 

n  xy 

2

(1 0 * 1 3 2 9 )  (5 5 * 2 0 5)

m 
Substitute
(1 0 * 3 8 5)  (5 5 ^ 2 )
into the first
13290  11275
equation and
m 
solve for m
3850  3025
m 

2015
825

b  y  mx

2

Substitute the
expression
for b into the
second
equation

b

 y m x
n

b

205

n
 2.4424 *

10

55
10

b  20.5  2.4424 * 5.5

m  2 .4 4 2 4 2 4 2 4 2 4

b  20.5  13.4333

m  2 .4 4 2 4

b  7.0666

Next
Slide
5

How to find the Least Squares
Equation (algebraic method) p2
m 

n  xy    x    y 
n x   x 
2

m 
m 
m 

2

(10 *1329)  (55 * 205)
(10 * 385)  (55 ^ 2)
13290  11275
3850  3025

Next: find b.
b  y  mx
b



y

m

n
b

205

x
n

 2.4424 *

10

55
10

2015

b  20.5  2.4424 * 5.5

825

b  20.5  13.4333

m  2.4424242424

b  7.0666

m  2.4424

Write the equation of
Least Squares using
m as the slope, and
b as the y-intercept

y = 2.442 x + 7.067

6

How to find the Least Squares
Equation (Graphing in Excel)
How to graph the xy scatter plot, can be seen in the previous
presentation “linear equations.” There is also a PDF (Excel
graphing) tutorial in the support material .

Graphing the ordered pair of point and finding the trend line,
yields the same equation.
7

Formula for Correlation Coefficient

r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

2

2

2

Important to have in your notes!

8

Correlation Coefficient (algebraic method)
Substitute the
appropriate values
into the correlation
coefficient equation
r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

r 

2

2

10(1 329 )  (55)( 205)
10(385)  55  10( 4735)  205
2

If r is close to +1 or -1
then the Equation of
Least Squares (trend line)
is a good fit for the data.
If it is close to 0 , it is not.

r 
r 
r 

2

2

13290  11275
3850  3025  47350  42025
2015
825  5325
2015
4536900



2015

 .946

2130

The equation found in the
previous slide is a good fit.
9

Correlation Coefficient (Excel method)
EITHER:
When you graphed the
data and created the
trend line , check the box

OR
Use the CORREL
Excel function

Next: Take the square root of r² to find value for r.
10

Comments
Was there anything about this
PowerPoint presentation that you would
like explained further? PLEASE CALL
 Post comments or questions to the Main
Forum or your Individual Forum.
 For more examples be sure to review the
Practice Exercises posted in the course
materials Forum of our class.


11


Slide 9

Least Squares Equation /
Coefficient of Correlation
Section 1.3
Prepared by E. Gretchen Gascon

1

Least Squares Equation /
Correlation Coefficient
Real data does not very often fall on a straight line when graphed, but
we can estimate what the linear equation might be, and then decide
how well we did on our estimate.

The estimate of the linear equation is called the Least Squares Equation
The number that tells us if the estimate is good or not is called the
Correlation Coefficient
Remember these two terms!

2

Equation of a line:
The standard equation of a line is given
by the formula y = m x + b, where (x,y)
represents any point on the line. m
represents the slope and b the y-value of
the y-intercept (0,b)
 This is called the slope-intercept form of
a linear equation.


3

Equations to use in finding
Least Squares Equation
m 

n  xy    x    y 
n x   x 
2

b  y  m x w here y 



2

y

n

,x 

x
n

Important to have in your notes!

4

How to find the Least Squares
Equation (algebraic method)
Start with the ordered
pair of data points.

Next: find ∑x, ∑y, ∑x², ∑y², ∑xy

There
are 10
data
points,
n=10

m 

 x y 
n x   x 

n  xy 

2

(1 0 * 1 3 2 9 )  (5 5 * 2 0 5)

m 
Substitute
(1 0 * 3 8 5)  (5 5 ^ 2 )
into the first
13290  11275
equation and
m 
solve for m
3850  3025
m 

2015
825

b  y  mx

2

Substitute the
expression
for b into the
second
equation

b

 y m x
n

b

205

n
 2.4424 *

10

55
10

b  20.5  2.4424 * 5.5

m  2 .4 4 2 4 2 4 2 4 2 4

b  20.5  13.4333

m  2 .4 4 2 4

b  7.0666

Next
Slide
5

How to find the Least Squares
Equation (algebraic method) p2
m 

n  xy    x    y 
n x   x 
2

m 
m 
m 

2

(10 *1329)  (55 * 205)
(10 * 385)  (55 ^ 2)
13290  11275
3850  3025

Next: find b.
b  y  mx
b



y

m

n
b

205

x
n

 2.4424 *

10

55
10

2015

b  20.5  2.4424 * 5.5

825

b  20.5  13.4333

m  2.4424242424

b  7.0666

m  2.4424

Write the equation of
Least Squares using
m as the slope, and
b as the y-intercept

y = 2.442 x + 7.067

6

How to find the Least Squares
Equation (Graphing in Excel)
How to graph the xy scatter plot, can be seen in the previous
presentation “linear equations.” There is also a PDF (Excel
graphing) tutorial in the support material .

Graphing the ordered pair of point and finding the trend line,
yields the same equation.
7

Formula for Correlation Coefficient

r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

2

2

2

Important to have in your notes!

8

Correlation Coefficient (algebraic method)
Substitute the
appropriate values
into the correlation
coefficient equation
r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

r 

2

2

10(1 329 )  (55)( 205)
10(385)  55  10( 4735)  205
2

If r is close to +1 or -1
then the Equation of
Least Squares (trend line)
is a good fit for the data.
If it is close to 0 , it is not.

r 
r 
r 

2

2

13290  11275
3850  3025  47350  42025
2015
825  5325
2015
4536900



2015

 .946

2130

The equation found in the
previous slide is a good fit.
9

Correlation Coefficient (Excel method)
EITHER:
When you graphed the
data and created the
trend line , check the box

OR
Use the CORREL
Excel function

Next: Take the square root of r² to find value for r.
10

Comments
Was there anything about this
PowerPoint presentation that you would
like explained further? PLEASE CALL
 Post comments or questions to the Main
Forum or your Individual Forum.
 For more examples be sure to review the
Practice Exercises posted in the course
materials Forum of our class.


11


Slide 10

Least Squares Equation /
Coefficient of Correlation
Section 1.3
Prepared by E. Gretchen Gascon

1

Least Squares Equation /
Correlation Coefficient
Real data does not very often fall on a straight line when graphed, but
we can estimate what the linear equation might be, and then decide
how well we did on our estimate.

The estimate of the linear equation is called the Least Squares Equation
The number that tells us if the estimate is good or not is called the
Correlation Coefficient
Remember these two terms!

2

Equation of a line:
The standard equation of a line is given
by the formula y = m x + b, where (x,y)
represents any point on the line. m
represents the slope and b the y-value of
the y-intercept (0,b)
 This is called the slope-intercept form of
a linear equation.


3

Equations to use in finding
Least Squares Equation
m 

n  xy    x    y 
n x   x 
2

b  y  m x w here y 



2

y

n

,x 

x
n

Important to have in your notes!

4

How to find the Least Squares
Equation (algebraic method)
Start with the ordered
pair of data points.

Next: find ∑x, ∑y, ∑x², ∑y², ∑xy

There
are 10
data
points,
n=10

m 

 x y 
n x   x 

n  xy 

2

(1 0 * 1 3 2 9 )  (5 5 * 2 0 5)

m 
Substitute
(1 0 * 3 8 5)  (5 5 ^ 2 )
into the first
13290  11275
equation and
m 
solve for m
3850  3025
m 

2015
825

b  y  mx

2

Substitute the
expression
for b into the
second
equation

b

 y m x
n

b

205

n
 2.4424 *

10

55
10

b  20.5  2.4424 * 5.5

m  2 .4 4 2 4 2 4 2 4 2 4

b  20.5  13.4333

m  2 .4 4 2 4

b  7.0666

Next
Slide
5

How to find the Least Squares
Equation (algebraic method) p2
m 

n  xy    x    y 
n x   x 
2

m 
m 
m 

2

(10 *1329)  (55 * 205)
(10 * 385)  (55 ^ 2)
13290  11275
3850  3025

Next: find b.
b  y  mx
b



y

m

n
b

205

x
n

 2.4424 *

10

55
10

2015

b  20.5  2.4424 * 5.5

825

b  20.5  13.4333

m  2.4424242424

b  7.0666

m  2.4424

Write the equation of
Least Squares using
m as the slope, and
b as the y-intercept

y = 2.442 x + 7.067

6

How to find the Least Squares
Equation (Graphing in Excel)
How to graph the xy scatter plot, can be seen in the previous
presentation “linear equations.” There is also a PDF (Excel
graphing) tutorial in the support material .

Graphing the ordered pair of point and finding the trend line,
yields the same equation.
7

Formula for Correlation Coefficient

r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

2

2

2

Important to have in your notes!

8

Correlation Coefficient (algebraic method)
Substitute the
appropriate values
into the correlation
coefficient equation
r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

r 

2

2

10(1 329 )  (55)( 205)
10(385)  55  10( 4735)  205
2

If r is close to +1 or -1
then the Equation of
Least Squares (trend line)
is a good fit for the data.
If it is close to 0 , it is not.

r 
r 
r 

2

2

13290  11275
3850  3025  47350  42025
2015
825  5325
2015
4536900



2015

 .946

2130

The equation found in the
previous slide is a good fit.
9

Correlation Coefficient (Excel method)
EITHER:
When you graphed the
data and created the
trend line , check the box

OR
Use the CORREL
Excel function

Next: Take the square root of r² to find value for r.
10

Comments
Was there anything about this
PowerPoint presentation that you would
like explained further? PLEASE CALL
 Post comments or questions to the Main
Forum or your Individual Forum.
 For more examples be sure to review the
Practice Exercises posted in the course
materials Forum of our class.


11


Slide 11

Least Squares Equation /
Coefficient of Correlation
Section 1.3
Prepared by E. Gretchen Gascon

1

Least Squares Equation /
Correlation Coefficient
Real data does not very often fall on a straight line when graphed, but
we can estimate what the linear equation might be, and then decide
how well we did on our estimate.

The estimate of the linear equation is called the Least Squares Equation
The number that tells us if the estimate is good or not is called the
Correlation Coefficient
Remember these two terms!

2

Equation of a line:
The standard equation of a line is given
by the formula y = m x + b, where (x,y)
represents any point on the line. m
represents the slope and b the y-value of
the y-intercept (0,b)
 This is called the slope-intercept form of
a linear equation.


3

Equations to use in finding
Least Squares Equation
m 

n  xy    x    y 
n x   x 
2

b  y  m x w here y 



2

y

n

,x 

x
n

Important to have in your notes!

4

How to find the Least Squares
Equation (algebraic method)
Start with the ordered
pair of data points.

Next: find ∑x, ∑y, ∑x², ∑y², ∑xy

There
are 10
data
points,
n=10

m 

 x y 
n x   x 

n  xy 

2

(1 0 * 1 3 2 9 )  (5 5 * 2 0 5)

m 
Substitute
(1 0 * 3 8 5)  (5 5 ^ 2 )
into the first
13290  11275
equation and
m 
solve for m
3850  3025
m 

2015
825

b  y  mx

2

Substitute the
expression
for b into the
second
equation

b

 y m x
n

b

205

n
 2.4424 *

10

55
10

b  20.5  2.4424 * 5.5

m  2 .4 4 2 4 2 4 2 4 2 4

b  20.5  13.4333

m  2 .4 4 2 4

b  7.0666

Next
Slide
5

How to find the Least Squares
Equation (algebraic method) p2
m 

n  xy    x    y 
n x   x 
2

m 
m 
m 

2

(10 *1329)  (55 * 205)
(10 * 385)  (55 ^ 2)
13290  11275
3850  3025

Next: find b.
b  y  mx
b



y

m

n
b

205

x
n

 2.4424 *

10

55
10

2015

b  20.5  2.4424 * 5.5

825

b  20.5  13.4333

m  2.4424242424

b  7.0666

m  2.4424

Write the equation of
Least Squares using
m as the slope, and
b as the y-intercept

y = 2.442 x + 7.067

6

How to find the Least Squares
Equation (Graphing in Excel)
How to graph the xy scatter plot, can be seen in the previous
presentation “linear equations.” There is also a PDF (Excel
graphing) tutorial in the support material .

Graphing the ordered pair of point and finding the trend line,
yields the same equation.
7

Formula for Correlation Coefficient

r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

2

2

2

Important to have in your notes!

8

Correlation Coefficient (algebraic method)
Substitute the
appropriate values
into the correlation
coefficient equation
r 

n (  xy )  (  x )(  y )
n( x )  ( x)  n( y )  ( y )
2

r 

2

2

10(1 329 )  (55)( 205)
10(385)  55  10( 4735)  205
2

If r is close to +1 or -1
then the Equation of
Least Squares (trend line)
is a good fit for the data.
If it is close to 0 , it is not.

r 
r 
r 

2

2

13290  11275
3850  3025  47350  42025
2015
825  5325
2015
4536900



2015

 .946

2130

The equation found in the
previous slide is a good fit.
9

Correlation Coefficient (Excel method)
EITHER:
When you graphed the
data and created the
trend line , check the box

OR
Use the CORREL
Excel function

Next: Take the square root of r² to find value for r.
10

Comments
Was there anything about this
PowerPoint presentation that you would
like explained further? PLEASE CALL
 Post comments or questions to the Main
Forum or your Individual Forum.
 For more examples be sure to review the
Practice Exercises posted in the course
materials Forum of our class.


11