Homework 4 PDF

Title Homework 4
Author Sergio Santoyo
Course Analytic models
Institution Georgia Institute of Technology
Pages 6
File Size 660.9 KB
File Type PDF
Total Downloads 12
Total Views 146

Summary

Homework number 4...


Description

Question 7.2 Using the 20 years of daily high temperature data for Atlanta (July through October) from Question 6.2 (file temps.txt  ), build and use an exponential smoothing model to help make a judgment of whether the unofficial end of summer has gotten later over the 20 years. (Part of the point of this assignment is for you to think about how you might use exponential smoothing to answer this question. Feel free to combine it with other models if you’d like to. There’s certainly more than one reasonable approach.) Note: in R, you can use either HoltWinters   (simpler to use) or the smooth   package’s es   function (harder to use, but more general). If you use es  , the Holt-Winters model uses model=”AAM”   in the function call (the first and second constants are used “A”dditively, and the third (seasonality) is used “M”ultiplicatively; the documentation doesn’t make that clear).

To answer that question many approaches can be taken, for simplicity and to try out another package I decided to perform the analysis using statsmodels for Python 3.6 First we read the data and visualize some information:

To assess if the unofficial summer end has gotten late over the pass of time we can use exponential smoothing models to test a hypothesis:

Fitting in total 4 models:

Exponential Smoothing Models Table 2014 Model

Additive Seasonality

Alpha = 0.818

2015 Model

Multiplicative Seasonality

Alpha = 0.564

1996 Model

Additive Seasonality

Alpha = 0.186

1997 Model

Multiplicative Seasonality

Alpha = 0.005

The hypothesis is that if the unofficial summer end has gotten late over the last 20 years, the most “recent” models will be able to represent this pattern. If we look at the four forecasts for the last weeks of summer, when the temperature starts cooling off, the 1997 and 1996 models should forecast lower temperatures EARLIER than 2014 and 2015 models. This is not a definitive or bulletproof approach, but a good experiment and analysis to try out the hypothesis. Plotting the 1996, 1997, 2014 and 2015 data we see:

The inflection point looks pretty much in the sample place with 20 yrs of difference regardless. Let’s load and fit the Holt-Winters Exponential smoothing Models from Statsmodels: https://www.statsmodels.org/stable/generated/statsmodels.tsa.holtwinters.ExponentialS moothing.html#statsmodels.tsa.holtwinters.ExponentialSmoothing Fitting 2014 and 2015 models:

In the figure above we see that the multiplicative seasonality model (the 2015 model) forecasts lower temperatures starting September and is closer to the real data points. Fitting 1996 and 1997 models:

In the figure above for the 2014 and 2015 models it looks like both models have adjusted well to the data and in overall their forecasts are more spread out (temperature variance is higher than the more recent 2014 and 2015 models). Let’s look at all 4 forecasts.

It looks like overall the hypothesis is FALSE, more 1996 and 1997 models do not forecast lower temperatures earlier or later than more recent 2014 and 2015 models. However it is interesting to note that OVERALL more recent models forecast more “stable” or less volatile temperatures overall (temp values are not as spread out as 1996 and 1997 models forecast). Also, it is important to mention the role of the values of alpha associated with each model. In the r ed model (the 2014 model) alpha is closer to 1 so less randomness is expected in the model, but it doesn’t forecast adequate temperatures for the unoficial summer end. In the green model (the 2015 model) alpha is around 0.5 and seems to produce less volatile forecasts.

Question 7.1 Describe a situation or problem from your job, everyday life, current events, etc., for which exponential smoothing would be appropriate. What data would you need? Would you expect the value of α ( the first smoothing parameter) to be closer to 0 or 1, and why?

In current events an exponential smoothing model could be used to forecast covid contagion per geography to have an expected value or detect possible changes in the trends. A good value for alpha could be something in between 0 and 1, since it’s a new disease and new mutations are being detected. The inclusion of some randomness into the model could be useful to be sensible enough to forecast a single week in advance by looking at previous data points....


Similar Free PDFs