0% found this document useful (0 votes)
3 views

Correlation Regression

statistics

Uploaded by

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

Correlation Regression

statistics

Uploaded by

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

Correlation &

Regression
Relationships
In most practical applications, we find that there is a relationship between two (or more) variables, for
example, we find that there is a relationship between the student's degree and the number of study
hours. There are two types of variables:
Independent Variable (X) Dependent Variable(Y)
The variable that causes changes in the Is the variable that measures the
dependent variable outcome of a study
Example:

1. Number of days of absence X and student score in statistics Y,


2. Age X and high blood pressure Y.
CORRELATION

A scatter plot (or scatter diagram): used to show the relationship between two variables.

Linear relationships Curvilinear relationships


Pearson's Correlation Coefficient
Used to measure the strength and direction of the relationship between the dependent
variable (Y) and the independent variable (x).
𝑛 ∑ 𝑋𝑌 − ∑ 𝑋 ∑ 𝑌
𝑟=
√𝑛 ∑ 𝑋 2 2
−( ∑ 𝑋 ) √ 𝑛∑ 𝑌 − (∑ 𝑌 )
2 2

 1 r 1
Value of r Degree of correlation
perfect correlation
Positive strong correlation
Positive weak correlation
No correlation
Negative weak correlation
Negative strong correlation
Pearson's Correlation Coefficient
Used to measure the strength and direction of the relationship between the dependent
variable (Y) and the independent variable (x).

-1
-1 << rr << +1
+1

negative positive
strong weak weak strong

-1 - 0.5 0 0.5 +1

For example, if r = - 0.65, then there is a negative strong relation


CORRELATION
example:
Use the following table data:

2 4 7 10 15 18 22 30 X
94 70 62 55 38 31 42 12 Y

Calculate the Pearson's Correlation Coefficient between the two variables.


CORRELATION
solution:

X2 Y2
2 94 188 4 8836
4 70 280 16 4900
7 62 434 49 3844
10 55 550 100 3025
15 38 570 225 1444
18 31 558 324 961
22 42 924 484 1764
30 12 360 900 144
108 404 3864 2102 24918
CORRELATION
Calculate the Pearson's Correlation Coefficient between the two variables.
,
𝑛 ∑ 𝑋𝑌 − ∑ 𝑋 ∑ 𝑌
, 𝑟=

,
√𝑛 ∑ 𝑋 2
−( ∑ 𝑋 )
2
√ 𝑛∑ 𝑌 − (∑ 𝑌 )
2 2

( 8 ∗3864 ) − ( 108 ∗ 404 )


𝑟=
, √ ( 8 ∗2102 ) − ( 108 ) 2
√ ( 8 ∗ 24918 ) − ( 404 ) 2

−12720
𝑟=
√5152 √ 36128
¿ − 0 . 932
Then there is the Negative strong relation between two variable X and Y
CORRELATION
example:
Use the following table data:

12 14 16 23 18 14
34 45 43 39 45 31

Calculate the Pearson's Correlation Coefficient between the two variables.


CORRELATION
solution:

X2 Y2
12 34 408 144 1156
14 45 630 196 2025
16 43 688 256 1849
23 39 897 529 1521
18 45 810 324 2025
14 31 434 196 961
97 237 3867 1645 9537
CORRELATION
Calculate the Pearson's Correlation Coefficient between the two variables.
𝑛 ∑ 𝑋𝑌 − ∑ 𝑋 ∑ 𝑌
𝑟=
√𝑛 ∑ 𝑋 2 2
−( ∑ 𝑋 ) √ 𝑛∑ 𝑌 − (∑ 𝑌 )
2 2

(𝟔∗ 𝟑𝟖𝟔𝟕)−(𝟗𝟕 ∗𝟐𝟑𝟕)


𝒓=
√ (𝟔 ∗ 𝟏𝟔𝟒𝟓 ) −(𝟗𝟕)𝟐 √( 𝟔 ∗ 𝟗𝟓𝟑𝟕) −(𝟐𝟑𝟕)𝟐

𝒓 =𝟎. 𝟑𝟎𝟔
There is positive weak relation between x and y.
REGRESSION
Regression is a study of the joint distribution of two variables, one of which is an independent
variable (X) and the other takes values that depend on the value of the independent variable (Y)

Simple Linear Regression

The aim of the regression study is to find the equation


. of the relationship between the independent
x

and dependent variables, which helps explain the change in the dependent variable (Y) according to a
y

change in the values of the independent variable (X).

If the correlation is strong, the values of the two variables draw a straight line that represents the
relationship between them. The regression line is called the least squares method
Y =aX + b
𝑛 ∑ 𝑋𝑌 − ∑ 𝑋 ∑ 𝑌 ∑ 𝑌 ∑ 𝑋
𝑎= 𝑏= −𝑎
𝑛 ∑ 𝑋 − (∑ 𝑋 )
2 2
𝑛 𝑛
REGRESSION
Example 1:
Use the following table data:

2 4 7 10 15 18 22 30 X
94 70 62 55 38 31 42 12 Y

a) Find the regression equation (Y = aX + b).


b)Find the value 𝑌 if 𝑋 = 6.
REGRESSION
solution:

X2
2 94 188 4
4 70 280 16
7 62 434 49
10 55 550 100
15 38 570 225
18 31 558 324
22 42 924 484
30 12 360 900
108 404 3864 2102
REGRESSION
, , ,
a) Find the regression equation
𝑛 ∑ 𝑋𝑌 − ∑ 𝑋 ∑ 𝑌 ( 8 ∗ 3864 ) − ( 108 ∗ 404 )
𝑎=
𝑛 ∑ 𝑋 − (∑ 𝑋 )
2 2 ¿ 2 ¿ − 2. 4689
( 8 ∗2102 ) − ( 108 )
∑ ∑
( )
𝑌 𝑋 404 108
𝑏= −𝑎 ¿ − − 2 . 4689 ∗ 0
𝑛 𝑛 8 8
𝒀 =− 𝟐.𝟒𝟔𝟖𝟗 𝑿 +𝟖𝟑.𝟖𝟑
b) Find the value 𝑌 if 𝑋 = 6.

𝒀 =− 𝟐. 𝟒𝟔𝟖𝟗 ∗𝟔+𝟖𝟑¿ 69
.𝟖𝟑. 017
REGRESSION
example: 2

A sample of 10 families in the Chicago area revealed the following figures for family size and
the amount spent on food per week:

Size 3 6 5 6 6 3 4 4 5 3
Food 99 104 55 151 129 142 111 74 91 111

A. Calculate the regression equation.


B. Estimate the amount spent on Food if the family size is 10.
REGRESSION
solution:
X2
3 99 297 9
6 104 624 36
5 55 275 25
6 151 906 36
6 129 774 36
3 142 426 9
4 111 444 16
4 74 296 16
5 91 455 25
3 111 333 9
45 1067 4830 217
REGRESSION

a) Find the regression equation


𝑛 ∑ 𝑋𝑌 − ∑ 𝑋 ∑ 𝑌 (𝟏𝟎 ∗ 𝟒𝟖𝟑𝟎)−(𝟒𝟓 ∗ 𝟏𝟎𝟔𝟕)
𝑎=
𝑛 ∑ 𝑋 − (∑ 𝑋 )
2 2 ¿
( 𝟏𝟎 ∗ 𝟐𝟏𝟕 ) −(𝟒𝟓)𝟐
¿ 𝟏 . 𝟗𝟕
∑ ∑
𝑏=
𝑌
𝑛
−𝑎
𝑋
¿
𝑛
( 𝟏𝟎𝟔𝟕
𝟏𝟎 )(
− 𝟏 . 𝟗𝟕 ∗
𝟒𝟓
𝟏𝟎 )¿ 𝟗𝟕. 𝟖𝟔
𝒚 =1. 97 𝒙+97 . 86
b) Find the value 𝑌 if 𝑋 = 10.

𝒚 =( 1. 97 ∗ 10 ) + 97 . 86¿ 117 .51

You might also like