2 Time Series Analysis and Forecasting
2 Time Series Analysis and Forecasting
FORECASTING
INTRODUCTION TO TIME SERIES ANALYSIS
A time-series is a set of observations on a quantitative variable
collected over time.
Examples
Dow Jones Industrial Averages
Historical data on sales, inventory, customer counts, interest
rates, costs, etc
Businesses are often very interested in forecasting time series
variables.
Often, independent variables are not available to build a
regression model of a time series variable.
In time series analysis, we analyze the past behavior of a
variable in order to predict its future behavior.
COMPONENTS OF TSA
Time Frame (How far can we predict?)
short-term (1 - 2 periods)
medium-term (5 - 10 periods)
long-term (12+ periods)
No line of demarcation
Trend
Gradual, long-term movement (up or down) of demand.
Easiest to detect
COMPONENTS OF TSA (CONT.)
Cycle
An up-and-down repetitive movement in demand.
repeats itself over a long period of time
Seasonal Variation
An up-and-down repetitive movement within a trend occurring periodically.
Often weather related but could be daily or weekly occurrence
Random Variations
Erratic movements that are not predictable because they do not follow a pattern
TIME SERIES PLOT
Actual Sales
$3,000
$2,500
$2,000
Sales (in $1,000s)
$1,500
$1,000
$500
$0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Time Period
COMPONENTS OF TSA (CONT.)
Difficult to forecast demand because...
7
MEASURING ACCURACY
We need a way to compare different time series techniques for a given data set.
4 common techniques are the:
n
Yi Y
mean absolute deviation, MAD = i 1 n
i
100 n Yi Ŷi
mean absolute percent error, MAPE =
n i 1 Yi
the mean square error,
MSE =
n
Yi Y i 2
i 1 n
root mean square error
RMSE MSE
• We will focus on MAPE as it is unit independent