HW submission

.docx

School

Georgia Institute Of Technology *

*We aren’t endorsed by this school

Course

6501

Subject

Industrial Engineering

Date

Dec 6, 2023

Type

docx

Pages

5

Uploaded by CaptainCoyoteMaster1037

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? Exponential smoothing could be utilized by any businesses to forecast performances in the short term. Let’s say, I own and operate a bakery, I would like to forecast how many baked goods should be produced each week. We can develop an exponential smoothing model, that takes in number of a given baked good was sold in the past year (per week basis) and be able to forecast out for the next week to determine how much to produce. This exponential smoothing model should consider seasonality as well because some months (like summer) we could see a slowdown in the sale of baked goods compared to other months. I would set closer to 0, because the sales of baked goods could differ day to day or week by week. 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). After reading in the table, I saw that I need to convert it into a time-series data format to conduct the exponential smoothing model. To do this, I first took all the temperature across all years and converted it into a vector. With this vector, I could utilize the ts() function to convert the vector into a time series data format. Code below: ############################################################################## # read in terms.txt table ############################################################################## temps = read.table("temps.txt", stringsAsFactors = FALSE, header = TRUE) head(temps) ############################################################################## # Convert to time series ############################################################################## temps_as_vector = as.vector(unlist(temps[,2:21])) # vector of temperature from 1996-2005 # checking to make sure we have correct number of vectors. (123 records per year * 20 years = 2460)
length(temps_as_vector) temps_as_vector plot(temps_as_vector) # Utilize ts() function to convert the vector into a time series. temps_ts = ts(temps_as_vector, start = 1996, frequency = 123) temps_ts plot(temps_ts) Next, I wanted to visualize the data to show what it looks like. ############################################################################## # visualize the data ############################################################################## # visualize whole time series plot(temps_ts) # visualize one year of data (2012) temps_ts_one_year = ts(temps_as_vector, start = 2012, end = 2013, frequency = 123) temps_ts_one_year plot(temps_ts_one_year)
*Both images visualize the same data Some assumptions, I would like to make about the data based on the visualization, to see if it will match that of the result from exponential smoothing. My assumption of the data is that there is no trend in the data. A trend is described as a long-term change in the level of a time series (overall increase or decrease over a long period of time). I believe there would be some seasonality in the data because we can witness some regular and predictable changes that recur almost every year. There are some years where the pattern can differ, but I believe there would still be seasonality. With my assumptions, I would like to utilize a exponential smoothing model that involves both trend and seasonality. I am going to utilize the HoltWinter() function to run my exponential smoothing, This will be able to debunk my assumptions of the data. Exponential smoothing model code and result below: ################################################################################ # Exponential smoothing model ################################################################################ temps_Expo = HoltWinters(temps_ts, alpha = NULL, beta = NULL,gamma = NULL, seasonal = "multiplicative") temps_Expo summary(temps_Expo) plot(temps_Expo) ################################################################################ # Identify any trends or seasonality ################################################################################ head(temps_Expo$fitted) tail(temps_Expo$fitted)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help