Regression & Correlation.pdf

MuhammadFaizan389 219 views 10 slides Aug 08, 2022
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

Association


Slide Content

Simple linear regression:
•The dependence of on one or more variables is called
regression
•When we study the dependence of a variable on single
independent variable, it is called simple linear regression or
two variable regression. i.e
1.The height of a child depends on the height of the parents
2.The temperature depends on the shining on the sun.
3.The production of a crop depends on the quality of seed

Simple linear regression:
X and Y values
always given in the
data set.

Simple linear regression:

Simple linear regression:
X 0 1 2 3 4
y 1.0 1.8 3.3 4.5 6.3
Number
of values
X Y Xy
1 0 1 0*1=0
2 1 1.8 1*1.8=1.8
3 2 3.3 2*3.3=6.6
4 3 4.5 3*4.5=13.5
5 4 6.3 6.3*4=25.2
Total

Simple linear regression:

Correlation coefficient
Thequantityr,calledthelinearcorrelationcoefficient,measurethe
strengthanddirectionofalinearrelationshipb/wtwovariables.LikeX
andY.
Example:
I.Marksobtainedbyastudentandhis/herstudyhours.
II.Sugarlevelandexercisetimeofanindividual.
III.Levelofuricacidandconsumptionofredmeat.

Properties of correlation coefficient
•Range of the r=[-1 to +1 ]
•r>0 it means that variable moves in same direction.
•r<0 it means that variable moves in opposite direction.
•r=0 Their is no any relation b/w two variable.
•r=+1 It means that there is perfect +verelation.
•r=-1 It means that there is perfect -verelation.
•??????
&#3627408485;&#3627408486;=??????
&#3627408486;&#3627408485;

Correlation formula:
??????=
??????(σ&#3627408459;&#3627408460;)−(σ&#3627408459;)(σ&#3627408460;)
(??????σ&#3627408459;
2
−σ&#3627408459;
2
)(??????σ&#3627408460;
2
−σ&#3627408460;
2
)

Calculate the r b/w the yield of crop and
fertilizer used.
X (fertilizer )Y (yield ) XY &#3627408537;
&#3627409360;
&#3627408538;
&#3627409360;
0 9 0*9=0 &#3627409358;
&#3627409360;
=0 &#3627409367;
&#3627409360;
=81
1 16 1*16=16 &#3627409359;
&#3627409360;
=1 &#3627409359;&#3627409364;
&#3627409360;
=?
2 25 50 &#3627409360;
&#3627409360;
=&#3627409362;&#3627409360;&#3627409363;
&#3627409360;
=?
3 38 114 &#3627409361;
&#3627409360;
=&#3627409367;&#3627409361;&#3627409366;
&#3627409360;
=?
4 50 200 &#3627409362;
&#3627409360;
=&#3627409359;&#3627409364;&#3627409362;&#3627409358;
&#3627409360;
=?
5 60 300 &#3627409363;
&#3627409360;
=&#3627409360;&#3627409363;&#3627409364;&#3627409358;
&#3627409360;
=&#3627409361;&#3627409364;&#3627409358;&#3627409358;
15 198 680 55 8506Total

Solution
•??????=
??????(σ&#3627408459;&#3627408460;)−(σ&#3627408459;)(σ&#3627408460;)
(??????σ&#3627408459;
2
−σ&#3627408459;
2
)(??????σ&#3627408460;
2
−σ&#3627408460;
2
)
•??????=
6∗680−15∗198
(6∗55−15
2
)(6∗8506−198
2
)
•??????=
1110
105∗(11832)
=
1110
1114.61
=0.99