Regression Analysis Time Series Analysis Copyright 2001 Alan

  • Slides: 36
Download presentation
Regression Analysis Time Series Analysis © Copyright 2001, Alan Marshall 1

Regression Analysis Time Series Analysis © Copyright 2001, Alan Marshall 1

Regression Analysis èA statistical technique for determining the best fit line through a series

Regression Analysis èA statistical technique for determining the best fit line through a series of data © Copyright 2001, Alan Marshall 2

Error è No line can hit all, or even most of the points -

Error è No line can hit all, or even most of the points - The amount we miss by is called ERROR è Error does not mean mistake! It simply means the inevitable “missing” that will happen when we generalize, or try to describe things with models è When we looked at the mean and variance, we called the errors deviations © Copyright 2001, Alan Marshall 3

What Regression Does è Regression finds the line that minimizes the amount of error,

What Regression Does è Regression finds the line that minimizes the amount of error, or deviation from the line è The mean is the statistic that has the minimum total of squared deviations è Likewise, the regression line is the unique line that minimizes the total of the squared errors. è The Statistical term is “Sum of Squared Errors” or SSE © Copyright 2001, Alan Marshall 4

Example è Suppose we are examining the sale prices of compact cars sold by

Example è Suppose we are examining the sale prices of compact cars sold by rental agencies and that we have the following summary statistics: © Copyright 2001, Alan Marshall 5

Summary Statistics è Our best estimate of the average price would be $5, 411

Summary Statistics è Our best estimate of the average price would be $5, 411 è Our 95% Confidence Interval would be $5, 411 ± (2)(255) or $5, 411 ± (510) or $4, 901 to $5, 921 © Copyright 2001, Alan Marshall 6

Something Missing? è Clearly, looking at this data in such a simplistic way ignores

Something Missing? è Clearly, looking at this data in such a simplistic way ignores a key factor: the mileage on the vehicle © Copyright 2001, Alan Marshall 7

Price vs. Mileage © Copyright 2001, Alan Marshall 8

Price vs. Mileage © Copyright 2001, Alan Marshall 8

Importance of the Factor è After looking at the scatter graph, you would be

Importance of the Factor è After looking at the scatter graph, you would be inclined to revise you estimate depending on the mileage u 25, 000 km about $5, 700 - $5, 900 u 45, 000 km about $5, 100 - $5, 300 è Similar to getting new test information in decision theory. © Copyright 2001, Alan Marshall 9

Switch to Excel File Car. Price. xls Tab Odometer © Copyright 2001, Alan Marshall

Switch to Excel File Car. Price. xls Tab Odometer © Copyright 2001, Alan Marshall 10

The Regression Tool è Tools u Data Analysis ä Choose “Regression” from the dialogue

The Regression Tool è Tools u Data Analysis ä Choose “Regression” from the dialogue box menu. © Copyright 2001, Alan Marshall 11

More Than You Need © Copyright 2001, Alan Marshall 12

More Than You Need © Copyright 2001, Alan Marshall 12

Ignore è The ANOVA table è The Upper 95% and Lower 95% stuff. ©

Ignore è The ANOVA table è The Upper 95% and Lower 95% stuff. © Copyright 2001, Alan Marshall 13

© Copyright 2001, Alan Marshall 14

© Copyright 2001, Alan Marshall 14

Stripped Down Output © Copyright 2001, Alan Marshall 15

Stripped Down Output © Copyright 2001, Alan Marshall 15

Interpretation è Our estimated relationship is è Price = $6, 533 - 0. 031(km)

Interpretation è Our estimated relationship is è Price = $6, 533 - 0. 031(km) u Every 1000 km reduces the price by an average of $31 u What does the $6, 533 mean? ä Careful! © Copyright 2001, Alan Marshall It is outside the data range! 16

Quality è The model makes sense: Price is lowered as mileage increases, and by

Quality è The model makes sense: Price is lowered as mileage increases, and by a plausible amount. è The slope: 13. 5 s from 0! u Occurs randomly, or by chance, with a probability that has 23 zeros! è The R-squared: 0. 65: 65% of the variation in price is explained by mileage © Copyright 2001, Alan Marshall 17

Multiple Regression Using More than One Explanatory Variable © Copyright 2001, Alan Marshall 18

Multiple Regression Using More than One Explanatory Variable © Copyright 2001, Alan Marshall 18

Using Excel è No significant changes © Copyright 2001, Alan Marshall 19

Using Excel è No significant changes © Copyright 2001, Alan Marshall 19

To Watch For è Variables significantly related to each other u Correlation Function (Tools

To Watch For è Variables significantly related to each other u Correlation Function (Tools Data Analysis) u Look for values above 0. 5 or below -0. 5 è Nonsensical u Wrong è Weak Results Signs Variables u Magnitude of the T-ratio less than 2 u p-value greater than 0. 05 © Copyright 2001, Alan Marshall 20

Dummy Variables è Qualitative variables that allow the relationship to shift is a certain

Dummy Variables è Qualitative variables that allow the relationship to shift is a certain factor is present. è Illustrated in the two upcoming examples © Copyright 2001, Alan Marshall 21

Examples House Prices Theme Park Attendance © Copyright 2001, Alan Marshall 22

Examples House Prices Theme Park Attendance © Copyright 2001, Alan Marshall 22

Time Series Analysis © Copyright 2001, Alan Marshall 23

Time Series Analysis © Copyright 2001, Alan Marshall 23

Time Series Analysis è Various techniques that allow us to u Understand the variation

Time Series Analysis è Various techniques that allow us to u Understand the variation in a time series u Understand the seasonalities and cycles in a time series u Use this understanding to make predictions © Copyright 2001, Alan Marshall 24

Two Techniques è Deseasonalizing based on a moving average è Using Dummy Variables to

Two Techniques è Deseasonalizing based on a moving average è Using Dummy Variables to Isolate the seasonal effects. © Copyright 2001, Alan Marshall 25

Moving Average è Calculate a moving average è Calculate the ratio of the observation

Moving Average è Calculate a moving average è Calculate the ratio of the observation to the moving average è Collect all ratios organized by the point in the seasonal cycle u months, if monthly; quarters, if quarterly è Average, and adjust if necessary, to get seasonal adjustment factors © Copyright 2001, Alan Marshall 26

Example Course Kit Example Page 143 © Copyright 2001, Alan Marshall 27

Example Course Kit Example Page 143 © Copyright 2001, Alan Marshall 27

Regression è Add dummy variables for all but one seasonal period (i. e. ,

Regression è Add dummy variables for all but one seasonal period (i. e. , 3 for quarterly, 11 for monthly) © Copyright 2001, Alan Marshall 28

Example Revisit the Course Kit Example Page 143 © Copyright 2001, Alan Marshall 29

Example Revisit the Course Kit Example Page 143 © Copyright 2001, Alan Marshall 29

Edgar Feidler’s Six Rules of Forecasting With thanks to Peter Walker for bringing this

Edgar Feidler’s Six Rules of Forecasting With thanks to Peter Walker for bringing this to my attention © Copyright 2001, Alan Marshall 30

Forecasting is very difficult, especially if it is about the future © Copyright 2001,

Forecasting is very difficult, especially if it is about the future © Copyright 2001, Alan Marshall 31

The minute you make a forecast, you know you’re going to be wrong, you

The minute you make a forecast, you know you’re going to be wrong, you just don’t know when or in what direction. © Copyright 2001, Alan Marshall 32

The herd instinct among forecasters make sheep look like independent thinkers © Copyright 2001,

The herd instinct among forecasters make sheep look like independent thinkers © Copyright 2001, Alan Marshall 33

When asked to explain a forecast, never underestimate the power of a platitude ©

When asked to explain a forecast, never underestimate the power of a platitude © Copyright 2001, Alan Marshall 34

When you know absolutely nothing about a subject, you can still do a forecast

When you know absolutely nothing about a subject, you can still do a forecast by asking 300 people who don’t know anything either. That’s called a survey © Copyright 2001, Alan Marshall 35

Forecasters learn more and more about less and less until they know nothing about

Forecasters learn more and more about less and less until they know nothing about anything © Copyright 2001, Alan Marshall 36