Time Series Analysis and Forecasting
By: Tanoy Saha
Tags: Decision Making, Data Science, Time Series Analysis, Time Series Forecasting

REVENUE MANAGEMENT AT HARRAH’S

CHEROKEE CASINO & HOTEL

Real applications of forecasting are almost never done in isolation. They are typically one part — a crucial part — of an overall quantitative solution to a business problem. This is certainly the case at Harrah’s Cherokee Casino & Hotel in North Carolina, as explained in an article by Metters et al. (2008). This particular casino uses revenue management (RM) on a daily basis to increase its revenue from its gambling customers. As customers call to request reservations at the casino’s hotel, the essential problem is to decide which reservations to accept and which to deny.

The overall RM solution includes

· Data collection and customer segmentation · Forecasting demand for reservations from each customer segment · A linear programming (LP) optimization model that is run frequently to decide which reservations to accept · A customer relationship management model to entice loyal customers to book rooms on nights with lower demand

So if we want to forecast data Winters’ exponential smoothing model is a good technique for forecasting. Specifically, the model uses the large volume of historical data to forecast customer demand by each customer segment for any particular night in the future. These forecasts include information about time-related or seasonal patterns (weekends are busier, for example) and any special events that are scheduled.

1. Introduction

Many decision-making applications depend on a forecast of some quantity. Here are several examples.

· When a service organization, such as a fast-food restaurant, plans its staffing over some time period, it must forecast the customer demand as a function of time. This might be done at a very detailed level, such as the demand in successive 15-minute periods, or at a more aggregate level, such as the demand in successive weeks. · When a company plans its ordering or production schedule for a product it sells to the public, it must forecast the customer demand for this product so that it can stock appropriate quantities — neither too many nor too few. · When an organization plans to invest in stocks, bonds, or other financial instruments, it typically attempts to forecast movements in stock prices and interest rates. · When government officials plan policy, they attempt to forecast movements in macroeconomic variables such as inflation, interest rates, and unemployment.

2. Forecasting Methods

The forecasting methods can generally be divided into three groups:

· Judgmental Methods · Extrapolation or Time Series Methods · Econometric Methods

The first of these is basically non- quantitative and will not be discussed here. The last two are quantitative. In this section we describe extrapolation and econometric methods in some generality.

2.1 Extrapolation or Time-Series Methods

Extrapolation methods are quantitative methods that use past data of a time series variable — and nothing else, except possibly time itself — to forecast future values of the variable.

The idea is that past movements of a variable, such as company sales or U.S. exports to Japan, can be used to forecast future values of the variable.

Many extrapolation methods are available, including trend-based regression, auto-regression, moving averages, and exponential smoothing.

2.2 Econometric Methods

Econometric models, also called causal or regression-based models, use regression to forecast a time series variable by using other explanatory time series variables. For example, a company might use a causal model to regress future sales on its advertising level.

Suppose a company wants to use a regression model to forecast its monthly sales for some product, using two other time series variables as predictors: its monthly advertising levels for the product and its main competitor’s monthly advertising levels for a competing product. The resulting regression equation has the form

Predicted Yt = a + b1* X1t + b2 * X2t

Here, Yt is the company’s sales in month t1 and X1t and X2t are, respectively, the company’s and the competitor’s advertising levels in month t.

There is an issue in regression model, the above model predicts company sales for the current month.

Do sales this month depend only on advertising levels this month, as specified in Equation, or also on advertising levels in the previous month, the previous two months, and so on?

Answer is No.

There is another issue called correlation, means two advertising variables X1t and X2t are correlated.

These are difficult issues, and the way in which they are addressed can make a big difference in the usefulness of the regression model. We will examine several regressions based models here.

3. Components of Time Series Data

· Trend Component

If the observations increase or decrease regularly through time, we say that the time series has a trend.

(a) Linear Trend

The linear trend in occurs if a company’s sales increase by the same amount from period to period.

(b) Exponential Trend

It occurs in a business such as the personal computer business, where sales have increased at a tremendous rate.

(c) S-Shaped Trend

This type of trend is appropriate for a new product that takes a while to catch on, then exhibits a rapid increase in sales as the public becomes aware of it, and finally tapers off to a fairly constant level because of market saturation.

· Seasonal Component

Many time series have a seasonal component. For example, a company’s sales of swimming pool equipment increase every spring, then stay relatively high during the summer, and then drop off until next spring, at which time the yearly pattern repeats itself. An important aspect of the seasonal component is that it tends to be predictable from one year to the next.

· Cyclic Component

The third component of a time series is the cyclic component. For example, during a recession housing starts generally go down, unemployment goes up, stock prices go down, and so on. But when the recession is over, all of these variables tend to move in the opposite direction. Unfortunately, the cyclic component is more difficult to predict than the seasonal component.

4. Measurement of Accuracy

Mean Absolute Error:

In statistics, mean absolute error (MAE) is a measure of difference between two continuous variables.

The mean absolute error is an average of the absolute errors where yi is the predicted value and xi is the true value.

Root Mean Square Error:

RMSE is similar to a standard deviation in that the errors are squared; because of the square root, it is in the same units as those of the forecast variable.

Mean Absolute Percentage Error:

It is the percentage of the absolute error.

where At is the actual value and Ft is the forecast value.

5. Regression-Based Trend Models

Linear Trend:

A linear trend means that the time series variable changes by a constant amount each time period.

Linear Trend Equation:

Yt = a + bt + et

Here a is the intercept, b is the slope and et is the error term.

The interpretation of b is that it represents the expected change in the series from one period to the next. If b is positive, the trend is upward; if b is negative, the trend is downward.

The population graph from January 1952 to October 2009 (in thousands) in below Figure indicates a clear upward trend with little or no curvature.

Therefore, it’s a linear trend.

The regression equation after calculation is:

Forecast Population = 157003.69 + 211.55 * Time

This equation implies that the population tends to increase by 211.55 thousand per month.

Exponential Trend:

In contrast to a linear trend, an exponential trend is appropriate when the time series changes by a constant percentage (as opposed to a constant dollar amount) each period.

Then the appropriate regression equation is, where c and b are constants, and et represents a multiplicative error term.

Yt = c * e^bt * et

The above equation is useful for understanding how an exponential trend works, as we will discuss, but it is not useful for estimation. For that, a linear equation is required.

The equivalent linear trend equation is equation:

Ln(Yt) = a + bt + et

For Example, Given quarterly sales data (in millions of dollars) for a large PC device manufacturer from the first quarter of 1995 through the fourth quarter of 2009. Are the company’s sales growing exponentially through this entire period?

We first estimate and interpret an exponential trend for the years 1995 through 2005. Then we see how well the projection of this trend into the future fits the data after 2005.

For example,

The forecast of the second quarter of 2006 is

Forecast Sales in Q2–06 = 61.376 * e^0.0663(46) = 1295.72

6. Moving Average Forecast Method

The simplest and one of the most frequently used extrapolation methods is the moving averages method.

A moving average is the average of the observations in the past few periods, where the number of terms in the average is the span.

Procedure Step:

To implement this method, you first choose a span, the number of terms in each moving average.

Let’s say the data are monthly and you choose a span of six months. Then the forecast of next month’s value is the average of the values of the last six months.

For example, you average January to June to forecast July, you average February to July to forecast August, and so on. This procedure is the reason for the term moving averages.

Consider Quarterly sales of Data and taking span of last 3 quarters:

The forecast sales for Q4–95 is Average of last 3 quarters as span is 3 and so-on.

Q4–95 = (61.14 + 64.07 + 66.18) / 3 = 63.80 Q4–96 = (64.07 + 66.18 + 72.76) / 3 = 67.67 Forecast of Q1–98 is Q1–98 = (154.67 + 157.41 + 147.16) / 3 = 153.08

Now calculating the measure of accuracy of the given dataset.

Now,

Mean Absolute Percentage Error (MAPE) = Average (Absolute Percentage Error) = 16.92

The percentage error is 16.92 % which is nor good or nor bad. By increasing the span for 3 to 4 and above we can bring the error percentage close to 0.

7. Exponential Smoothing Forecast Method

There are two possible criticisms of the moving averages method.

· It puts equal weights on each value in a typical moving average. if next month’s forecast is to be based on the previous 12 months’ observations, more weight should be placed on the more recent observations. · The moving averages method requires a lot of data storage. If 12-month moving averages are used for 1000 items, then 12,000 values are needed for next month’s forecasts.

Exponential smoothing is a method that addresses both of these criticisms. It bases its forecasts on a weighted average of past observations, with more weight on the more recent observations, and it requires very little data storage.

Simple Exponential Smoothing

a = Smoothing Constant between 0 and 1 Lt = Level of the series at time t Yt = Current observation Ft+k = Forecast at time t

Let us consider the previous example Quarterly sales of Data taking Alpha (a) as 0.3:

The forecast sales for Q1–98 is Level of previous time. Q1–98 = Lt = 136.7129

Now calculating the measure of accuracy of the given dataset.

Now,

Mean Absolute Percentage Error (MAPE) = Average (Absolute Percentage Error) = 13.86

The percentage error is 13.86 % which is nor good or nor bad. By increasing the value of alpha we can minimize the MAPE. It’s better to keep the alpha values minimum 0.1 to 0.3.

8. Holt’s Model for Trend

The simple exponential smoothing model generally works well if there is no obvious trend in the series. But if there is a trend, this method consistently lags behind it. For example, if the series is constantly increasing, simple exponential smoothing forecasts will be consistently low. Holt’s method rectifies this by dealing with trend explicitly.

In addition to the level of the series, Lt, Holt’s method includes a trend term, Tt, and a corresponding smoothing constant.

a, b = Smoothing Constant between 0 and 1 Lt = Level of the series at time t Tt = Trend in the series at time t Yt = Current observation Ft = Forecast at time t k= k-period ahead forecast

Let us consider the example House sales of Data taking Alpha (a) and Beta (b) as 0.2:

The forecast house sold for Mar-91, Apr-91, May-91 is: Mar-91= Lt-1 + k* Tt-1 = 417.20 + 1*3.24= 420.45 Apr-91= Lt-1 + k* Tt-1 = 437.76 + 1*6.71= 444.46 May-91= Lt-1 + k* Tt-1 = 457.17 + 1*9.25= 466.42

— — — — — — — — — — — — — —

Now till Dec-91 we have predict. Next we will predict Jan-92 and Feb-92 from Dec-91.

Jan-92= Lt-1 + kTt-1 = 352.20 + 1*2.12= 354.32 , for k=1 Feb-92= Lt-1 + kTt-1 = 352.20 + 2*2.12= 356.44, for k=2( k-period ahead of forecast)

Now,

Mean Absolute Percentage Error (MAPE) = Average (Absolute Percentage Error) = 5.944

The percentage error is 5.944 % which is nor good or nor bad.

9. Seasonal Models

So far, we have said practically nothing about seasonality. Seasonality is the consistent month-to- month (or quarter-to-quarter) differences that occur each year. (It could also be the day-today differences that occur each week.)

For Example:

· There is seasonality in beer sales — high in the summer months, lower in other months. · Toy sales are also seasonal, with a huge peak in the months preceding Christmas.

Basically, there are three methods for dealing with seasonality.

1. Winters’ exponential smoothing model 2. De-seasonalize and Re-seasonalize 3. Multiple Regression

Winter’s Exponential Smoothing Model

It is very similar to Holt’s model but again it has level and trend terms and corresponding smoothing constants a and b but it also has seasonal indexes and a corresponding smoothing constant g (gamma). This new smoothing constant controls how quickly the method reacts to observed changes in the seasonality pattern.

St = Seasonal Index for time t M= Number of seasons (M = 4 for quarterly data, M = 12 for monthly data)

Let us consider an example Soft Drink Sales Data Alpha (a) 1.0 and Beta (b) and (g) (Gamma) as 0.0:

The data represent quarterly sales (in millions of dollars) for a large soft drink company from quarter 1 of 1994 through quarter 4 of 2009.

The forecast house sold for Q1–2008 is k=1: F(t+k) = (Lt + k* Tt) S(t + k-M) F(15+1) = (L15 + 1 * T15) S(15+1-4) = (5224.0 + 1 * 56.65) 0.88 = 4646.972 For Q2–2008, k=2 F(15+2) = (L15 + 2 * T15) S(15+2–4) = (5224.0 + 2 * 56.65) 1.1 = 5871.03

Now,

Mean Absolute Percentage Error (MAPE) = Average (Absolute Percentage Error) = 6.55

The percentage error is 6.55 % which is nor good or nor bad.

Conclusion:

By various means of methods we can solve the time series problem.