Download presentation
1
Forecasting Chapter 5 OPS 370
In this chapter we’ll examine the important topic of forecasting. Forecasting plays a critical role in just about every business.
2
Forecasting What is Forecasting? Some Thoughts on Forecasts
Determining Future Events Based on Historical Facts and Data Some Thoughts on Forecasts Forecasts Tend to Be Wrong! Forecasts Can Be Biased! (Marketing, Sales, etc.) Forecasts Tend to Be Better for Near Future So, Why Forecast? Better to Have “Educated Guess” About Future Than to Not Forecast At All! Simply put, forecasting is “predicting the future.” More precisely, we are trying to predict the future based upon historical data. It’s important to recognize that almost all forecasts are WRONG! They may not be wrong by much in some cases, but they won’t be perfect. It’s also very possible for someone to inject their bias into a forecast. This is particularly problematic with qualitative forecasts. Forecasts also tend to be better in the short term rather than the long term. It is much easier to predict what will happen tomorrow rather than what will happen one year from now. So why do we forecast at all? It’s better to have a reasonable guess than no guess at all!
3
Examples of “Bad” Forecasts
"I think there is a world market for maybe five computers." – Thomas Watson, IBM (1943) "The Americans have need of the telephone, but we do not. We have plenty of messenger boys.“ – William Preece, British Post Office (1876) "Who the hell wants to hear actors talk?“ – H.M. Warner, Warner Brothers (1927) There are plenty of examples of “bad” forecasts. Here are a few that stand out as REALLY bad. Can you think of any other forecasts that you may have encountered that were especially poor?
4
Total Sales, New Offerings
What to Forecast? Demand for Individual Products & Services Short Term (0-3 Months) Demand for Product & Service Families Medium Term (3 Months – 2 Years) Since it is difficult to forecast too far into the future, we see that “what” we choose to forecast changes based upon the time frame. In the near term we may try to forecast demand for individual products. For example, Apple may try to forecast demand for a particular model of iPhone. In the medium term, we might try to forecast for a product family. For Apple this might be iPhones in general, rather than specific models. In the long term, Apple may group product categories together and may just try to forecast all sales. Total Sales, New Offerings Long Term (>2 Years)
5
How to Forecast? Qualitative Methods Quantitative Methods
Based On Educated Opinion & Judgment (Subjective) Particularly Useful When Lacking Numerical Data (Example: Design and Introduction Phases of a Product’s Life Cycle) Quantitative Methods Based On Data (Objective) There are two main categories of forecasting methods: qualitative and quantitative. Our focus will be on quantitative methods. You should be aware that qualitative methods do exist and are often used when in the absence of data.
6
Quantitative Methods Time Series Popular Forecasting Approach in Operations Management Assumption: “Patterns” That Occurred in the Past Will Continue to Occur In the Future Our quantitative forecast focus will be time series models. These are models where the X variable (variable on the X axis) is time and the Y variable is usually demand or sales or something similar. Time series forecasting is based on the principle that we can identify patterns in historical data and that these patterns will continue into the future.
7
Components of Demand Demand for products or services can consist of one or more patterns: average demand trend seasonal component cyclical component autocorrelation random variation When we look at historical demand data, one of the first things that we must do is try to identify patterns in the data. What patterns we see will guide what techniques that we will utilize to develop forecasts using the data. If there is a mismatch between the patterns in the data and the technique, we will likely develop very poor forecasts. The next slide shows examples of average demand, trend, and seasonality. Random variation is also present. 7
8
Textbook Figure 5.2: Components of Demand
9
This graphic shows demand for champagne (by month) for seven years (84 months). What demand patterns do you see in this data? First of all, there is trend. The trend is positive, meaning that over time, champagne sales are increasing. There is also seasonality. What is driving the seasonality? There is also random variation. It’s pretty safe to say that there is ALWAYS random variation in real-world data!
10
Forecasting Steps Collect Relevant/Reliable Data
Data Collection Collect Relevant/Reliable Data Be Aware of “Garbage-In, Garbage Out” Data Analysis Model Selection So what are the steps that we need to do in order to develop a forecast? We begin collecting data. Hopefully, we have nice clean data that is handed to us in a nice format. However, this is often not how things happen in reality! We should expect to spend as much as 80% of time we spend on forecasting on cleaning data. Monitoring
11
Forecasting Steps Plot the Data Identify Patterns Data Collection
Data Analysis Model Selection We then visualize the data. Humans have a hard time seeing patterns in tabular data, so we’ll plot the data to look for patterns. Monitoring
12
Forecasting Steps Choose Model Appropriate for Data
Data Collection Choose Model Appropriate for Data Consider Complexity Trade-Offs Perform Forecast(s) Select Model Based on Performance Measure(s) Data Analysis Model Selection Based upon the patterns that we found, we then select the appropriate forecasting technique(s) and develop forecasts. The “best” model is then selected based upon some performance measure. Monitoring
13
Track Forecast Performance (Conditions May and Often Do Change)
Forecasting Steps Data Collection Track Forecast Performance (Conditions May and Often Do Change) Data Analysis Model Selection Finally, we monitor the performance of the forecast to make sure that it is doing a good job. If necessary, we’ll make changes to the forecast. Monitoring
14
Time Series Models Basic Time Series Methods Naïve Moving Average
Weighted Moving Average Exponential Smoothing We’ll look at four basic time series models. We won’t go as deep into forecasting techniques as the textbook does.
15
Forecasting Example L&F Bakery has been forecasting by “gut feel.” They would like to use a formal (i.e., quantitative) forecasting technique. As look at the forecasting techniques we’ll consider an example of a bakery. We have six months of historical sales data from the bakery. We trust that the data is “clean” so we can move to visualization. Above is a plot of the sales data over time. What patterns do you see? There is random variation (always is). There’s also trend. The trend is that sales are increasing over time. Is it possible that there is also seasonality? Yes, but we don’t have enough information to be able to tell. For example, if this is a bakery that sells more in the summer than in the other times of the year, we would expect sales to decline after August or so. We should utilize a technique that is well-suited for data with trend. However, let’s use some other methods that may not be so good first just to demonstrate the methods.
16
Forecasting Methods Naïve Forecast for July = Actual for June
Ft+1 = At FJul = AJun = 600 Forecast Very Sensitive to Demand Changes; Good for stable demand The first forecasting technique that we’ll consider is the naïve method. This is the simplest method that we’ll look at it. The basic idea is that what ever happened in the last period is what we will predict to happen in the next period. So if we sold 10 pairs of shoes yesterday, we’ll forecast that we’ll sell 10 pairs of shoes tomorrow. This methods is fine if your data is stable (flat). We wouldn’t want to use this technique on data with trend (like our example) or seasonality. So what’s the forecast for July? The forecast for July by the naïve method is 600. This was the amount of product that we sold in June.
17
Forecasting Methods Naïve (Excel) =C4 =C5
We can easily implement this method in Excel, if desired. You are not responsible for knowing how to implement these methods in Excel, but it is useful to be able to do so. Forecasting - Chapter 4
18
Forecasting Methods Moving Average
Forecast for July = Average of June, May, and April Ft+1 = (At+At-1+…)/n FJul = ( )/3 = 500 Values Equally Weighted; Good for stable demand; Sensitive to fluctuation; Lags Common application: Stock price forecasting A slightly more advanced forecasting method is the moving average. The moving average takes n previous periods of historical data and averages them to generate forecast for the next period. For example, if, in the last two days we sold 10 and18 items, a two day moving average of these values would be ( ) / 2 = 14. For our bakery example, we calculate a three month moving average forecast for July as ( ) / 3 = 500. The moving average forecasting methods works well for relatively stable (flat) data. Like the naïve method, it is sensitive to extreme changes in demand and also lags behind the actual data. We also have the issue of needing to figure out what value of n to use.
19
Moving Averages of TSLA Price
This graphic shows the TSLA (Tesla) stock price for one year. The blue line is the daily closing stock price. The red line is a 10 period (n = 10) moving average, the green line is 50 period (n = 50) moving average, and the pink line is 100 period (n = 100) moving average. Which of these moving averages is better? It looks like the 10 period moving average is better for this data (it won’t necessarily be better for all data). Which of these moving averages is smoother? The 100 period average is smoother as extreme values are averaged out by the other values. So, as we increase the number of periods in the moving average, we expect that the forecast will be more smooth. Moving Averages of TSLA Price
20
Forecasting Methods Moving Average (Excel) =AVERAGE(C4:C6)
We can easily calculate a moving average in Excel as shown above. This is a three period moving average. =AVERAGE(C4:C6) = AVERAGE(C5:C7)
21
Forecasting Methods Moving Average Example Assume n = 2
Let’s take one more look at a moving average example. Work through this example. The solution is on the next slide.
22
Forecasting Methods Moving Average Example Assume n = 2
( )/2 = 150 Let’s take one more look at a moving average example. Notice that we can’t start the two period moving average forecast until Week 3. We start in Week 3 because this is the first week with two periods of preceding data. If we were doing a three period moving average, we would have to wait until Week 4 to start. Note that a one week moving average is equivalent to the naïve method. ( )/2 = 162.5 ( )/2 = 150 ( )/2 = 155
23
Forecasting Methods Weighted Moving Average Ft+1 = (W1At+W2At-1+…)
Assume that W1 = 0.5, W2 =0.3 and W3 = 0.2 FJul = (0.5)(600) + (0.3)(500) + (0.2)(400) = = 530 Typically Gives More Weight to Newer Data Lags; Sensitive A modified version of the moving average is the weighted moving average. In this method we use n periods of data, but the data from these periods is weighted so that more recent data is more important with older data being less important. Weights can be any values, but are typically between 0 and 1 and MUST sum to 1. Weights also typically descend as the data gets older. In the example above, we assume that n = 3 and that the weights are 0.5, 0.3, and 0.2. To calculate the forecast for July, we then do (0.5 * 600) + (0.3 * 500) + (0.2 * 400) = 530. This method is similar to the moving average in that it is sensitive to extreme values. We also have to determine the value for n and for the weights.
24
Forecasting Methods Weighted Moving Average =$G$6*C6+$G$5*C5+$G$4*C4
This method can be implemented in Excel. It’s a bit more tricky than the other methods we’ve seen, but still pretty easy to do.
25
Forecasting Methods Weighted Moving Average Example
Assume n = 2, W1 = 0.7, W2 = 0.3 Here is an additional example of the weighted moving average approach with n = 2 and weights of 0.7 and 0.3. The solution is on the next slide.
26
Forecasting Methods Weighted Moving Average Example
Assume n = 2, W1 = 0.7, W2 = 0.3 (0.7)(175) + (0.3)(125) = 160 (0.7)(150) + (0.3)(175) = 157.5 (0.7)(150) + (0.3)(150) = 150 (0.7)(160) + (0.3)(150) = 157
27
Forecasting Methods Exponential Smoothing General Formula:
Ft+1 = aDt +(1-a)Ft a is a constant between 0 and 1 The next method is called exponential smoothing. This forecasting method requires that we pick a value for alpha, a smoothing constant between 0 and 1 and is unique when compared to the other methods because it includes the previous period’s forecast directly in the forecast calculation for the current period. Our other methods used on historical data.
28
Forecasting Methods Exponential Smoothing Assume that a = 0.3
What is the forecast for July? = a(June Sales) (1-a) (June Forecast) = (0.3)(600) + (1-0.3)(275) = 420 Requires less data; Good for stable data To determine the forecast for July we take June’s sales and multiply by alpha. This is added to one minus alpha times the forecast for June. This method is also good for relatively stable data and requires less data to get started than the moving average and weighted moving average. All we need to get started is one period of demand data and a forecast for that same period. We do need to determine a value for alpha.
29
Forecasting Methods Exponential Smoothing (Excel) Initial forecast
=D4+$G$4*(C4-D4) =D5+$G$4*(C5-D5) The exponential smoothing method can be implemented in Excel. Doing so allows us to easily check different values of alpha to assess forecast quality.
30
Forecasting Methods Exponential Smoothing Example Assume a = 0.4
Need initial forecast; Assume 125 In this example we are given five weeks of data, but no forecasts. We need a forecast for Week 1 to be able to do the exponential smoothing method. There are a variety of ways that are used to develop this initial “forecast.” For this example, we’ll just assume that the initial forecast is the same as Week 1’s demand (125). Work through the example. The solution is on the next slide.
31
Forecasting Methods Exponential Smoothing Example Assume a = 0.4
Need initial forecast; Assume 125 (0.4)(125) + (0.6)(125) = 125 (0.4)(175) + (0.6)(125) = 145 (0.4)(150) + (0.6)(145) = 147 (0.4)(150) + (0.6)(147) = 148.2 (0.4)(160) + (0.6)(148.2) = 152.9
32
Forecasting Methods How to Select Value of a?
Alpha determine importance of recent forecast results in new forecasts Small alpha Less importance on recent results (Good for products with stable demand) Large alpha Recent forecast results more important (Good for product with varying demands) Here are a few notes on the selection of alpha.
33
Determining Forecast Quality
How Well Did a Forecast Perform? Determine Forecast Error Error = Actual Demand – Forecasted Demand We’ve discussed four forecasting techniques so far, but haven’t really addressed whether or not any of the techniques are actually any good. An initial guess we might to determine forecast quality is to just look at forecast error. We define forecast error as the demand (or sales or whatever it is we are trying to forecast) minus our forecast. We can calculate this value for each period of our forecast. We could then do something like take the average error or maybe just the sum of the errors. Are there any flaws with these ideas? The main problem is that we’ll find that positive and negative errors can cancel each other out. This makes our average error or sum of errors look better than it is. So we’ll need to do something else.
34
Determining Forecast Quality
Better Measures: Mean Absolute Deviation Mean Squared Error Mean Absolute Percentage Error Here we look at three forecast quality measures. Mean absolute deviation is calculated finding each forecast error, taking absolute values of each of these errors, and then finding the average of these. By taking the absolute values, we get around the problem of positive and negative errors cancelling out. Mean squared error accomplishes the same thing by squaring the errors instead of taking the absolute value. Mean absolute percentage error looks at the relative “size” of error by taking the absolute value of each error and dividing it by its corresponding demand. These percentage errors are then averaged.
35
Determining Forecast Quality
Month Actual ES Error |Error| Error2 Abs %Error Jan (1) 200 200.0 Feb (2) 300 100 33.3 Mar (3) 230.0 -30 30 900.0 15.0 Apr (4) 400 221.0 179 44.8 May (5) 500 274.7 225.3 45.1 Jun (6) 600 342.3 257.71 43.0 Jul (7) - 419.6 SUMs 792.0 181.1 Averages 158.4 36.2 Here are the results of the MAD, MSE, and MAPE calculations for our bakery example. One BIG note. I have excluded the January error of zero from each of the calculations. I did this because we “made up” the forecast for January and artificially chose it to be 200. If we left this error in, the MAD, MSE, and MAPE values would be artificially lowered. Is this a good forecast? I would say “Probably not.” The errors are large relative to the demands (see MAPE). Also note that the errors are almost all positive. Only in March do we see a negative. If most of your errors are positive or most are negative this implies that the forecast is biased. I’ve plotted the sales and forecasts on the next slide. MAD MAPE MSE
36
Determining Forecast Quality
Notice that the Forecast is almost always below the Sales values.
37
Determining Forecast Quality
For this MA(2) forecast. What is MAD, MSE, and MAPE? This example shows a two week moving average forecast. Determine MAD, MSE, and MAPE. You’ll do this for Weeks 3, 4, and 5 only. Why do we exclude Weeks 1, 2, and 6? Remember that we need both a Demand and Forecast to calculate error. We don’t have one of these in those weeks so we exclude them from the error calculations. The solution is on the next slide.
38
Determining Forecast Quality
For this MA(2) forecast. What is MAD, MSE, and MAPE? Here is the solution. MAD MAPE MSE
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.