The document discusses various time series forecasting models that can be used to predict the number of nurses needed each quarter in a hospital's surgical division. It provides historical data on the number of nurses needed from 1997 to 1999. The document then demonstrates forecasts for 2000 using three different models: 1) a 3-period simple moving average, 2) exponential smoothing with alpha=0.2, and 3) a linear trend model that incorporates both trend and seasonality. The linear trend model is found to have the lowest mean squared error and mean absolute deviation, indicating it provides the most accurate forecasts.
1. Chapter 7: Forecasting
Time Series Models
Lan Wang
CSU East Bay
Some Time Series Terms
Stationary Data - a time series variable exhibiting no significant
upward or downward trend over time.
Moving average
Exponential smoothing
Some Time Series Terms
Nonstationary Data - a time series variable exhibiting a
significant upward or downward trend over time.
Regression analysis
Some Time Series Terms
Seasonal Data - a time series variable exhibiting a repeating
patterns at regular intervals over time.
Seasonal index
Simple Moving Average
Average random fluctuations in a time series to infer short-term
changes in direction
2. Assumption: future observations will be similar to recent past
Moving average for next period = average of most recent k
observations
Moving Average Example
The monthly sales for Telco Batteries, Inc. were as
follows:MONTHSALESFebruary21March15April14May13June1
6July18August20
a. Calculate a 3 month moving average forecast for September
b. Calculate a 2 month moving average forecast for September
c. Which moving average forecast is more accurate?
Moving Average Example
Error Metrics and Forecast Accuracy
Mean absolute deviation (MAD)
Mean square error (MSE)
Mean absolute percentage error (MAPE)
The quality of a forecast depends on how accurate it is in
3. predicting future values of a time series.
8
Telco Batteries Example - continued
Exponential Smoothing
Exponential smoothing model:
Ft+1 = (1 – a )Ft + aAt
= Ft + a (At – Ft )
Ft+1 is the forecast for time period t+1,
Ft is the forecast for period t,
At is the observed value in period t, and
a is a constant between 0 and 1, called the smoothing constant.
Highly effective approach.
10
Exponential Smoothing
The monthly sales for Telco Batteries, Inc. were as
follows:MONTHSALESFebruary21March15April14May13June1
6July18August20
a. Calculate an Exponential Smoothing forecast with alpha =
0.2, for September
b. Calculate an Exponential Smoothing forecast with alpha =
0.3, for September
c. Which Exponential Smoothing forecast is more accurate?
Exponential Smoothing Example -
ContinuedalphaMonthSales0.20.3AD(0.2)AD(0.3)SE(0.2)SE(0.3
)APE(0.2)APE(0.3)February212121March1521216.006.0036.00
36.000.400.40April1419.8019.205.805.2033.6427.040.410.37Ma
y1318.6417.645.644.6431.8121.530.430.36June1617.5116.251.5
4. 10.252.290.060.090.02July1817.2116.170.791.830.623.340.040.
10August2017.3716.722.633.286.9310.750.130.16September17.
8917.71MAD3.733.53MSE18.5516.45MAPE0.250.23
AD - Absolute Deviation SE Squared error
APE - Absolute Percentage Error
Practice
Attendance in each time period. Please forecast the attendance
using exponential smoothing (alpha=0.4 and 0.6).
Use MAD, MSE as guidance, find the better alpha setting for
each forecasting model.
Trend Models
Trend is the long-term sweep or general direction of movement
in a time series.
We’ll now consider some nonstationary time series techniques
that are appropriate for data exhibiting upward or downward
trends.
An Example
WaterCraft Inc. is a manufacturer of personal water crafts (also
known as jet skis).
The company has enjoyed a fairly steady growth in sales of its
products.
The officers of the company are preparing sales and
manufacturing plans for the coming year.
Forecasts are needed of the level of sales that the company
expects to achieve each quarter.
Forecasting Models With Linear Trends
Double Moving Average
Double Exponential Smoothing
Based on the linear trend equation (simple linear regression
with time as the independent variable.
5. Autoregressive models
Linear Trend Model ExampleQuarterGuests (in
thousands)Winter 200373Spring 2003104Summer 2003168Fall
200374Winter 200465Spring 200482Summer 2004124Fall
200452Winter 200589Spring 2005146Summer 2005205Fall
200598
Attendance at Orlando’s newest Disneylike attraction, Vacation
World, are as shown in the table
Develop a regression equation that models the trend in the data.
Calculate the attendance forecast for year 2006 using the
regression equation developed.
Model with Trend & Seasonality
Seasonality is a regular, repeating pattern in time series data.
May be additive or multiplicative in nature…
Multiplicative time series model is commonly used as shown
below:
Y = T*S
where Y = actual value of time series
T = trend component
S = seasonal component
The goal of the time series decomposition method is to identify
the values of components of a time series (trend, cyclical,
seasonal, irregular), and use these components for forecasting
re-composition of the model.
6. Seasonal Index ExampleQuarterGuests (in thousands)Winter
200373Spring 2003104Summer 2003168Fall 200374Winter
200465Spring 200482Summer 2004124Fall 200452Winter
200589Spring 2005146Summer 2005205Fall 200598
Attendance at Orlando’s newest Disneylike attraction, Vacation
World, are as shown in the table
Compute the seasonal index using the data
Calculate the seasonal forecast for the year 2006.
Get the linear trends in 2006
Methods available
1. Use excel function
=Tend(Ys, Xs, Period No.)
See Disney.xls
2. Run regression to read intercept and coefficient.
3. Fit a trend line while plotting out the data
Y=3.87X+81.49
Then, compute Seasonal Indices
200320042005Quarter AverageSeasonally
IndexWinter73658975.66670.7094Spring10482146110.66671.03
75Summer168124205165.66671.5531Fall74529874.66670.7000
106.6667
Finally, get the Forecasts
Forecast = Linear Trend * Corresponding Seasonal Index
E. g., in fall 2003, or 4th period, the average index for fall is
0.7, S4=0.7;
the linear trend for 4th period is : L4=2.87*4+81.49=97
7. Therefore, F4=L4*S4=97*0.7=68
Final Case Study
Forecasting in Hospital Example
Forecasting in Hospital
The number of nurses needed in Hayward Hospital’s surgical
division varies from quarter to quarter. This variation causes the
hospital difficulty in hiring and scheduling nurses in the
surgical division. It seems to the operations manager at the
hospital that there are always either too many nurses or not
enough nurses scheduled to do the work in the surgical divan
from quarter to quarter. Furthermore, nurses cannot be shifted
to and from other departments due to the special surgical
training required in the wing and because of an understanding
with the nurses union. If too many nurses are scheduled, the
salary expense and fringe benefits are too high and personnel
problems seem to increase. On the other hand, if too few are
scheduled overtime must be worked, increasing overhead costs
and angering doctors.
The operations staff has been using a simple rule to schedule
nurses. The average of the number of nurses needed in the past
four quarters is the number scheduled to work next quarter. The
operations manager wonders if there is a better way to forecast
the number of nurses needed. She has had an operations analyst
prepare historical data for the past three years with the number
of nurses needed in the surgical division:
Forecasting in Hospital
Year
57. Number of Nurses
Sheet1YearQuarterPeriodNumber of
Nurses1996I114II210III36IV4141997I516II614III711IV812199
8I915II1013III1110IV1218
Sheet1000000000000
Number of Nurses
Time Period
Number of Nurses
Sheet2
Sheet3
Year
Quarter
Period
# of
nurses
MA(
3
)
Forecast
Error
Errors
2
Absolute
deviation
1997
I
81. IV 8 12
1999 I 9 15
II 10 13
III 11 10
IV 12 18
Average 6.5 12.75
Total 78 153
Year
Quarter
Period (X)
# of Nurses (Y)
1997
I
1
14
II
2
10
III
3
6
IV
4
14
1998
I
5
16
II
6
14
93. 15.51
QUESTION 1 :
Time-series models ________.
a. are also known as judgmental forecasting models
b. assume that forecasts are seldom developed by extrapolating
historical data into the future
c. assume that whatever forces have influenced sales in the
recent past will continue into the near future
d. include independent variables like, demand conditions and
the current economy state that help in forecasting
QUESTION 2
Which of the following uses a panel of experts, whose identities
are typically kept confidential from one another, to respond to a
sequence of questionnaires?
a. the Simple Exponential Smoothing method
b. the method of Historical Analogy
c. the Simple Moving average method
d. the Delphi method of forecasting
QUESTION 3
In the context of time series, a cyclical effect differs from a
seasonal effect in that the cyclical effect ________.
a. does not show a gradual shift in the time series
b. relates to much shorter-term behavior
c. relates to much longer-term behavior
d. shows a gradual shift in the time series
QUESTION 4
What is the gradual shift in the value of the time series known
as?
a. a smoothing constant
b. a coordinate
c. a weight
94. d. a trend
QUESTION 5
week
Units sold
1
44
2
22
3
27
4
33
5
36
6
43
The sales details for 6 weeks of a particular type of switches,
called the "Twitch," are shown in the table below. Use moving
average method. The value of k is set at 2.
For the data given above, the forecast for week 5 is ________.
a. 30 units
b. 35 units
c. 25 units
d. 33 units
QUESTION 6
Using the given data in previous question, calculate the value of
the mean absolute deviation.
a. 7.25
b. 21.10
c. 9.36
d. 54.13
QUESTION 7
Using the given data, determine the value of the mean square
error.
a. 21.10
95. b. 54.13
c. 7.25
d. 9.36
QUESTION 8
The table below shows the car sales from the year 2002-2007.
The forecaster assumes a smoothing constant of 0.8 and uses the
exponential smoothing model to determine the forecast for the
future.
Year
Cars Sold (in 000s)
2002
66
2003
33
2004
41
2005
49
2006
54
2007
65
From the data given above, the forecast for the year 2005 (in
000s) is ________.
a. 39.60 units
b. 52.67 units
c. 40.72 units
d. 47.34 units
QUESTION 9
From the data given above, the sales forecast for the year 2008
(in 000s) is ________.
a. 52.67 units
b. 62.53 units
c. 40.72 units
96. d. 47.34 units
QUESTION 10
Using the given data, determine the value of the mean absolute
deviation.
a. 15.03
b. 12.33
c. 25.27
d. 225.98