Successfully reported this slideshow.
Upcoming SlideShare
×

# ForecastIT 2. Linear Regression & Model Statistics

2,918 views

Published on

This lesson begins with explaining the linear regression method characteristics, and uses. Linear regression method attempts to best fit a line through the data. Using an example and the forecasting process, we apply the linear regression method to create a model and forecast based upon it.

Published in: Economy & Finance
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

### ForecastIT 2. Linear Regression & Model Statistics

1. 1. Linear Regression and Model Statistics<br />Lesson #2<br />Linear Regression Method<br />Copyright 2010 DeepThought, Inc.<br />1<br />
2. 2. Linear Regression and Model Statistics<br />Method Introduction<br /><ul><li>One of the simpler methods to use for forecasting
3. 3. Estimates a line through the data
4. 4. Uses the estimated line equation to forecast future values.
5. 5. Method format:
6. 6. Y = a + b × t</li></ul>Copyright 2010 DeepThought, Inc.<br />2<br />
7. 7. Linear Regression and Model Statistics<br />Model Characteristics<br /><ul><li>Method characteristics
8. 8. Fits a line to the data
9. 9. Estimating a line which minimizes the errors between actual data points and model estimates
10. 10. When to use method
11. 11. Estimate trend
12. 12. Estimate trend magnitude
13. 13. When not to use
14. 14. Estimate anything beyond a simple linear relationship </li></ul>Copyright 2010 DeepThought, Inc.<br />3<br />
15. 15. Linear Regression and Model Statistics<br />Forecasting Steps<br />Set an objective<br />Build model<br />Evaluate model<br />Use model<br />Copyright 2010 DeepThought, Inc.<br />4<br />
16. 16. Linear Regression and Model Statistics<br />Objective Setting<br /><ul><li>Simpler is better
17. 17. Linear regression allows to test whether a line fitted to the data works as a model. Objectives should take that principal under consideration
18. 18. Example objectives for M2 Money Stock (see next slide):
19. 19. Test if M2 has a linear trend over time
20. 20. If M2 exhibits a statistically significant trend, review and interpret results
21. 21. If model looks good, create a forecast based off model</li></ul>Copyright 2010 DeepThought, Inc.<br />5<br />
22. 22. Linear Regression and Model Statistics<br />Example: M2 Money Stock<br />Copyright 2010 DeepThought, Inc.<br />6<br />
23. 23. Linear Regression and Model Statistics<br />Method Selection<br /><ul><li>Observe time series qualities: trend, seasonality, cyclicality, and randomness
24. 24. Adjust time frame, units, periods to forecast as needed
25. 25. Determine if linear regression is a possible candidate based on method characteristics
26. 26. Determine if transforming the units will enable use of model
27. 27. Eight different unit transformation techniques</li></ul>Copyright 2010 DeepThought, Inc.<br />7<br />
28. 28. Linear Regression and Model Statistics<br />Build Model<br /><ul><li>Software finds us the best fit line to the data; minimizing the sum of squared errors</li></ul>Copyright 2010 DeepThought, Inc.<br />8<br />
29. 29. Linear Regression and Model Statistics<br />Evaluate Model<br /><ul><li>Descriptive Statistics
30. 30. Mean
31. 31. Variance & Standard Deviation
32. 32. Accuracy / Error
33. 33. SSE
34. 34. RMSE
35. 35. MAPE
37. 37. Statistical Significance
38. 38. F-Test
39. 39. P-Value F-Test</li></ul>Copyright 2010 DeepThought, Inc.<br />9<br />
40. 40. Linear Regression and Model Statistics<br />Descriptive StatisticsMean<br /><ul><li>The average value of the data set</li></ul> ×http://images.google.com/imgres?imgurl=http://www.cs.princeton.edu/introcs/11gaussian/images/stddev.png&imgrefurl=http://www.cs.princeton.edu/introcs/11gaussian/&usg=__7JZMBeSrlQKPfVL2YCVuV8HVXkY=&h=206&w=570&sz=18&hl=en&start=54&um=1&tbnid=5jb7PXr6kgP08M:&tbnh=48&tbnw=134&prev=/images%3Fq%3Dstandard%2Brandom%2Bdistribution%26ndsp%3D18%26hl%3Den%26client%3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official%26hs%3DXpO%26sa%3DN%26start%3D36%26um%3D1<br />Copyright 2010 DeepThought, Inc.<br />10<br />
41. 41. Linear Regression and Model Statistics<br />Variance & Standard Deviation<br /><ul><li>The sum of squared deviations of the data from the mean
42. 42. Estimates the variation the data exhibits from the mean
43. 43. Standard deviation is the squared root of the variance
44. 44. Used to measure the distribution of the variable away from the mean, most observations of the variable will be within ± 3 standard deviations</li></ul>Copyright 2010 DeepThought, Inc.<br />11<br />
45. 45. Linear Regression and Model Statistics<br />M2 Example<br /><ul><li>Mean
46. 46. 4214.38
47. 47. Variance
48. 48. 3346475.10
49. 49. Standard Deviation
50. 50. 1829.34 </li></ul>Copyright 2010 DeepThought, Inc.<br />12<br />
51. 51. Linear Regression and Model Statistics<br />Accuracy/ErrorSSE<br /><ul><li>Sum of Square Errors (SSE)
52. 52. Sums the errors between the actual values and model values
53. 53. Measures the total error of the model
54. 54. M2 Example:
55. 55. SSE: 316778645.89 </li></ul>Copyright 2010 DeepThought, Inc.<br />13<br />
56. 56. Linear Regression and Model Statistics<br />RMSE<br /><ul><li>The square root of the sum of square error divided by the number of observations
57. 57. An averaged out total of errors based upon the number of observations
58. 58. Simple way to compare models based on error
59. 59. M2 Example:
60. 60. RMSE: 456.82 </li></ul>Copyright 2010 DeepThought, Inc.<br />14<br />
61. 61. Linear Regression and Model Statistics<br />MAPE<br /><ul><li>The average percentage error of the model
62. 62. Describes the average percentage of variation exhibited between actual and forecasted values
63. 63. M2 Example:
64. 64. MAPE: 10.09% </li></ul>Copyright 2010 DeepThought, Inc.<br />15<br />
65. 65. Linear Regression and Model Statistics<br />R-Squared & Adjusted R-Squared<br /><ul><li>A proportion between unexplained and explained errors
66. 66. Measures the percentage of variation captured by the model
67. 67. Adjusted R2incorporated the number of variables used and sample size to adjust the R2 value</li></ul>Copyright 2010 DeepThought, Inc.<br />16<br />
68. 68. Linear Regression and Model Statistics<br />M2 Example<br /><ul><li>R2
69. 69. 93.76%
71. 71. 93.76% </li></ul>Copyright 2010 DeepThought, Inc.<br />17<br />
72. 72. Linear Regression and Model Statistics<br />Statistical SignificanceF-Test<br /><ul><li>A proportion between explained and unexplained errors of model
73. 73. Used to test if model build is statistically significant from being equal to zero
74. 74. The larger the F-test the better</li></ul>Copyright 2010 DeepThought, Inc.<br />18<br />
75. 75. Linear Regression and Model Statistics<br /> F-Test P-Value<br /><ul><li>The F-Test P-Value represents</li></ul>the percentage of significance of the F-test (blue area on graph) <br /><ul><li>The higher the value of the F-test the lower the shaded blue area is. As the blue area decreases, confidence about our model being statistically significant increases
76. 76. 1 – p-value = Significance Level of the Model (%)
77. 77. Significance level of the model (%) represents the amount of confidence we have that our model is different from a model with no impact, or zero impact</li></ul>Copyright 2010 DeepThought, Inc.<br />19<br />
78. 78. Linear Regression and Model Statistics<br />M2 Example<br /><ul><li>F-Test
79. 79. 22778.98
80. 80. F-Test P-Value
81. 81. 0.00 </li></ul>Copyright 2010 DeepThought, Inc.<br />20<br />
82. 82. Linear Regression and Model Statistics<br />Compare Multiple Models<br /><ul><li>Skip this step until have knowledge of multiple methods
83. 83. Will use accuracy/error statistics to compare multiple models to find best models</li></ul>Copyright 2010 DeepThought, Inc.<br />21<br />
84. 84. Linear Regression and Model Statistics<br />Use Model<br /><ul><li>Understand limitations of model
85. 85. Only measures a trend
86. 86. A long term average