0% found this document useful (0 votes)
8 views22 pages

Linear Regression and Correlation

The document discusses linear regression and correlation, focusing on the relationship between quantitative variables and how to forecast a dependent variable from an independent variable. It explains the linear regression model, the least squares method for estimating coefficients, and the interpretation of results, including examples with student grades. Additionally, it introduces the linear correlation coefficient to assess the strength of relationships between variables.

Uploaded by

kenneagaray
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views22 pages

Linear Regression and Correlation

The document discusses linear regression and correlation, focusing on the relationship between quantitative variables and how to forecast a dependent variable from an independent variable. It explains the linear regression model, the least squares method for estimating coefficients, and the interpretation of results, including examples with student grades. Additionally, it introduces the linear correlation coefficient to assess the strength of relationships between variables.

Uploaded by

kenneagaray
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Linear Regression and Correlation

GE 112
Mathematics in the Modern World

Faculty, Math & Stat Department


College of Arts & Sciences
University of Southeastern Philippines

1
Linear Regression
Introduction:

▪ We will examine the relationship between


quantitative variables x and y via a
mathematical equation.
▪ The motivation for using the technique:
- Forecast the value of a dependent variable (y)
from the value of one independent variable (x).
- Analyze the specific relationships between the
independent variable and the dependent
variable.
Linear Regression and
Correlation Page 2
Linear Regression

The Model:
The model has a deterministic and a probabilistic
components.
House
Cost

Most lots sell


for $25,000

House size

Linear Regression and


Correlation Page 3
Linear Regression
The Model:
However, house cost vary even among same
size houses! Since cost behave unpredictably,
we add a random component.

Most lots sell


for $25,000

House size

Linear Regression and


Correlation Page 4
Linear Regression

The Model:
The first order linear model

y = 0 + 1x + 
0 and 1 are unknown population
parameters, therefore are estimated
𝑦 = dependent variable y from the data.

𝑥 = independent variable
0 = 𝑦-intercept
1 = slope of the line Rise  = Rise/Run
 = error variable 0 Run
x
Linear Regression and
Correlation Page 5
Linear Regression
Estimating the Coefficients:

The estimates are determined by


- drawing a sample from the population of interest
- calculating sample statistics
- producing a straight line that cuts into the data

Question: What should be


y  considered a good line?



    
    

Linear Regression and


Correlation Page 6
Linear Regression

The Least Squares (Regression) Line

A good line is one that minimizes


the sum of squared differences between the
points and the line.

Linear Regression and


Correlation Page 7
Linear Regression

Formula:

To calculate the estimates of the slope and intercept


of the least squares line , use the formulas:
SS xy
b1 =
SS xx
b0 = y − b1 x

where SS xy =  xi yi −
(  x )(  y )
i i

n
(  x)
2

SS xx =  x − = (n − 1) sx2
2 i
i
n
Linear Regression and
Correlation Page 8
Linear Regression
The regression equation that estimates the equation of the
first order linear model is:

ŷ = b0 + b1 x
Note:

1. b0 is the intercept of the equation. It is not


interpreted if the possible values of the
independent variable x does not contain 0.
2. b1 is the slope of the equation. If b1 is positive
(negative), then the estimate value in y increases
(decreases) with an amount equal to b1 in every
one unit increase in x

Linear Regression and


Correlation Page 9
Linear Regression
Example.

The grades of a class of 9 students on a midterm report (x)


and on the final examination (y) are as follows:
x 77 50 71 72 81 94 96 99 67
y 82 66 78 34 47 85 99 99 68

a) Estimate the linear regression line.

b) Estimate the final examination grade of a student who


received a grade of 85 on the midterm report.

c) Interpret b1.

Linear Regression and


Correlation Page 10
Linear Regression
Solution.

a) The estimated linear regression line is

𝑦ො = 12.06 + 0.78𝑥

b) The estimate final examination grade of a


student who received a grade of 85 on the
midterm report is

𝑦ො = 12.06 + 0.78 85 = 78.36

Linear Regression and


Correlation Page 11
Linear Regression

c) For every 1 point increase in midterm


report (x), the final examination (y) will
increase by about 0.78 points.

Linear Regression and


Correlation Page 12
Correlation

Linear Correlation Coefficient (r)

It determines the strength of a linear


relationship between two variables x and y
and is computed using the formula

Linear Regression and


Correlation Page 13
Correlation
Note:

1. If r is positive, the relationship between the variables has a positive


correlation. In this case, if one variable increases, the other
variable also tends to increase.

2. If r is negative, the linear relationship between the variables has a


negative correlation. In this case, if one variable increases, the
other variable tends to decrease.

3. The closer |r| is to 1, the stronger the linear relationship between the
variables.

4. If r is close to zero it does not mean always that there is low or no


relationship between variables. r measures only the linear
relationship so it is always best to obtain a scatter plot also of your
data to maximize the information it can give.

Linear Regression and


Correlation Page 14
Correlation

Types of linear correlation

Linear Regression and


Correlation Page 15
Correlation

Types of linear correlation

Linear Regression and


Correlation Page 16
Correlation
Example.

The grades of a class of 9 students on a midterm


report (x) and on the final examination (y) are as
follows:
x 77 50 71 72 81 94 96 99 67
y 82 66 78 34 47 85 99 99 68

a) Obtain a scatter plot of the data.

b) Compute r and assess the relationship between


midterm report and final examination.

Linear Regression and


Correlation Page 17
Correlation
Solution.

a) Scatter plot between midterm report and final examination

Linear Regression and


Correlation Page 18
Correlation

b) The value of r = 0.56. It indicates that there


is a positive (and moderately strong)
relationship between midterm report and final
examination. Also it indicates that if midterm
report increases then final examination will
tend to increase also.

Linear Regression and


Correlation Page 19
Using Calculator for Computations

Note: The video uses A for intercept (while we


use b0) and B for the slope of the regression
equation (we use b1). The illustration in this
video will only be applicable to the model of
the calculator (or similar models) used by the
author and might not work in your calculator.
So check it out!

Linear Regression and


Correlation Page 20
Using Calculator for Computations

Linear Regression and


Correlation Page 21
References

Aufmann, R., Lockwood, J., Nation, R. and


Clegg, D. (2013). Mathematical Excursions
(3rd Edition). Brooks/Coole: Cengage
Learning

Walpole, R., Myers, R., Myers, S. and Ye, K. (2007).


Probability and Statistics for Engineers and
Scientists (8th Edition). Upper Saddle River,
N.I.: Pearson Prentice Hall
Linear Regression and
Correlation Page 22

You might also like