Class 2024 Friday
Class 2024 Friday
LEBOGO RJ
Why do we need time series?
• Every organization has a need to forecast the
demand for the goods or services it provides.
For many organizations, the ability to forecast
plays a major role in determining the general
success of the organization.
• Forecasters they need tools to assist in
preparing the forecast. This chapter provides
an introduction to several basic forecasting
techniques and illustrates how and when to
apply them.
LEBOGO RJ
Time Series Data
• The concepts of forecasting and planning are often confused.
Planning is the process of determining how to deal with the
future. On the other hand, forecasting is the process of
predicting what the future will be like. Forecasts are used as
inputs for the planning process.
• The two broad categories of forecasting techniques are
qualitative and quantitative. Qualitative forecasting
techniques are based on expert opinion and judgment.
Quantitative forecasting techniques are based on statistical
methods for analyzing quantitative historical data. This
chapter focuses on quantitative forecasting techniques.
LEBOGO RJ
Time Series Data
• All quantitative forecasting models use
past measurements of the variable of
interest to generate a forecast of the
future. The past data, measured over time,
are called time-series data. The decision
maker who plans to develop a quantitative
forecasting model must analyze the
relevant time-series data
LEBOGO RJ
General Forecasting Issues
• Model Specification ( Identification) - The
process of selecting the forecasting
technique to be used in a particular situation.
• Model Building (Fitting)- The process of
estimating the specified model’s parameters
to achieve an adequate fit of the historical
data.
• Model Diagnosis - The process of
determining how well a model fits past data
and how well the model’s assumptions
appear to be satisfied.
LEBOGO RJ
Forecasting Horizon
Forecasting Horizon-The number of future periods covered by a forecast. It is
sometimes referred to as forecast lead time.
Four categories:
LEBOGO RJ
Time series plot (SPSS)
LEBOGO RJ
Sales_quantity
40000
35000
30000
25000
20000
15000
10000
5000
YEARS
Sales_quantity
Component of a time series
• A trend is the long-term increase or decrease in a
variable being measured over time (linear or
nonlinear).
• A seasonal component is a wavelike pattern that is
repeated throughout a time series and has a
recurrence period of at most one year.
• A cyclical component is a wavelike pattern within the
time series that repeats itself throughout the time
series and has a recurrence period of more than one
year.
• A random component: changes in time-series data
that are unpredictable and cannot be associated with a
trend, seasonal, or cyclical component.
LEBOGO RJ
Sales_quantity
LEBOGO RJ
40000
35000
25000
• A smooth or regular underlying
movement of a series over a 20000
changes.
10000
5000
Jan-18
Jan-19
Jan-20
Jan-21
Jan-22
Jan-23
Sep-18
Sep-19
Sep-20
Sep-21
Sep-22
May-18
May-19
May-20
May-21
May-22
YEARS
Sales_quantity
Seasonal variation (S)
• Movement in a time series which recur
year after in some months or quarters with
more less the same intensity.
Sales_quantity
40000
35000
30000
25000
20000
15000
10000
5000
0
YEARS
Sales_quantity
LEBOGO RJ
Cyclical variation (C)
• Period variations extending over a long
period of time.
LEBOGO RJ
Sales_quantity
Irregular 40000
30000
25000
20000
• Variations caused by readily
identifiable special events 15000
such as elections, wars,
floods, earthquakes, 10000
strikes,virus etc.
5000
Jul-18
Jul-19
Jul-20
Jul-21
Jul-22
Jan-18
Jan-19
Jan-20
Jan-21
Jan-22
Jan-23
Oct-18
Oct-19
Oct-20
Oct-21
Oct-22
Apr-18
Apr-19
Apr-20
Apr-21
Apr-22
Apr-23
YEARS
Sales_quantity
LEBOGO RJ
Homework
LEBOGO RJ
Methods for trend isolation
LEBOGO RJ
Seasonal Analysis
• Seasonal analysis isolates the influence of
seasonal forces on a time series. The
ratio-to-moving average method is used to
measure these influences. The seasonal
influence is expressed as an index
number.
LEBOGO RJ
Smoothing methods
Smoothing methods are used to get rid of the
random or irregular component of a time
series.
• Moving averages:
A moving average (ma) of order M is
produced by calculating the average value of
a variable over a set of M values of the
series.
• Running median:
A running median of order M is produced by
calculating the median value of a variable
over a set of M values of the series.
LEBOGO RJ
Moving averages:
LEBOGO RJ
The ratio-to-moving average
method
• Step-1
Identify the trend/cyclical movement.
The moving average approach is used to
isolate the trend/cyclical movement in a time
series.
LEBOGO RJ
Step 2
• Find seasonal ratio using the formula:
𝑎𝑐𝑡𝑢𝑎𝑙 𝑋𝑡
• 𝑠𝑒𝑎𝑠𝑜𝑛𝑎𝑙 𝑟𝑎𝑡io = × 100
𝑚𝑜𝑣𝑖𝑛𝑔 𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑠𝑒𝑟𝑖𝑒𝑠
LEBOGO RJ
Step 3
• Average the seasonal ratios across
corresponding periods within each year.
The averaging of seasonal ratios has the
effect of smoothing out irregular
component inherent in the seasonal ratios.
• Generally, the median is used to find the
average of seasonal ratios for correspond
periods.
LEBOGO RJ
Step 4
• Compute adjusted seasonal indices. The
adjusted factor is determined as follows:
LEBOGO RJ
De-seasonalising the actual time
series
• Seasonal influences may be removed from
a time series by dividing the actual y value
for each period by its corresponding
seasonal index.
𝑎𝑐𝑡𝑢𝑎𝑙 𝑋𝑡
• 𝐷𝑒𝑠𝑒𝑎𝑠𝑜𝑛𝑎𝑙𝑖𝑠𝑒𝑑 𝑋𝑡 = × 100
𝑆𝑒𝑎𝑠𝑜𝑛𝑎𝑙 𝑖𝑛𝑑𝑒𝑥
LEBOGO RJ
Example/homework
• Consider the following quarterly demand levels for electricity (in 1000
megawatts) in Limpopo from 2013 to 2016.
LEBOGO RJ
LEBOGO RJ
Example
LEBOGO RJ
Seasonal ratio
LEBOGO RJ
LEBOGO RJ
Seasonal indices
LEBOGO RJ