Академический Документы
Профессиональный Документы
Культура Документы
Regression
1. Probabilistic Models
2. Fitting the Model: The Least Squares
Approach
3. Model Assumptions
4. Assessing the Utility of the Model:
Making Inferences about the Slope 1
Probabilistic Models
y
60
40
20
0 x
0 20 40 60
y
60
40
20
0 x
0 20 40 60
where SS xy xi x yi y
SS xx xi x
2
n = Sample size
Copyright © 2018, 2014, and 2011 Pearson Education, Inc. Slide - 19
Interpreting the Estimates of 0 and
1 in Simple Liner Regression
y-intercept:̂ 0 represents the predicted value
of y when x = 0 (Caution: This value
will not be meaningful if the value
x = 0 is nonsensical or outside the
range of the sample data.)
slope: ˆ1 represents the increase (or
decrease) in y for every 1-unit
increase in x (Caution: This
interpretation is valid only for x-values
within the range of the sample data.)
Copyright © 2018, 2014, and 2011 Pearson Education, Inc. Slide - 20
Least Squares Graphically
n
LS minimizes i 1 2 3 4
ˆ 2
ˆ 2
ˆ 2
ˆ 2
ˆ 2
i 1
Sales
4
3
2
1
0
0 1 2 3 4 5
Advertising
x x 15
3 y y 10
2
5 5 5 5
SS xy x x y y SS xx x x
2
x 3 y 2 7 x 3 10
2
ˆ SS xy 7
B1 .7
SS xx 10
yˆ .1 .7 x
^1
yˆ .1 .7 x
Copyright © 2018, 2014, and 2011 Pearson Education, Inc. Slide - 26
Coefficient Interpretation
Solution
^
1. Slope (1)
• Sales Volume (y) is expected to increase by
$700 for each $100 increase in advertising
(x), over the sampled range of advertising
expenditures from $100 to $500
^
2. y-Intercept (0)
• Since 0 is outside of the range of the
sampled values of x, the y-intercept has no
meaningful interpretation
Model Assumptions
y y
2
SS yy i
n2
We will refer to s as the estimated
standard error of the regression model.
Copyright © 2018, 2014, and 2011 Pearson Education, Inc. Slide - 33
Calculating SSE, 2
s, s
Example
You’re a marketing analyst for a Toy Shop.
You gather the following data:
Ad Expenditure (100$) Sales (Units)
1 1
2 1
3 2
4 2
5 4
Find SSE, s2, and s.
SSE 1.1
s
2
.36667
n2 52
s .36667 .6055
ˆ
1
SSxx
-3.182 0 3.182 t
Copyright © 2018, 2014, and 2011 Pearson Education, Inc. Slide - 44
Test Statistic
Solution
s .6055
sö .1914
15
2
1
SS xx
55
5
ö1 .70
t 3.657
Sö .1914
1
^
1 S^
1
t = ^1 / S^
1
P-Value
SS xy
r
SS xx SS yy
where
SS xy x x y y
SS xx x x
2
SS yy y y
2
SS xy x x y y 7
SS yy y y 6
2
SS xx x x 10
2
SS xy 7
r .904
SS xx SS yy 10 6
SS xy x x y y 26
SS yy y y 18.5
2
SS xx x x 40
2
SS xy 26
r .956
SS xx SS yy 40 18.5
0 r2 1
r2 = (coefficient of correlation)2
r2
Root MSE 0.60553 R-square 0.8167
Dep Mean 2.00000 Adj R-sq 0.7556
C.V. 30.27650
1 xp x
2
yˆ t /2 s
n SSxx
df = n – 2
1 xp x
2
yˆ t /2 s 1
n SSxx
df = n – 2
1 xp x
2
yˆ t /2 s
n SSxx x to be predicted
1 4 3
2
1.645 E (Y ) 3.755
1 xp x
2
yˆ t /2 s 1
n SSxx
Note!
df = n – 2
Copyright © 2018, 2014, and 2011 Pearson Education, Inc. Slide - 73
Why the Extra ‘S’?
y
y we're trying to
predict
Expected
(Mean) y
Prediction, ^
y
x
xp
Copyright © 2018, 2014, and 2011 Pearson Education, Inc. Slide - 74
Prediction Interval
Example
You’re a marketing analyst for a Toy Shop.
You find ^β0 = –.1, β^ 1 = .7 and s = .6055.
Ad Expenditure (1000$) Sales (Units)
1 1
2 1
3 2
4 2
5 4
1 xp x
2
yˆ t /2 s 1 x to be predicted
n SSxx
1 4 3
2
.503 y4 4.897
A Complete Example
Coefficient of Correlation, r
1. Ranges between –1 and +1
2. Measures strength of linear relationship
between y and x
Coefficient of Determination, r2
1. Ranges between 0 and 1
2. Measures proportion of sample variation in y
explained by the model
Copyright © 2018, 2014, and 2011 Pearson Education, Inc. Slide - 97
Key Ideas