Вы находитесь на странице: 1из 37

Statistics Industry

Chapter 13
Multiple Regression

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-1

The Multiple Regression


Model
Idea: Examine the linear relationship between
1 dependent (Y) & 2 or more independent variables (Xi)
Multiple Regression Model with k Independent Variables:
Y-intercept

Population slopes

Random Error

Y 0 1X1 2 X2 k Xk

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-2

Multiple Regression Equation


The coefficients of the multiple regression model are
estimated using sample data
Multiple regression equation with k independent variables:
Estimated
(or predicted)
value of y

Estimated
intercept

Estimated slope coefficients

y i b0 b1x1i b2 x2i bk xki


In this chapter we will always use a computer to obtain the
regression slope coefficients and other regression
summary measures.
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-3

Multiple Regression Equation


(continued)

Two variable model

y b0 b1x1 b2 x2

x2

x1
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-4

Standard Multiple Regression


Assumptions

The values xi and the error terms i are


independent

The error terms are random variables with


mean 0 and a constant variance, 2.
E[i ] 0 and E[i2 ] 2

for (i 1, ,n)

(The constant variance property is called


homoscedasticity)
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-5

Standard Multiple Regression


Assumptions
(continued)

The random error terms, i , are not correlated


with one another, so that
E[ i j ] 0

for all i j

It is not possible to find a set of numbers, c0,


c1, . . . , ck, such that

c0 c1x1i c 2 x2i cK xKi 0


(This is the property of no linear relation for
the Xjs)
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-6

Example:
2 Independent Variables
A distributor of frozen desert pies wants to
evaluate factors thought to influence demand
Dependent variable:
Pie sales (units per week)
Independent variables: Price (in $)
Advertising ($100s)

Data are collected for 15 weeks

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-7

Pie Sales Example


Week

Pie
Sales

Price
($)

Advertising
($100s)

350

5.50

3.3

460

7.50

3.3

350

8.00

3.0

430

8.00

4.5

350

6.80

3.0

380

7.50

4.0

430

4.50

3.0

470

6.40

3.7

450

7.00

3.5

10

490

5.00

4.0

11

340

7.20

3.5

12

300

7.90

3.2

13

440

5.90

4.0

14

450

5.00

3.5

15

300

7.00

2.7

Multiple regression equation:

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Sales = b0 + b1 (Price)
+ b2 (Advertising)

Chap 13-8

Estimating a Multiple Linear


Regression Equation
Excel will be used to generate the coefficients
and measures of goodness of fit for multiple
regression
Excel:
Tools / Data Analysis... / Regression

PHStat:
PHStat / Regression / Multiple Regression

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-9

Multiple Regression Output


Regression Statistics

Multiple R

0.72213

R Square

0.52148

Adjusted R Square

0.44172

Standard Error

47.46341

Observations

ANOVA
Regression

Sales 306.526 - 24.975(Price) 74.131(Advertising)

15

df

SS

MS

29460.027

14730.013

Residual

12

27033.306

2252.776

Total

14

56493.333

Coefficients

Standard Error

Intercept

306.52619

114.25389

2.68285

0.01993

57.58835

555.46404

Price

-24.97509

10.83213

-2.30565

0.03979

-48.57626

-1.37392

74.13096

25.96732

2.85478

0.01449

17.55303

130.70888

Advertising

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

t Stat

6.53861

Significance F

P-value

0.01201

Lower 95%

Upper 95%

Chap 13-10

The Multiple Regression Equation


Sales 306.526 - 24.975(Price) 74.131(Advertising)
where
Sales is in number of pies per week
Price is in $
Advertising is in $100s.

b1 = -24.975: sales
will decrease, on
average, by 24.975
pies per week for
each $1 increase in
selling price, net of
the effects of changes
due to advertising
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

b2 = 74.131: sales will


increase, on average,
by 74.131 pies per
week for each $100
increase in
advertising, net of the
effects of changes
due to price
Chap 13-11

Coefficient of Determination, R2
Reports the proportion of total variation in y
explained by all x variables taken together

SSR regressionsum of squares


R

SST
total sum of squares
2

This is the ratio of the explained variability to


total sample variability

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-12

Coefficient of Determination, R2
(continued)
Regression Statistics
Multiple R

0.72213

R Square

0.52148

Adjusted R Square

0.44172

Standard Error

Regression

52.1% of the variation in pie sales


is explained by the variation in
price and advertising

47.46341

Observations

ANOVA

SSR 29460.0
R

.52148
SST 56493.3
2

15

df

SS

MS

29460.027

14730.013

Residual

12

27033.306

2252.776

Total

14

56493.333

Coefficients

Standard Error

Intercept

306.52619

114.25389

2.68285

0.01993

57.58835

555.46404

Price

-24.97509

10.83213

-2.30565

0.03979

-48.57626

-1.37392

74.13096

25.96732

2.85478

0.01449

17.55303

130.70888

Advertising

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

t Stat

6.53861

Significance F

P-value

0.01201

Lower 95%

Upper 95%

Chap 13-13

Estimation of Error Variance


Consider the population regression model

Yi 0 1x1i 2 x 2i K xKi i
The unbiased estimate of the variance of the errors is
n

2
e
i

SSE
s

n K 1 n K 1
2
e

i1

where ei yi y i
The square root of the variance, se , is called the
standard error of the estimate
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-14

Standard Error, se
Regression Statistics
Multiple R

0.72213

R Square

0.52148

Adjusted R Square

0.44172

Standard Error

Regression

The magnitude of this


value can be compared to
the average y value

47.46341

Observations

ANOVA

se 47.463

15

df

SS

MS

29460.027

14730.013

Residual

12

27033.306

2252.776

Total

14

56493.333

Coefficients

Standard Error

Intercept

306.52619

114.25389

2.68285

0.01993

57.58835

555.46404

Price

-24.97509

10.83213

-2.30565

0.03979

-48.57626

-1.37392

74.13096

25.96732

2.85478

0.01449

17.55303

130.70888

Advertising

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

t Stat

6.53861

Significance F

P-value

0.01201

Lower 95%

Upper 95%

Chap 13-15

Adjusted Coefficient of
Determination, R 2
R2 never decreases when a new X variable is
added to the model, even if the new variable is
not an important predictor variable
This can be a disadvantage when comparing
models
What is the net effect of adding a new variable?
We lose a degree of freedom when a new X
variable is added
Did the new X variable add enough
explanatory power to offset the loss of one
degree of freedom?
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-16

Adjusted Coefficient of
Determination, R 2
(continued)

Used to correct for the fact that adding non-relevant


independent variables will still reduce the error sum of
squares

SSE / (n K 1)
R 1
SST / (n 1)
2

(where n = sample size, K = number of independent variables)

Adjusted R2 provides a better comparison between


multiple regression models with different numbers of
independent variables
Penalize excessive use of unimportant independent
variables
Smaller than R2
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-17

R
Regression Statistics
Multiple R

0.72213

R Square

0.52148

Adjusted R Square

0.44172

Standard Error

47.46341

Observations

ANOVA
Regression

15

df

R .44172
2

44.2% of the variation in pie sales is


explained by the variation in price and
advertising, taking into account the sample
size and number of independent variables
SS

MS

29460.027

14730.013

Residual

12

27033.306

2252.776

Total

14

56493.333

Coefficients

Standard Error

Intercept

306.52619

114.25389

2.68285

0.01993

57.58835

555.46404

Price

-24.97509

10.83213

-2.30565

0.03979

-48.57626

-1.37392

74.13096

25.96732

2.85478

0.01449

17.55303

130.70888

Advertising

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

t Stat

6.53861

Significance F

P-value

0.01201

Lower 95%

Upper 95%

Chap 13-18

Coefficient of Multiple
Correlation
The coefficient of multiple correlation is the correlation
between the predicted value and the observed value of
the dependent variable

R r(y , y) R2
Is the square root of the multiple coefficient of
determination
Used as another measure of the strength of the linear
relationship between the dependent variable and the
independent variables
Comparable to the correlation between Y and X in
simple regression
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-19

Evaluating Individual
Regression Coefficients
Use t-tests for individual coefficients
Shows if a specific independent variable is
conditionally important
Hypotheses:
H0: j = 0 (no linear relationship)
H1: j 0 (linear relationship does exist
between xj and y)

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-20

Evaluating Individual
Regression Coefficients
(continued)

H0: j = 0 (no linear relationship)


H1: j 0 (linear relationship does exist
between xi and y)
Test Statistic:

bj 0
t
Sb j
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

(df = n k 1)

Chap 13-21

Evaluating Individual
Regression Coefficients
(continued)
Regression Statistics
Multiple R

0.72213

R Square

0.52148

Adjusted R Square

0.44172

Standard Error

47.46341

Observations

ANOVA
Regression

15

df

t-value for Price is t = -2.306, with


p-value .0398
t-value for Advertising is t = 2.855,
with p-value .0145
SS

MS

29460.027

14730.013

Residual

12

27033.306

2252.776

Total

14

56493.333

Coefficients

Standard Error

Intercept

306.52619

114.25389

2.68285

0.01993

57.58835

555.46404

Price

-24.97509

10.83213

-2.30565

0.03979

-48.57626

-1.37392

74.13096

25.96732

2.85478

0.01449

17.55303

130.70888

Advertising

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

t Stat

6.53861

Significance F

P-value

0.01201

Lower 95%

Upper 95%

Chap 13-22

Example: Evaluating Individual


Regression Coefficients
From Excel output:

H0: j = 0
H1: j 0

Price
Advertising

d.f. = 15-2-1 = 12
= .05

Coefficients

Standard Error

t Stat

P-value

-24.97509

10.83213

-2.30565

0.03979

74.13096

25.96732

2.85478

0.01449

The test statistic for each variable falls


in the rejection region (p-values < .05)

t12, .025 = 2.1788

Decision:
/2=.025

/2=.025

Reject H0 for each variable

Conclusion:
Reject H0

Do not reject H0

-t/2
-2.1788

Reject H0

t/2
2.1788

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

There is evidence that both


Price and Advertising affect
pie sales at = .05
Chap 13-23

Confidence Interval Estimate


for the Slope
Confidence interval limits for the population slope j

b j tnK 1,/2Sb j
Coefficients

Standard Error

Intercept

306.52619

114.25389

Price

-24.97509

10.83213

74.13096

25.96732

Advertising

where t has
(n K 1) d.f.

Here, t has
(15 2 1) = 12 d.f.

Example: Form a 95% confidence interval for the effect of


changes in price (x1) on pie sales:
-24.975 (2.1788)(10.832)
So the interval is
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

-48.576 < 1 < -1.374


Chap 13-24

Confidence Interval Estimate


for the Slope
(continued)

Confidence interval for the population slope i


Coefficients

Standard Error

Intercept

306.52619

114.25389

57.58835

555.46404

Price

-24.97509

10.83213

-48.57626

-1.37392

74.13096

25.96732

17.55303

130.70888

Advertising

Lower 95%

Upper 95%

Example: Excel output also reports these interval endpoints:


Weekly sales are estimated to be reduced by between 1.37 to
48.58 pies for each increase of $1 in the selling price

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-25

Test on All Coefficients


F-Test for Overall Significance of the Model
Shows if there is a linear relationship between all
of the X variables considered together and Y

Use F test statistic


Hypotheses:
H0: 1 = 2 = = k = 0 (no linear relationship)
H1: at least one i 0 (at least one independent
variable affects Y)

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-26

F-Test for Overall Significance


Test statistic:

MSR
SSR/K
F 2
se
SSE/(n K 1)
where F has k (numerator) and
(n K 1) (denominator)
degrees of freedom

The decision rule is


Reject H0 if F Fk,nK 1,
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-27

F-Test for Overall Significance


(continued)
Regression Statistics
Multiple R

0.72213

R Square

0.52148

Adjusted R Square

0.44172

Standard Error

47.46341

Observations

ANOVA
Regression

15

df

MSR 14730.0
F

6.5386
MSE 2252.8
With 2 and 12 degrees
of freedom
SS

MS

P-value for
the F-Test
F

29460.027

14730.013

Residual

12

27033.306

2252.776

Total

14

56493.333

Coefficients

Standard Error

Intercept

306.52619

114.25389

2.68285

0.01993

57.58835

555.46404

Price

-24.97509

10.83213

-2.30565

0.03979

-48.57626

-1.37392

74.13096

25.96732

2.85478

0.01449

17.55303

130.70888

Advertising

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

t Stat

6.53861

Significance F

P-value

0.01201

Lower 95%

Upper 95%

Chap 13-28

F-Test for Overall Significance


(continued)

H0: 1 = 2 = 0
H1: 1 and 2 not both zero
= .05
df1= 2
df2 = 12
Critical
Value:
= .05

Do not
reject H0

Reject H0

MSR
F
6.5386
MSE

Decision:
Since F test statistic is in
the rejection region (pvalue < .05), reject H0

F = 3.885

Test Statistic:

Conclusion:
F

F.05 = 3.885

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

There is evidence that at least one


independent variable affects Y
Chap 13-29

Tests on a Subset of
Regression Coefficients
Consider a multiple regression model involving
variables xj and zj , and the null hypothesis that the z
variable coefficients are all zero:

yi 0 1x1i K xKi 1z1i r zri i


H0 : 1 2 r 0
H1 : at least one of j 0 (j 1,..., r)

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-30

Tests on a Subset of
Regression Coefficients
(continued)

Goal: compare the error sum of squares for the


complete model with the error sum of squares for the
restricted model
First run a regression for the complete model and obtain SSE
Next run a restricted regression that excludes the z variables
(the number of variables excluded is r) and obtain the
restricted error sum of squares SSE(r)

Compute the F statistic and apply the decision rule for a


significance level

( SSE(r) SSE ) / r
Reject H0 if F
Fr,nK r 1,
2
se
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-31

Prediction
Given a population regression model

yi 0 1x1i 2 x 2i K xKi i (i 1,2,,n)


then given a new observation of a data point
(x1,n+1, x 2,n+1, . . . , x K,n+1)
the best linear unbiased forecast of ^yn+1 is

y n1 b0 b1x1,n1 b2 x 2,n1 bK xK,n1


It is risky to forecast for new X values outside the range of the data used
to estimate the model coefficients, because we do not have data to
support that the linear model extends beyond the observed range.
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-32

Using The Equation to Make


Predictions
Predict sales for a week in which the selling
price is $5.50 and advertising is $350:
Sales 306.526 - 24.975(Price) 74.131(Advertising)
306.526 - 24.975 (5.50) 74.131(3.5)
428.62

Predicted sales
is 428.62 pies
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Note that Advertising is


in $100s, so $350
means that X2 = 3.5

Chap 13-33

Predictions in PHStat
PHStat | regression | multiple regression

Check the
confidence and
prediction interval
estimates box

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-34

Predictions in PHStat
(continued)

Input values
<

Predicted y value
<

Confidence interval for the


mean y value, given
these xs
<

Prediction interval for an


individual y value, given
these xs
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-35

Residuals in Multiple Regression


Two variable model

y b0 b1x1 b2 x2

<

Residual =
ei = (yi yi)

yi

Sample
observation

<

yi
x2i

x2

x1i

x1
Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-36

Statistics for Business and Economics, 6e 2007 Pearson Education, Inc.

Chap 13-37

Вам также может понравиться