Correlation and Linear Regression
Correlation and Linear Regression
GOOD
AFTERNOON
April 28, 2022
PRAYER
Online House
Rules
MMW
Correlation and
Linear
Regression
Objectives:
Discuss the definition and Calculate the correlation
01 uses of correlation and 03 coefficient using Pearson
linear regression. r.
−1 ≤ 𝑟 ≤1
Correlation Coefficient
- When a correlation coefficient is greater than 0, it indicates a positive relationship
while a value less than zero signifies a negative relationship.
- A value of zero indicates no relationship between the two variables bein compared
Note: The closer the value of r to +1 or negative 1 the stronger the linear
relationship. When it is near to 0, the linear relationship is weak.
Example 1: Which Is the strongest
correlation among the following?
0.01 0.10
-0.28 0.05
Example
If r is 0.78, then there is a moderate high positive correlation between the
variables.
Thus, the sign of r indicates the direction of correlation, while the absolute
value of r indicates the extent or magnitude of correlation.
Pearson Product-
Moment Correlation
Coefficient
Pearson Product-Moment Correlation Coefficient
Where:
Test of Significance of the Correlation Coefficient
Example:
n=8 at 0.05 level of significance
Table of Critical Values for Pearson’s r
Example:
Suppose a personnel manager would like to know if there is a relationship
between knowledge factors and practical factors of a training course of the 6
trainees using 0.05 level of significance. If the computed r is 0.96, is there a
signifucant relationship between knowledge factors and practical factors of a
training course of 6 trainees?
Steps Solution
Steps Solution
Example:
A teacher wants to know if the number opf hours spent in studying is
correlated with the score obtained in an examination. The followig table
shows the number of hours spent in studying and the scores obtained by the 6
students. Compute correlation coefficient and test its significance at 0.01.
A 3.0 20
B 2.7 34
C 3.8 19
D 2.6 10
E 3.2 24
F 3.4 31
Step1: Construct a Table
X Y XY
3.0 20 9.00 400
60.0
2.7 34
91.8 7.29 1156
3.8 19 361
72.2 14.44
2.6 10 26 6.76 100
3.2 24 76.8 10.24 576
3.4 31 105.4 961
11.56
Ʃ 𝑋 =18.7 Ʃ 𝑌 =138 Ʃ 𝑋𝑌 =432.2 Ʃ 𝑋 2 =59.29 Ʃ 𝑌 2 =3554
Step2: Use the Formula to
compute for the value of r
𝑟 =¿ ¿
𝑟 =0.11
Steps Solution
Example:
Suppose the correlation coefficient r between X and Y variable is
0.8 find the Coefficient determination.
•
Steps on how to calculate the correlation coefficient using Spearman
rho
• Rank the scores in X and Y separately giving rank 1 to the largest, rank 2 to the
second-largest, and so on.
• When there are ties in scores, we assign to each tied observation the mean of the
ranks, which they jointly occupy. For example, if the third and fourth largest
values or scores are the same, we assign each rank of 5 since If the fifth, sixth,
and seventh-largest values are the same, we assign the rank of 6 to each since
• Find the difference between the ranks of Xs and Ys. To check whether your
work is correct or not, find the sum of the differences. If the sum is equal to
zero, then your work is correct.
• Square each difference obtained in Step 3 and get the sum to obtain
• Substitute the obtained values in the formula. Test the significance and Interpret.
Example
The following table shows the ratings of a group of 10 Student Leaders in the University
who have been evaluated independently for leadership on a scale of 1 to 10 and 10 being the
highest by the SSG Moderators and by the students whom they supervise. Calculate the
value of Spearman rho to determine if there is a correlation between the two evaluations.
A 4 3 5.0 8.5
B 2 4 8.0 7.0
C 2 5 8.0 5.5
D 1 1 10.0 10.0
E 7 7 2.5 3.0
F 9 8 1.0 1.5
G 3 6 6.0 4.0
H 5 8 4.0 1.5
I 2 5 8.0 5.5
J 7 3 2.5 8.5
Rank of X
9 7 7 5 4 3 2 2 2 1
1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th
1.0 2.5 2.5 4.0 5.0 6.0 8.0 8.0 8.0 10.0
Solution: Construct a table
Student Leaders SSG Moderators’ Students’ Evaluation Rank of X Rank of X
Evaluation (X) (Y)
A 4 3 5.0 8.5
B 2 4 8.0 7.0
C 2 5 8.0 5.5
D 1 1 10.0 10.0
E 7 7 2.5 3.0
F 9 8 1.0 1.5
G 3 6 6.0 4.0
H 5 8 4.0 1.5
I 2 5 8.0 5.5
J 7 3 2.5 8.5
Rank of Y
8 8 7 6 5 5 4 3 3 1
1st 2 nd
3 rd
4 th
5 th
6 th
7 th
8 th
9 th
10th
1.5 1.5 3.0 4.0 5.5 5.5 7.0 8.5 8.5 10.0
Solution: Construct a table
Student SSG Students’ Rank of X Rank of X D
Leaders Moderators’ Evaluation (Y)
Evaluation
(X)
Locate the CV and Interpret
Interpretation:
Using the correlation scale, we can say that there is a moderate positive
correlation between the two evaluations made. Since the tabulated value
(0.564) is greater than the computed value (0.5606) at a 0.05 level of
significance, therefore the relationship between the two evaluations is not
significant.
Linear
Regression
Linear Regression
•
Where:
Steps Through the use of Linear Regression Equation
The following table shows the number of weeks six persons have worked at an automobile
inspection station and the number of cars each one inspected on a given day.
• Determine the regression equation that will enable us to predict Y in terms of X that is
predicting the number of cars inspected from the number of weeks employed.
• Predict and estimate the number of cars inspected by someone who has been working for
eight weeks.
(X)
2
(Y)
13
XY
26 4 𝑎=¿ ¿
7
9
1
21
23
14
14
207
14
49
81
1
𝑎=¿ ¿
5 15 75 25
𝑎=12.45
12 21 252 144
𝑌 =𝑎+𝑏𝑋 𝑌 =12.45+0.898 ( 8 )
𝑌 =12.45+0.898 𝑋 𝑌 =19.63 𝑜𝑟 20.
Generalization
Drill and Practice
• Two judges were asked to rank 7 art projects submitted by Architecture
students in a certain subject. The rankings are shown in the table below.
Measure the degree of relationship of the sets of variables.
VECTORS PHOTOS
● Linear flat UI UX landing page ● College girls studying together
● Cartoon math elements background ● Portrait smiley business woman
● Medium shot students with laptop
ICONS ● Highschool girls sitting bench
● Expressive african american woman
● Icon Pack: Maths Symbols ● Senior businessman formal clothes
● Portrait senior woman wearing red s
hirt