• date post

13-Mar-2021
• Category

## Documents

• view

0

0

Embed Size (px)

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

• 2.5.2 Deriva+ons Recall:

Recall:

0

• Age vs. Money

Popula'on

Cash in pocket dollars (\$)

Popula+on parameters

Hypothesis Test

Sample, n=9 Sample sta+s+cs

β0 , σ2 β1 ,

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

82

22

45 71

29

12 9

18 24

x y 71

54

43 45 21 11 30 45 10

Age in Years

PREDICTOR variable

x RESPONSE variable

Y

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

For parameter β1 :

simple linear regression

• Age vs. Money Objec've: The purpose of this observa+onal study was to

demonstrate if, and to what extent, age is associated with money.

Design and Methods: We collected a random sample of individuals and for each

determined their age (recorded in years) and the amount of money (in dollars) in their accounts. Analysis of the data was done using linear regression.

Results: We obtained a random sample of n = 9 subjects. There is a

sta+s+cally significant associa+on between age and money (p-value =0.036). For every addi'onal year in age, an individual’s amount of money increases on average by an es'mated of \$0.55 (95% C.I. = [\$0.05, \$1.05]).

Conclusions: We found that, as hypothesized, age is associated with money. In our sample age accounted for about half of the variability observed in money (R2=0.49). We predict that a 50 year old will have \$45.1 (95% P.I. = [\$5.6, \$84.5]), whereas a 40 year old will have \$39.6 (95% P.I. = [\$0.8, \$78.4]).

Small Print: The analysis rests on the following assump+ons:

- the observa+ons are independently and iden+cally distributed. - the response variable, money, is normally distributed. - Homoscedas+city of residuals or equal variance. - the rela+onship between response and predictor variables is linear.

• “Our research (using linear regression) indicates that older people hold and use more cash.”

• Stat 306: Finding Rela+onships in Data.

Lecture 7 Sec+on 3.1 Least squares with two or more

explanatory variables

• Age vs. Money

Popula'on

Cash in pocket dollars (\$)

Popula+on parameters

Hypothesis Test

Sample, n=9 Sample sta+s+cs

β0 , σ2 β1 ,

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

82

22

45 71

29

12 9

18 24

x y 71

54

43 45 21 11 30 45 10

Age in Years

PREDICTOR variable

x RESPONSE variable

Y

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

For parameter β1 :

simple linear regression

• Age vs. Money

Popula'on Popula+on parameters

Hypothesis Test

Sample, n=9 Sample sta+s+cs

β0 , σ2 β1 , β2,

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

82

22

45 71

29

12 9

18 24

x1 x2 y 71

54

43

45 21 11 30 45

10

Age in Years Income in thousands of \$.

PREDICTOR variables

x1 x2

RESPONSE variable

Y

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

mul'ple linear regression

26

37

49 76

40

2 0

10 92

[0.18, 1.18]

0.016

Cash in pocket dollars (\$)

• Chapter 3

3.1 Least squares with two or more explanatory variables 3.4 Sta+s+cal sogware output for mul+ple regression

- R2 and adjR2 and 3.4.1 Proper+es of R2 and σ2 - Sum of squares decomposi+on

3.5 Important explanatory variables 3.6 Interval es+mates and standard errors 3.7 Denominator of the residual SD 3.8 Residual plots 3.9 Categorical explanatory variables 3.10 Par+al correla+on

• 3.1 Least squares with two or more explanatory variables

• 0 20 40 60 80 100

0

20

40

60

80

100

Age (years)

M on

ey (\$

)

predic'on equa'on : y = b0 + b1x

• 3.1 Least squares with two or more explanatory variables

“hyperplane equa'on”

• 3.1 Least squares with two or more explanatory variables

“hyperplane equa'on”

• 3.1 Least squares with two or more explanatory variables

Once again we can minimize the least squares with simple calculus:

• 3.1 Least squares with two or more explanatory variables

• 3.1 Least squares with two or more explanatory variables

• 3.1 Least squares with two or more explanatory variables

• 3.1 Least squares with two or more explanatory variables

• 3.1 Least squares with two or more explanatory variables

• 3.1 Least squares with two or more explanatory variables

• 3.1 Least squares with two or more explanatory variables

• 3.1 Least squares with two or more explanatory variables

• 3.1 Least squares with two or more explanatory variables

• 3.1 Least squares with two or more explanatory variables

• 3.1 Least squares with two or more explanatory variables

• 3.1 Least squares with two or more explanatory variables

design matrix or data matrix

The system of normal equa5ons

• 3.1 Least squares with two or more explanatory variables

As before, Y is a random vector and X is fixed.

• 3.1 Least squares with two or more explanatory variables

As before, Y is a random vector and X is fixed.

• Age vs. Money

Popula'on Popula+on parameters

Hypothesis Test

Sample, n=9 Sample sta+s+cs

β0 , σ2 β1 , β2,

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

82

22

45 71

29

12 9

18 24

x1 x2 y 71

54

43

45 21 11 30 45

10

Age in Years Income in thousands of \$.

PREDICTOR variables

x1 x2

RESPONSE variable

Y

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

mul'ple linear regression

26

37

49 76

40

2 0

10 92

[0.18, 1.18]

0.016

Cash in pocket dollars (\$)

• 3.1 Least squares with two or more explanatory variables

• Chapter 3

3.1 Least squares with two or more explanatory variables 3.4 Sta's'cal soUware output for mul'ple regression

- R2 and adjR2 and 3.4.1 Proper'es of R2 and σ2 - Sum of squares decomposi'on

3.5 Important explanatory variables 3.6 Interval es+mates and standard errors 3.7 Denominator of the residual SD 3.8 Residual plots 3.9 Categorical explanatory variables 3.10 Par+al correla+on

• 3.4 Sta+s+cal sogware output for

mul+ple regression

• 3.4 Sta+s+cal sogware output for

mul+ple regression

• 3.4 Sta+s+cal sogware output for

mul+ple regression

• 3.4 Sta+s+cal sogware output for

mul+ple regression

• Age vs. Money

Popula'on Popula+on parameters

Hypothesis Test

Sample, n=9 Sample sta+s+cs

β0 , σ2 β1 , β2,

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

82

22

45 71

29

12 9

18 24

x1 x2 y 71

54

43

45 21 11 30 45

10

Age in Years Income in thousands of \$.

PREDICTOR variables

x1 x2

RESPONSE variable

Y

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

mul'ple linear regression

26

37

49 76

40

2 0

10 92

[0.18, 1.18]

0.016

Cash in pocket dollars (\$)

• 3.1 Least squares with two or more explanatory variables

“hyperplane equa'on”

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