You are on page 1of 14

DUMMY

VARIABLE
MODEL
12/08/21 1
Illustrative Example – Sales of
Second Hand Cars
 A used car dealer examine 100 used
cars sold in an auction. He examines
how the auction selling price depends on
the miles that have been covered or the
reading of the odometer.
 The computer printout are shown in the
next slide. Examine the printout carefully
and answer the following questions.

12/08/21 2
Computer Printout 1
-------------------------------------------------------------------------------------------------------
Regression Statistics (Observations 100)
-------------------------------------------------------------------------------------------------------
Multiple R 0.8063 R Square 0.6501
Adjusted R Square 0.6466 Standard Error 151.6
-------------------------------------------------------------------------------------------------------
ANOVA df SS MS F Significance F
-------------------------------------------------------------------------------------------------------
Regression 1 4183528 4183528 182.1 0.000
Residual 98 2251362 22973
Total 99 6434890
-------------------------------------------------------------------------------------------------------
Coefficients Standard Error t Stat P value
Intercept 6533 8451 77.31 0.0000
Odometer -0.0312 0.0023 -13.49 0.0000

12/08/21 3
Comments on the Printout 1
 The multiple correlation is large about 0.8, indicating that
a strong linear relationship exists between the dependent
variable and the independent variable.
 In the ANOVA analysis, The F test shows that overall the
model is valid and the coefficient of the regressor cannot
be zero.
 The t test for the intercept and the odometer are
excellent.
 As a whole there is a strong linear relationship between
the selling price and the reading of the odometer.

12/08/21 4
Questions and Answers
1 Write down the simple linear regression equation for the used car seller case.
2 Why is there in the analysis only 99 observations whereas the total
observations suppose to be 100?
3 How does the degree of freedom calculated?
4 What do you understand the ss values and ms values for the residual?
5 How to interpret the F test result?
6 What is the difference between adjusted R square and R square? And how is
it related to multiple correlation?

12/08/21 5
Dummy-Variable Regression Model

 Involves categorical X variable with 2 levels


• e.g., male-female, college-no college etc.
 Variable levels coded 0 & 1
 Alternative names
• Indicator, Binary, Categorical, Qualitative, Dichotomous
 Assumes only intercept is different
• Slopes are constant across categories
 Dummy-variable model
Yi   0   1 X 1i   2 X 2 i   P X Pi   i
Dummy-Variable Regression Model
 Analysis of Variance Model
• Regression model containing explanatory variables that are exclusively dummy
 Y = α + β Di + u i
Where Y = Annual salary of a college teacher
Di = 1 if male college teacher
0 otherwise (if female teacher)
 Above model enable to find out whether gender makes any difference in a
college teacher’s salary other things remaining constant
 Mean salary for female teacher E(Yi/Di =0) = α
 Mean salary for male teacher E(Yi/Di =1) = α + β
 Null Hypothesis Ho : β = 0
 Alternative Hypothesis H1 : β ≠ 0
Interpreting Dummy-Variable
Model Equation

Given : Yˆi  b0  b1 X 1i  b2 X 2i
Y  Starting salary of college grad' s
X 1  GPA
0 if Male
X2  
1 if Female Same slopes
Males ( X  0) :
2

Yˆi  b0  b1 X 1i  b2  0   b0  b1 X 1i
Females ( X  1) :
2

Yˆi  b0  b1 X 1i  b2 1   b0  b2   b1 X 1i
Dummy-Variable Model
Relationships

Y Same slopes b1

Females
b0 + b2

b0
Males
0 X1
0
Dummy-Variable Model
Worksheet

Case, i Yii X1i1i X2i2i


1 1 1 1
2 4 8 0
3 1 3 1
4 3 5 1
: : : :
X2 levels: 0 = Group 1; 1 = Group 2.
Run regression with Y, X1, X2
Dummy-Variable Model Example
Computer Output : Yˆi  3  5 X 1i  7 X 2i

0 if M ale
Male
X2 
1 if Female

M ales ( X
Males  0) : Same slopes
2

Yˆi  3  5 X 1i  7 0   3  5 X 1i

Females ( X  1) :
2

Yˆi  3  5 X 1i  71   3  7   5 X 1i  10  5 X
1i
Dummy-Variable Model
Worksheet

Starting salary Gender Regression Statistics


Multiple R 0.93472
22.0 1 R Square 0.873701
Adjusted R
19.0 0 Square 0.857913
18.0 0 Standard
Error 0.697137
21.7 1 Observations 10
ANOVA
18.5 0 Significa
  df SS MS F nce F
21.0 1 Regression 1 26.896 26.896 55.34156 7.34E-05
20.5 1 Residual 8 3.888 0.486
Total 9 30.784      
17.0 0
17.5 0 Coefficient Standard
  s Error t Stat P-value
21.2 1 Intercept 18 0.311769 57.73503 8.99E-12
Gender 3.28 0.440908 7.439191 7.34E-05
Dummy-Variable Model
Worksheet

Conclusion
Estimated mean salary of female college teachers
Rs.18000/-
Estimated mean salary of male college teachers
Rs.21280/-
Β is statistically significant indicating mean salaries of then two
categories are different other things remaining constant
Dummy-Variable Model
Analysis-of-covariance (ACOV)Model
Analysis of covariance Model
Regression model containing quantitative and qualitative independent
variables
Y = α1+ α2Di + β Xi + ui
Where Y = Annual salary of a college teacher
X = Years of teaching Experience
Di = 1 if male college teacher
0 otherwise (if female teacher)
Above model enable to find out whether gender makes any
difference in a college teacher’s salary other things remaining
constant
Mean salary for female teacher E(Yi/Di =0) = α1 + β Xi
Mean salary for male teacher E(Yi/Di =1) = (α1 + α2) + β Xi

You might also like