Regression.pdf

836 views 26 slides Sep 28, 2023
Slide 1
Slide 1 of 26
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
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26

About This Presentation

Biostatics


Slide Content

Faculty of Pharmacy
Regression
92

Faculty of Pharmacy
What is Regression?
•Regressionisthemeasureoftheaverage
relationshipbetweentwoormorevariables.
•RegressionAnalysismeasuresthenatureand
extentoftherelationshipbetweentwoormore
variables,thusenablesustomakepredictions.
93

Faculty of Pharmacy
Application of Regression
•Degree&Natureofrelationship
•Estimationofrelationship
•Prediction
•UsefulinEconomic&BusinessResearch
94

Faculty of Pharmacy
DIFFERENCE BETWEEN CORRELATION
& REGRESSION
•Degree&NatureofRelationship
•Correlationisameasureofdegreeofrelationship
betweenX&Y
•Regressionstudiesthenatureofrelationshipbetweenthe
variablessothatonemaybeabletopredictthevalueof
onevariableonthebasisofanother.
•Cause&EffectRelationship
•Correlationdoesnotalwaysassumecauseandeffect
relationshipbetweentwovariables.
•Regressionclearlyexpressesthecauseandeffect
relationshipbetweentwovariables.Theindependent
variableisthecauseanddependentvariableiseffect.
95

Faculty of Pharmacy
DIFFERENCE BETWEEN CORRELATION
& REGRESSION
•Prediction
•Correlationdoesn’thelpinmakingpredictions
•Regressionenableustomakepredictionsusingregression
line
•Symmetric
•Correlationcoefficientsaresymmetricali.e.rxy=ryx.
•Regressioncoefficientsarenotsymmetricali.e.bxy≠byx.
•Origin&Scale
•Correlationisindependentofthechangeoforiginand
scale
•Regressioncoefficientisindependentofchangeoforigin
butnotofscale
96

Faculty of Pharmacy
Types of Regression Analysis
•Simple&MultipleRegression
•Linear&NonLinearRegression
•Partial&TotalRegression
97

Faculty of Pharmacy
Simple Linear Regression
Simple Linear
Regression
Regression
Lines
Regression
Equations
Regression
Coefficient
98

Faculty of Pharmacy
Regression Lines
99
•Theregressionlineshowstheaveragerelationshipbetween
twovariables.ItisalsocalledLineofBestFit.
•IftwovariablesX&Yaregiven,thentherearetworegression
lines:
•RegressionLineofXonY
•RegressionLineofYonX
•NatureofRegressionLines
•Ifr=±1,thenthetworegressionlinesarecoincident.
•Ifr=0,thenthetworegressionlinesintersecteachotherat
90°.
•Thenearertheregressionlinesaretoeachother,thegreater
willbethedegreeofcorrelation.
•Ifregressionlinesrisefromlefttorightupward,then
correlationispositive.

Faculty of Pharmacy
Regression Equations
10
0
•RegressionEquationsarethealgebraicformulationofregressionlines.
•Therearetworegressionequations:
•RegressionEquationofYonX
Y = a + bX
????????????−�????????????=????????????????????????????????????(????????????−�????????????)
????????????−�????????????=????????????.
????????????
????????????
????????????
????????????
(????????????−�????????????)
•RegressionEquationofXonY
X = a + bY
????????????−�????????????=????????????????????????????????????(????????????−�????????????)
????????????−�????????????=????????????.
????????????
????????????
????????????
????????????
(????????????−�????????????)

Faculty of Pharmacy
Regression Coefficients
10
1
•Regressioncoefficientmeasurestheaverage
changeinthevalueofonevariableforaunit
changeinthevalueofanothervariable.
•Theserepresenttheslopeofregressionline
•Therearetworegressioncoefficients:
•RegressioncoefficientofYonX:byx=????????????.σ????????????/σ????????????
•RegressioncoefficientofXonY:bxy=????????????.σ????????????/σ????????????

Faculty of Pharmacy
Properties of Regression Coefficients
10
2
•Coefficientofcorrelationisthegeometricmeanofthe
regressioncoefficients.i.e.r=????????????
????????????????????????.????????????
????????????????????????
•Boththeregressioncoefficientsmusthavethesame
algebraicsign.
•Coefficientofcorrelationmusthavethesamesignasthat
oftheregressioncoefficients.
•Boththeregressioncoefficientscannotbegreaterthan
unity.
•Arithmeticmeanoftworegressioncoefficientsisequalto
orgreaterthanthecorrelationcoefficient.
•i.e.????????????????????????????????????+????????????????????????????????????/2≥r
•Regressioncoefficientisindependentofchangeoforigin
butnotofscale.

Faculty of Pharmacy
Obtaining Regression Equations
10
3
Regression
Equation
Using Normal
Equation
Using Regression
Coefficient
Using Actual
values of X
and Y
Using
deviations from
actual means
Using r, σx,
σy
Using
deviations
from
Assumed
Means

Faculty of Pharmacy
Regression Equations in Individual Series Using Normal
Equations
10
4
•ThismethodisalsocalledasLeastSquareMethod.
•Inthismethod,regressionequationscanbecalculatedby
solvingtwonormalequations:
•ForregressionequationYonX:Y=a+bX
•Σ????????????=????????????????????????+????????????Σ????????????
•Σ????????????????????????=????????????Σ????????????+????????????Σ????????????
2
•AnotherMethod:
•????????????
????????????????????????=
????????????∑????????????????????????−∑????????????∑????????????
∑????????????
2

∑????????????
2
•HereaistheY–intercept,indicatestheminimumvalueof
YforX=0
•bistheslopeoftheline,indicatestheabsoluteincreasein
YforaunitincreaseinX.

Faculty of Pharmacy
Regression Equations in Individual Series Using Normal
Equations
10
5
•ForregressionequationXonY:X=a+bY
•ΣX=????????????????????????+????????????ΣY
•Σ????????????????????????=????????????ΣY+????????????ΣY
2
•AnotherMethod:
•????????????
????????????????????????=
????????????∑????????????????????????−∑????????????∑????????????
∑????????????
2

∑????????????
2
•HereaistheX–intercept,indicatesthe
minimumvalueofXforY=0
•bistheslopeoftheline,indicatestheabsolute
increaseinXforaunitincreaseinY.

Faculty of Pharmacy
Regression Equations Using Regression Coefficients
(Using Actual Values)
10
6
•RegressionEquationofYonX
????????????−�????????????=????????????????????????????????????(????????????−�????????????)
•RegressionEquationofXonY
????????????−�????????????=????????????????????????????????????(????????????−�????????????)

Faculty of Pharmacy
Regression Equations Using Regression Coefficients
(Using Deviations Actual Values)
10
7
•RegressionEquationofYonX
????????????−�????????????=????????????????????????????????????(????????????−�????????????)
????????????
????????????????????????=
∑????????????????????????
∑????????????
2•RegressionEquationofXonY
????????????−�????????????=????????????????????????????????????????????????−�????????????
????????????
????????????????????????=
∑????????????????????????
∑????????????
2

Faculty of Pharmacy
Regression Equations Using Regression Coefficients
(Using Deviations from Assumed Mean)
10
8
•RegressionEquationofYonX
????????????−�????????????=????????????????????????????????????(????????????−�????????????)
????????????
????????????????????????=
????????????∑????????????????????????????????????????????????−∑????????????????????????∑????????????????????????
????????????∑????????????????????????
2

∑????????????????????????
2
•RegressionEquationofXonY
????????????−�????????????=????????????????????????????????????????????????−�????????????
????????????
????????????????????????=
????????????∑????????????????????????????????????????????????−∑????????????????????????∑????????????????????????
????????????∑????????????????????????
2

∑????????????????????????
2

Faculty of Pharmacy
Regression Equations Using Regression Coefficients
(Using Standard Deviations)
10
9
•RegressionEquationofYonX
????????????−�????????????=????????????????????????????????????(????????????−�????????????)
????????????
????????????????????????=????????????.
????????????
????????????
????????????
????????????
•RegressionEquationofXonY
????????????−�????????????=????????????????????????????????????????????????−�????????????
????????????
????????????????????????=????????????.
????????????
????????????
????????????
????????????

Faculty of Pharmacy
Examples
11
0
•Example1:Fromfollowingdatacalculatethe
linesofregression.
•EstimatevalueofYwhenX=25
•EstimatevalueofXwhenY=50
X 16 20 15 20 18 25
Y 50 60 35 50 50 60

Faculty of Pharmacy
Examples
11
1
X Y dx= X-A dy= Y-B X*X Y*Y X*Y
16 50 256 2500 800
20 60 400 3600 1200
15 35 225 1225 525
20 50 400 2500 1000
18 50 324 2500 900
25 60 625 3600 1500
ƩX= 114ƩY= 305 ƩX
2
=2230ƩY
2
=15925ƩXY=5925
Regression line Y on X:
????????????−�????????????=????????????
????????????????????????????????????−�????????????
????????????
????????????????????????=
????????????∑????????????????????????−∑????????????∑????????????
????????????∑????????????
2

∑????????????2
B
yx=
6∗5925−114∗305
6∗2230−114∗114
=0.792

Faculty of Pharmacy
Examples
11
2
X Y dx= X-A dy= Y-B X*X Y*Y X*Y
16 50 256 2500 800
20 60 400 3600 1200
15 35 225 1225 525
20 50 400 2500 1000
18 50 324 2500 900
25 60 625 3600 1500
ƩX= 114ƩY= 305 ƩX
2
=2230ƩY
2
=15925ƩXY=5925
Regression line Y on X:
????????????−�????????????=????????????
????????????????????????????????????−�????????????
????????????−50.8=0.792????????????−19
Y-50.8=0.792X -15.048 --------------------------(1)
B
yx=0.792
Y –50.8= 0.792*25-15.048 Y= 55.55

Faculty of Pharmacy
Examples
11
3
X Y dx= X-A dy= Y-B X*X Y*Y X*Y
16 50 256 2500 800
20 60 400 3600 1200
15 35 225 1225 525
20 50 400 2500 1000
18 50 324 2500 900
25 60 625 3600 1500
ƩX= 114ƩY= 305 ƩX
2
=2230ƩY
2
=15925ƩXY=5925
Regression line X on Y:
????????????−�????????????=????????????
????????????????????????????????????−�????????????
????????????
????????????????????????=
????????????∑????????????????????????−∑????????????∑????????????
????????????∑????????????
2

∑????????????2
B
yx=
6∗5925−114∗305
6∗15925−305∗305
=0.308

Faculty of Pharmacy
Examples
11
4
X Y dx= X-A dy= Y-
B
X*X=dx2 Y*Y=dy2X*Y=dxdy
16 50 1 15 256 2500 800
20 60 5 25 400 3600 1200
15 35 0 0 225 1225 525
20 50 5 15 400 2500 1000
18 50 3 15 324 2500 900
25 60 10 25 625 3600 1500
ƩX= 114ƩY= 305Ʃdx= Ʃdy= ƩX
2
=2230= ƩY
2
=15925
=
ƩXY=5925=
Regression line X on Y:
????????????−�????????????=????????????
????????????????????????????????????−�????????????
X-19 = 0.308 (Y- 50.8)
X-19 =0.308Y –15.64 --------------------------(2)
B
xy=0.308
X-19 = 0.308*50- 15.64 X= 18.76

Faculty of Pharmacy
Examples
11
5
•Example2:fromfollowingdatacalculatethe
linesofregression.
•Correlationcoefficientvalueis0.8=r
•EstimatevalueofYwhenX=60
•EstimatevalueofXwhenY=80
MeanS.D
X 50 5
Y 20 4

Faculty of Pharmacy
Examples
11
6
•Wehave
•�????????????=50
•�????????????=20
•σX=5
•σY=4
•????????????
????????????????????????=????????????
????????????????????????
????????????
????????????
=0.8∗
4
5
=0.64
•????????????
????????????????????????=????????????
????????????
????????????
????????????????????????
=0.8∗
5 4
=1

Faculty of Pharmacy
Examples
11
7
•Wehave
•�????????????=50
•�????????????=20
•σX=5
•σY=4
•????????????
????????????????????????=????????????
????????????????????????
????????????
????????????
=0.8∗
4
5
=0.64
•????????????
????????????????????????=????????????
????????????
????????????
????????????????????????
=0.8∗
5 4
=1
Tags