2.5.2 Derivaons...3.1 Least squares with two or more explanatory variables 3.4 Stas+cal sogware...

Post on 13-Mar-2021

4 views 0 download

Transcript of 2.5.2 Derivaons...3.1 Least squares with two or more explanatory variables 3.4 Stas+cal sogware...

2.5.2Deriva+onsRecall:

Recall:

0

Agevs.Money

Popula'on

Cashinpocketdollars($)

Popula+onparameters

HypothesisTest

Sample,n=9Samplesta+s+cs

β0, σ2β1,

H0:β1=0H1:β1≠0

82

22

4571

29

129

1824

x y

71

54

43452111304510

AgeinYears

PREDICTOR variable

x

RESPONSE variable

Y

b0=17.7b1=0.55s=15.5R2=0.49

Forparameterβ1:

simplelinearregression

Agevs.MoneyObjec've: Thepurposeofthisobserva+onalstudywasto

demonstrateif,andtowhatextent,ageis associatedwithmoney.

DesignandMethods: Wecollectedarandomsampleofindividualsandforeach

determinedtheirage(recordedinyears)andtheamount ofmoney(indollars)intheiraccounts.Analysisof thedatawasdoneusinglinearregression.

Results: Weobtainedarandomsampleofn=9subjects. Thereisa

sta+s+callysignificantassocia+onbetweenageandmoney(p-value=0.036). Foreveryaddi'onalyearinage,anindividual’samountofmoneyincreases onaveragebyanes'matedof$0.55(95%C.I.=[$0.05,$1.05]).

Conclusions: Wefoundthat,ashypothesized,ageisassociatedwithmoney. Inoursampleageaccountedforabouthalfofthevariability observedinmoney(R2=0.49).Wepredictthata50yearoldwill have$45.1(95%P.I.=[$5.6,$84.5]),whereasa40year oldwillhave$39.6(95%P.I.=[$0.8,$78.4]).

SmallPrint: Theanalysisrestsonthefollowingassump+ons:

- theobserva+onsareindependentlyandiden+callydistributed. - theresponsevariable,money,isnormallydistributed. - Homoscedas+cityofresidualsorequalvariance. - therela+onshipbetweenresponseandpredictorvariablesislinear.

“Ourresearch(usinglinearregression)indicatesthatolderpeopleholdandusemorecash.”

Stat306:FindingRela+onshipsinData.

Lecture7Sec+on3.1Leastsquareswithtwoormore

explanatoryvariables

Agevs.Money

Popula'on

Cashinpocketdollars($)

Popula+onparameters

HypothesisTest

Sample,n=9Samplesta+s+cs

β0, σ2β1,

H0:β1=0H1:β1≠0

82

22

4571

29

129

1824

x y

71

54

43452111304510

AgeinYears

PREDICTOR variable

x

RESPONSE variable

Y

b0=17.7b1=0.55s=15.5R2=0.49

Forparameterβ1:

simplelinearregression

Agevs.Money

Popula'on Popula+onparameters

HypothesisTest

Sample,n=9Samplesta+s+cs

β0, σ2β1,β2,

H0:β1=0H1:β1≠0

82

22

4571

29

129

1824

x1 x2 y

71

54

43

4521113045

10

AgeinYearsIncomeinthousandsof$.

PREDICTOR variables

x1

x2

RESPONSE variable

Y

b0=23.26b1=0.68b2=-0.28s=13.9R2=0.65Forparameterβ1:

mul'plelinearregression

26

37

4976

40

20

1092

[0.18,1.18]

0.016

Cashinpocketdollars($)

Chapter3

3.1Leastsquareswithtwoormoreexplanatoryvariables3.4Sta+s+calsogwareoutputformul+pleregression

-R2andadjR2and3.4.1Proper+esofR2andσ2-Sumofsquaresdecomposi+on

3.5Importantexplanatoryvariables3.6Intervales+matesandstandarderrors3.7DenominatoroftheresidualSD3.8Residualplots3.9Categoricalexplanatoryvariables3.10Par+alcorrela+on

3.1Leastsquareswithtwoormoreexplanatoryvariables

0 20 40 60 80 100

0

20

40

60

80

100

Age (years)

Mon

ey ($

)

predic'onequa'on:y=b0+b1x

3.1Leastsquareswithtwoormoreexplanatoryvariables

“hyperplaneequa'on”

3.1Leastsquareswithtwoormoreexplanatoryvariables

“hyperplaneequa'on”

3.1Leastsquareswithtwoormoreexplanatoryvariables

Onceagainwecanminimizetheleastsquareswithsimplecalculus:

3.1Leastsquareswithtwoormoreexplanatoryvariables

3.1Leastsquareswithtwoormoreexplanatoryvariables

3.1Leastsquareswithtwoormoreexplanatoryvariables

3.1Leastsquareswithtwoormoreexplanatoryvariables

3.1Leastsquareswithtwoormoreexplanatoryvariables

3.1Leastsquareswithtwoormoreexplanatoryvariables

3.1Leastsquareswithtwoormoreexplanatoryvariables

3.1Leastsquareswithtwoormoreexplanatoryvariables

3.1Leastsquareswithtwoormoreexplanatoryvariables

3.1Leastsquareswithtwoormoreexplanatoryvariables

3.1Leastsquareswithtwoormoreexplanatoryvariables

3.1Leastsquareswithtwoormoreexplanatoryvariables

designmatrixordatamatrix

Thesystemofnormalequa5ons

3.1Leastsquareswithtwoormoreexplanatoryvariables

Asbefore,YisarandomvectorandXisfixed.

3.1Leastsquareswithtwoormoreexplanatoryvariables

Asbefore,YisarandomvectorandXisfixed.

Agevs.Money

Popula'on Popula+onparameters

HypothesisTest

Sample,n=9Samplesta+s+cs

β0, σ2β1,β2,

H0:β1=0H1:β1≠0

82

22

4571

29

129

1824

x1 x2 y

71

54

43

4521113045

10

AgeinYearsIncomeinthousandsof$.

PREDICTOR variables

x1

x2

RESPONSE variable

Y

b0=23.26b1=0.68b2=-0.28s=13.9R2=0.65Forparameterβ1:

mul'plelinearregression

26

37

4976

40

20

1092

[0.18,1.18]

0.016

Cashinpocketdollars($)

3.1Leastsquareswithtwoormoreexplanatoryvariables

Chapter3

3.1Leastsquareswithtwoormoreexplanatoryvariables3.4Sta's'calsoUwareoutputformul'pleregression

-R2andadjR2and3.4.1Proper'esofR2andσ2-Sumofsquaresdecomposi'on

3.5Importantexplanatoryvariables3.6Intervales+matesandstandarderrors3.7DenominatoroftheresidualSD3.8Residualplots3.9Categoricalexplanatoryvariables3.10Par+alcorrela+on

3.4Sta+s+calsogwareoutputfor

mul+pleregression

3.4Sta+s+calsogwareoutputfor

mul+pleregression

3.4Sta+s+calsogwareoutputfor

mul+pleregression

3.4Sta+s+calsogwareoutputfor

mul+pleregression

Agevs.Money

Popula'on Popula+onparameters

HypothesisTest

Sample,n=9Samplesta+s+cs

β0, σ2β1,β2,

H0:β1=0H1:β1≠0

82

22

4571

29

129

1824

x1 x2 y

71

54

43

4521113045

10

AgeinYearsIncomeinthousandsof$.

PREDICTOR variables

x1

x2

RESPONSE variable

Y

b0=23.26b1=0.68b2=-0.28s=13.9R2=0.65Forparameterβ1:

mul'plelinearregression

26

37

4976

40

20

1092

[0.18,1.18]

0.016

Cashinpocketdollars($)

3.1Leastsquareswithtwoormoreexplanatoryvariables

“hyperplaneequa'on”

hips://commons.wikimedia.org/wiki/File:2d_mul+ple_linear_regression.gif