Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Example: City X has recently 3 4 To answer the questions, we need to relate Y to the Xs!
conducted a travel survey of its 10 6 9
1 10 Plot the observed Y vs X1 (scatter chart) and then Add a
zones. The collected data are 2 5
7 8 Trend Line
summarized in Table 1. Based on the
given information, Total Zonal Trips VS. Zonal Population
Table 1 Observed Trips and Zonal Activity
6000
– How to predict the total number of Zone # Pop. Households Trips
X1 X2 Y
Simple Linear Regression Analysis Problem: consider two variables, X and Y, and we have n paired
observations on them (data): (x1,y1), (x2,y2), …, (xn,yn), what is the
Multiple Linear Regression relationship between Y and X?
Understanding the Regression Outputs Method: Assumed Y and X are linearly related, that is
Validating a Regression Model Y = b0 + b 1 X
where: X - independent variable (a factor that is considered to
have impact on Y!)
Y - dependent variable
b0, b1 - regression coefficients
Our Goals:
– Find the best value for b0 and b1 (but what do we mean by “best”?)
3 – Find out whether or not the identified relationship is good, i.e., 4
validate the model
Plot Y vs. X1 (scatter graph) and the straight line Y = b0 and b1 can be determined mathematically as follows:
b0 + b1 X1 with different intercept (b0) and slope (b1)
6000
We shall find b0 and b1
Y = b0 + b 1 X so as to minimize the
Total Trips Produced by a Zone, Y
5000
total estimation error
4000 (xi, b0+b1xi) (E):
3000
error, ei = (y - b0+b1xi) E = Σ ei 2
2000
(xi, yi) = Σ [yi-(b0+b1xi)]2
1000
0
This is called the method
0 2000 4000 6000 8000 10000 12000
of least squares).
Zonal Population, X1
5 6
1
Estimating the Regression Coefficients Our Third Attempt (using Excel):
4000
In general:
– Data:(y1,x11,x12, ...), (y2,x21,x22,...), …, (yn,xn1,xn2,...)
HBW Productions
2
Understand Regression Output (1):
Regression Output from Excel Regression Coefficients, b0, b1, ...
SUMMARY OUTPUT
ANOVA
df SS MS F ignificance F b1 = 0.343 interpreted as: one additional person in a zone
Regression 1 8119632.892 8119633 12.43318 0.007777
would produce additional 0.343 trips!)
Residual 8 5224491.608 653061.5
Total 9 13344124.5
3
Understand Regression Output (3):
Regression Output from Excel
Coefficient of Determination, R2
SUMMARY OUTPUT
R2 is a measure of overall quality of the regression:
Regression Statistics
Multiple R 0.7801
Examples
R Square 0.6085 This is the R2 value !
Adjusted R Square 0.5595 Y Y
Standard Error 808.12
Observations 10
ANOVA
df SS MS F ignificance F X X
Regression 1 8119632.892 8119633 12.43318 0.007777
Residual 8 5224491.608 653061.5 Y
Total 9 13344124.5
e e
X 24 normal not normal 25
4
Check for Homogeneous Variance Check for Multicolinearity
Office Space, X3
1000 1000
800
2000
500 500
Residuals
600
Residuals
0 0 400
1000
0 1000 2000 3000 4000 0 500 1000 1500 2000 2500 3000 200
-500 -500
0 0
-1000 -1000 0 2000 4000 6000 8000 10000 12000 0 1000 2000 3000 4000
X Variable 1 X Variable 1 Population, X1 Zone Households, X2
-1≤r≤1:
– if r = +1, X1 and X2 have a perfect positive correlation
– if r = -1, X1 and X2 have a perfect negative correlation
– if r = 0, X1 and X2 have no linear relationship
– if |r| > 0.4 for two independent variables, it may run into the
multicolinearity problem if both variables are included in a regression
equation.