Lecture 7 - Correlation and Regression Batch 11
Lecture 7 - Correlation and Regression Batch 11
Learning Outcome
At the end of this lecture, students should be able to:
3
Correlation & Regression
measures the direction and
strength of the linear
Correlation relationship between two
quantitative variables
4
Linear Regression
Explanation Prediction
Regression
8 15
Series1
6 Series1
4
10
2
5
0
0 2 4 6 8 10 12 14 0
Old Method 0 5 10 15 20 25
If the dots have linear regions and curved regions as shown in Graph
C, we say there is a curvilinear relationship between the two variables
If the dots are scattered randomly as shown in Graph D, we say there
is no relationship between the two variables
r= n(Σxy) – (Σx)(Σy)
√ n (Σx2) – (Σx)2 √n(Σy2) – (Σy)2
where x = value for one of the variables
y = value for the other variable
n = number of pairs of scores
(If a curved line is needed to express the relationship, other and
more complicated, measures of correlation must be used)
This is also known as Pearson’s Coefficient of Linear Correlation
and it is used to compare normally distributed data sets.
12
10
New method
8
Series1
6
0
0 2 4 6 8 10 12 14
Old Method
25
20
15 Series1
10
0
0 5 10 15 20 25
20
15
Series1
10
0
0 5 10 15 20 25
b) Then we try to fit a straight line to the data in such a way that it
best represents the linear relationship between the two
variables. Such as fitted line is called an estimated regression line.
regression line - garis regresi
Y
*
**
*
errors
**
X
BIOMEDICAL SCIENCE, FACULTY OF MEDICINE
Formula for the The Least Squares Regression Line
c = 1 (Σ y – m. Σx)
n
YOU DON’T HAVE TO MEMORISE THIS FORMULA! JUST NOTE THAT IT EXISTS!
• We can also draw the least squares regression line just knowing
the values of m and c in the regression equation.
• If the line is y=3x+2 and we have a point (2,9), the predicted value
is 3×2+2=8.