Session 12 - Time Series and Forecasting (GbA) PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 84

M Tech(Data Science & Engineering)

Introduction to Statistical Methods

BITS Pilani Prof.Gangaboraiah PhD, Bangalore


Bangalore Campus
BITS Pilani

Session No. 12
Time Series and Forecasting Models
Time Series and Forecasting

Prof.Gangaboraiah PhD (Stats) | Slide 3 | Former Professor of Statistics, KIMS, B’lore


Agenda
• Identify Principles of Forecasting
• Explain the steps in the forecasting process
• Identify types of forecasting methods and their
characteristics
• Describe time series and causal models

Prof.Gangaboraiah PhD (Stats) | Slide 4 | Former Professor of Statistics, KIMS, B’lore


Agenda
• Generate forecasts for data with different
patterns: level, trend, seasonality, and cyclical
• Describe causal modeling using linear
regression
• Compute forecast accuracy
• Explain how forecasting models should be
selected

Prof.Gangaboraiah PhD (Stats) | Slide 5 | Former Professor of Statistics, KIMS, B’lore


Definition of Forecasting
Forecasting is the process of making
predictions of the future based on past
and present data and most commonly by
analysis of trends. A commonplace example
might be estimation of some variable of
interest at some specified future date.

Prof.Gangaboraiah PhD (Stats) | Slide 6 | Former Professor of Statistics, KIMS, B’lore


Definition of Forecasting
Forecasting is required in many situations:
(a) deciding whether to build another power
generation plant in the next five years
requires forecasts of future demand
(b) scheduling staff in a call centre next
week requires forecasts of call volumes
(c) stocking an inventory requires forecasts
of stock requirements.
Prof.Gangaboraiah PhD (Stats) | Slide 7 | Former Professor of Statistics, KIMS, B’lore
Definition of Forecasting
Forecasts can be required several years in
advance (for the case of capital investments),
or only a few minutes beforehand (for
telecommunication routing).
Whatever the circumstances or time horizons
involved, forecasting is an important aid to
effective and efficient planning.
Prof.Gangaboraiah PhD (Stats) | Slide 8 | Former Professor of Statistics, KIMS, B’lore
Definition of Forecasting
• Some things are easier to forecast than
others. The time of the sunrise tomorrow
morning can be forecast precisely. On the
other hand, tomorrow’s lotto numbers
cannot be forecast with any accuracy. The
predictability of an event or a quantity
depends on several factors including:

Prof.Gangaboraiah PhD (Stats) | Slide 9 | Former Professor of Statistics, KIMS, B’lore


Definition of Forecasting
• how well we understand the factors that
contribute to it;
• how much data is available;
• whether the forecasts can affect the thing
we are trying to forecast.

Prof.Gangaboraiah PhD (Stats) | Slide 10 | Former Professor of Statistics, KIMS, B’lore


Definition of Forecasting
• For example, forecasts of electricity demand
can be highly accurate because all three
conditions are usually satisfied. We have a
good idea of the contributing factors:
electricity demand is driven largely by
temperatures, with smaller effects for
calendar variation such as holidays, and
economic conditions.
Prof.Gangaboraiah PhD (Stats) | Slide 11 | Former Professor of Statistics, KIMS, B’lore
Definition of Forecasting
• Provided there is a sufficient history of data
on electricity demand and weather
conditions, and we have the skills to develop
a good model linking electricity demand and
the key driver variables, the forecasts can
be remarkably accurate.

Prof.Gangaboraiah PhD (Stats) | Slide 12 | Former Professor of Statistics, KIMS, B’lore


Definition of Forecasting
• On the other hand, when forecasting
currency exchange rates, only one of the
conditions is satisfied: there is plenty of
available data. However, we have a limited
understanding of the factors that affect
exchange rates, and forecasts of the
exchange rate have a direct effect on the
rates themselves.
Prof.Gangaboraiah PhD (Stats) | Slide 13 | Former Professor of Statistics, KIMS, B’lore
Definition of Forecasting
• If there are well-publicised forecasts that the
exchange rate will increase, then people will
immediately adjust the price they are willing
to pay and so the forecasts are self-fulfilling.
In a sense, the exchange rates become their
own forecasts. This is an example of the
“efficient market hypothesis”.

Prof.Gangaboraiah PhD (Stats) | Slide 14 | Former Professor of Statistics, KIMS, B’lore


Definition of Forecasting
• Consequently, forecasting whether the
exchange rate will rise or fall tomorrow is
about as predictable as forecasting whether a
tossed coin will come down as a head or a tail.
In both situations, you will be correct about
50% of the time, whatever you forecast. In
situations like this, forecasters need to be
aware of their own limitations, and not claim
more than is possible.
Prof.Gangaboraiah PhD (Stats) | Slide 15 | Former Professor of Statistics, KIMS, B’lore
Forecasting, Planning & Goals
Forecasting:
is about predicting the future as accurately as
possible, given all of the information available,
including historical data and knowledge of any
future events that might impact the forecasts

Prof.Gangaboraiah PhD (Stats) | Slide 16 | Former Professor of Statistics, KIMS, B’lore


Forecasting, Planning & Goals
Goals:
are what you would like to have happen.
Goals should be linked to forecasts and
plans, but this does not always occur. Too
often, goals are set without any plan for how
to achieve them, and no forecasts for whether
they are realistic.

Prof.Gangaboraiah PhD (Stats) | Slide 17 | Former Professor of Statistics, KIMS, B’lore


Forecasting, Planning & Goals
Planning:
is a response to forecasts and goals.
Planning involves determining the appropriate
actions that are required to make your
forecasts match your goals.

Prof.Gangaboraiah PhD (Stats) | Slide 18 | Former Professor of Statistics, KIMS, B’lore


Principles of Forecasting
There are many types of forecasting models.
They differ in their degree of complexity, the
amount of data they use, and the way they
generate the forecast. However, some
features are common to all forecasting
models. They include the following:

Prof.Gangaboraiah PhD (Stats) | Slide 19 | Former Professor of Statistics, KIMS, B’lore


Principles of Forecasting
Forecasts are rarely perfect.
Forecasting the future involves uncertainty.
Therefore, it is almost impossible to make a
perfect prediction. Forecasters know that they
have to live with a certain amount of error,
which is the difference between what is
forecast and what actually happens. The goal
of forecasting is to generate good forecasts on
the average over time and to keep forecast
errors as low as possible
Prof.Gangaboraiah PhD (Stats) | Slide 20 | Former Professor of Statistics, KIMS, B’lore
Principles of Forecasting
Forecasts are more accurate for groups or
families of items rather than for individual
items.
When items are grouped together, their
individual high and low values can cancel
each other out. The data for a group of items
can be stable even when individual items in
the group are very unstable.
Prof.Gangaboraiah PhD (Stats) | Slide 21 | Former Professor of Statistics, KIMS, B’lore
Principles of Forecasting
Consequently, one can obtain a higher degree
of accuracy when forecasting for a group of
items rather than for individual items.
For example, you cannot expect the same
degree of accuracy if you are forecasting
sales of long-sleeved hunter green polo
shirts that you can expect when forecasting
sales of all polo shirts.
Prof.Gangaboraiah PhD (Stats) | Slide 22 | Former Professor of Statistics, KIMS, B’lore
Principles of Forecasting
Forecasts are more accurate for shorter
than longer time horizons.
The shorter the time horizon of the forecast,
the lower the degree of uncertainty.

Prof.Gangaboraiah PhD (Stats) | Slide 23 | Former Professor of Statistics, KIMS, B’lore


Forecasting Timeframe
Forecasting should be an integral part of the
decision-making activities of management,
as it can play an important role in many
areas of a company. Modern organisations
require short-term, medium-term and long-
term forecasts, depending on the specific
application.

Prof.Gangaboraiah PhD (Stats) | Slide 24 | Former Professor of Statistics, KIMS, B’lore


Forecasting Timeframe
Short-term Forecasts
Short-term forecasts generally involve some
form of scheduling which may include for
example the seasons of the year for planning
purposes.
The cyclical and seasonal factors are more
important in these situations.

Prof.Gangaboraiah PhD (Stats) | Slide 25 | Former Professor of Statistics, KIMS, B’lore


Forecasting Timeframe
Short-term Forecasts
Such forecasts are usually prepared every 6
months or on a more frequent basis.
These forecasts are needed for the scheduling
of personnel, production and transportation. As
part of the scheduling process, forecasts of
demand are often also required.

Prof.Gangaboraiah PhD (Stats) | Slide 26 | Former Professor of Statistics, KIMS, B’lore


Forecasting Timeframe
Short-term Forecasts
Some airport operators undertake ‘ultra short
term’ forecasts for (e.g.) the next month in order
to provide for specific requirement such as
adequate staffing in the peaks.

Prof.Gangaboraiah PhD (Stats) | Slide 27 | Former Professor of Statistics, KIMS, B’lore


Forecasting Timeframe
Medium-term Forecasts
Medium-term forecasts are generally prepared
for planning, scheduling, budgeting and
resource requirements purposes.
Medium-term forecasts are needed to
determine future resource requirements, in
order to purchase raw materials, hire
personnel, or buy machinery and equipment.
Prof.Gangaboraiah PhD (Stats) | Slide 28 | Former Professor of Statistics, KIMS, B’lore
Forecasting Timeframe
Medium-term Forecasts
The trend factor, as well as the cyclical
component, plays a key role in the medium-
term forecast as the year to year variations
in traffic growth are an important element in
the planning process

Prof.Gangaboraiah PhD (Stats) | Slide 29 | Former Professor of Statistics, KIMS, B’lore


Forecasting Timeframe
Long-term Forecasts
Long-term forecasts are used mostly in
connection with strategic planning to determine
the level and direction of capital expenditures and
to decide on ways in which goals can be
accomplished.
The trend element generally dominates long term
situations and must be considered in the
determination of any long-run decisions.
Prof.Gangaboraiah PhD (Stats) | Slide 30 | Former Professor of Statistics, KIMS, B’lore
Forecasting Timeframe
Long-term Forecasts
The methods generally found to be most
appropriate in long-term situations are
econometric analysis and life-cycle analysis.
Long-term forecasts are used in strategic
planning. Such decisions must take account of
market opportunities, environmental factors
and internal resources.
Prof.Gangaboraiah PhD (Stats) | Slide 31 | Former Professor of Statistics, KIMS, B’lore
Forecasting Timeframe
Long-term Forecasts
It is also important that since the time span of
the forecast horizon is long, forecasts should
be calibrated and revised at periodic intervals
(every two or three years depending on the
situation).

Prof.Gangaboraiah PhD (Stats) | Slide 32 | Former Professor of Statistics, KIMS, B’lore


Case studies
Case 1
The client was a large company manufacturing disposable tableware such as napkins and paper plates.
They needed forecasts of each of hundreds of items every month. The time series data showed a range
of patterns, some with trends, some seasonal, and some with neither. At the time, they were using their
own software, written in-house, but it often produced forecasts that did not seem sensible. The methods
that were being used were the following:
average of the last 12 months data;
average of the last 6 months data;
prediction from a straight line regression over the last 12 months;
prediction from a straight line regression over the last 6 months;
prediction obtained by a straight line through the last observation with slope equal to the average slope
of the lines connecting last year’s and this year’s values;
prediction obtained by a straight line through the last observation with slope equal to the average slope
of the lines connecting last year’s and this year’s values, where the average is taken only over the last 6
months.
They required us to tell them what was going wrong and to modify the software to provide more
accurate forecasts. The software was written in COBOL, making it difficult to do any sophisticated
numerical computation.

Prof.Gangaboraiah PhD (Stats) | Slide 33 | Former Professor of Statistics, KIMS, B’lore


Case studies
Case 2
In this case, the client was the Australian federal government, who needed to forecast the
annual budget for the Pharmaceutical Benefit Scheme (PBS). The PBS provides a subsidy for
many pharmaceutical products sold in Australia, and the expenditure depends on what people
purchase during the year. The total expenditure was around A$7 billion in 2009, and had been
underestimated by nearly $1 billion in each of the two years before we were asked to assist in
developing a more accurate forecasting approach.
In order to forecast the total expenditure, it is necessary to forecast the sales volumes of
hundreds of groups of pharmaceutical products using monthly data. Almost all of the groups
have trends and seasonal patterns. The sales volumes for many groups have sudden jumps up
or down due to changes in what drugs are subsidised. The expenditures for many groups also
have sudden changes due to cheaper competitor drugs becoming available.
Thus we needed to find a forecasting method that allowed for trend and seasonality if they
were present, and at the same time was robust to sudden changes in the underlying patterns. It
also needed to be able to be applied automatically to a large number of time series.

Prof.Gangaboraiah PhD (Stats) | Slide 34 | Former Professor of Statistics, KIMS, B’lore


Case studies
Case 3
A large car fleet company asked us to help them forecast vehicle re-sale values. They purchase new vehicles,
lease them out for three years, and then sell them. Better forecasts of vehicle sales values would mean better
control of profits; understanding what affects resale values may allow leasing and sales policies to be developed in
order to maximise profits.
At the time, the resale values were being forecast by a group of specialists. Unfortunately, they saw any statistical
model as a threat to their jobs, and were uncooperative in providing information. Nevertheless, the company
provided a large amount of data on previous vehicles and their eventual resale values.
Case 4
In this project, we needed to develop a model for forecasting weekly air passenger traffic on major domestic routes
for one of Australia’s leading airlines. The company required forecasts of passenger numbers for each major
domestic route and for each class of passenger (economy class, business class and first class). The company
provided weekly traffic data from the previous six years.
Air passenger numbers are affected by school holidays, major sporting events, advertising campaigns, competition
behaviour, etc. School holidays often do not coincide in different Australian cities, and sporting events sometimes
move from one city to another. During the period of the historical data, there was a major pilots’ strike during which
there was no traffic for several months. A new cut-price airline also launched and folded. Towards the end of the
historical data, the airline had trialled a redistribution of some economy class seats to business class, and some
business class seats to first class. After several months, however, the seat classifications reverted to the original
distribution.

Prof.Gangaboraiah PhD (Stats) | Slide 35 | Former Professor of Statistics, KIMS, B’lore


The basic steps in a forecasting task
Step 1: Problem definition
Often this is the most difficult part of forecasting.
Defining the problem carefully requires an
understanding of the way the forecasts will be used,
who requires the forecasts, and how the forecasting
function fits within the organisation requiring the
forecasts. A forecaster needs to spend time talking to
everyone who will be involved in collecting data,
maintaining databases, and using the forecasts for
future planning.
Prof.Gangaboraiah PhD (Stats) | Slide 36 | Former Professor of Statistics, KIMS, B’lore
The basic steps in a forecasting task
Step 2: Gathering information
There are always at least two kinds of information required: (a)
statistical data, and (b) the accumulated expertise of the people
who collect the data and use the forecasts. Often, it will be
difficult to obtain enough historical data to be able to fit a good
statistical model. In that case, the judgmental forecasting
methods of can be used. Occasionally, old data will be less
useful due to structural changes in the system being forecast;
then we may choose to use only the most recent data. However,
remember that good statistical models will handle evolutionary
changes in the system; don’t throw away good data
unnecessarily.
Prof.Gangaboraiah PhD (Stats) | Slide 37 | Former Professor of Statistics, KIMS, B’lore
The basic steps in a forecasting task
Step 3: Preliminary (exploratory) analysis
Always start by graphing the data. Are there
consistent patterns? Is there a significant trend? Is
seasonality important? Is there evidence of the
presence of business cycles? Are there any outliers in
the data that need to be explained by those with
expert knowledge? How strong are the relationships
among the variables available for analysis? Various
tools have been developed to help with this analysis.

Prof.Gangaboraiah PhD (Stats) | Slide 38 | Former Professor of Statistics, KIMS, B’lore


The basic steps in a forecasting task
Step 4: Choosing and fitting models
The best model to use depends on the availability of
historical data, the strength of relationships between the
forecast variable and any explanatory variables, and the
way in which the forecasts are to be used. It is common
to compare two or three potential models. Each model is
itself an artificial construct that is based on a set of
assumptions (explicit and implicit) and usually involves
one or more parameters which must be estimated using
the known historical data.
Prof.Gangaboraiah PhD (Stats) | Slide 39 | Former Professor of Statistics, KIMS, B’lore
The basic steps in a forecasting task
Step 4: Choosing and fitting models
Some of the common models used for forecast are
regression models, exponential smoothing
methods, Box-Jenkins ARIMA models, Dynamic
regression models, Hierarchical forecasting, and
several advanced methods like neural networks
and vector auto-regression.

Prof.Gangaboraiah PhD (Stats) | Slide 40 | Former Professor of Statistics, KIMS, B’lore


The basic steps in a forecasting task
Step 5: Using and evaluating a forecasting
model
Once a model has been selected and its
parameters estimated, the model is used to make
forecasts. The performance of the model can only
be properly evaluated after the data for the forecast
period have become available. A number of
methods have been developed to help in assessing
the accuracy of forecasts.
Prof.Gangaboraiah PhD (Stats) | Slide 41 | Former Professor of Statistics, KIMS, B’lore
The basic steps in a forecasting task
Step 5: Using and evaluating a forecasting
model
There are also organisational issues in using and
acting on the forecasts. When using a forecasting
model in practice, numerous practical issues arise
such as how to handle missing values and outliers,
or how to deal with short time series.

Prof.Gangaboraiah PhD (Stats) | Slide 42 | Former Professor of Statistics, KIMS, B’lore


Types of Forecasting Methods
Forecasting Methods

Qualitative Quantitative

• Personal Opinion or
Time Series Causal
Judgment
• Panel consensus
• Delphi Method • Smoothing methods • Regression Trend
• Market Research • Exponential Analysis
smoothing
• Trend projection
method

Prof.Gangaboraiah PhD (Stats) | Slide 43 | Former Professor of Statistics, KIMS, B’lore


Qualitative Forecasting
• Personal Opinion
– Individuals forecasts future based on their
own judgment or opinion without any formal
model
– Such assessments are relatively reliable and
accurate

Prof.Gangaboraiah PhD (Stats) | Slide 44 | Former Professor of Statistics, KIMS, B’lore


Qualitative Forecasting
• Panel consensus
– Reduces the prejudice and ignorance that
may arise in the individual judgment
– Possible to develop consensus among group
of individuals
– Panel of individuals are encouraged to share
information, opinions, and assumptions, if
any, to predict future value of some variable
under study
Prof.Gangaboraiah PhD (Stats) | Slide 45 | Former Professor of Statistics, KIMS, B’lore
Qualitative Forecasting
Delphi Method
The Delphi method was invented by Olaf
Helmer and Norman Dalkey of the Rand
Corporation in the 1950s for the purpose of
addressing a specific military problem. The
method relies on the key assumption that
forecasts from a group are generally more
accurate than those from individuals.
Prof.Gangaboraiah PhD (Stats) | Slide 46 | Former Professor of Statistics, KIMS, B’lore
Qualitative Forecasting
Delphi Method
The aim of the Delphi method is to construct
consensus forecasts from a group of experts in
a structured iterative manner. A facilitator is
appointed in order to implement and manage
the process. The Delphi method generally
involves the following stages:

Prof.Gangaboraiah PhD (Stats) | Slide 47 | Former Professor of Statistics, KIMS, B’lore


Qualitative Forecasting
Delphi Method
• A panel of experts is assembled.
• Forecasting tasks/challenges are set and
distributed to the experts.
• Experts return initial forecasts and
justifications. These are compiled and
summarised in order to provide feedback.
Prof.Gangaboraiah PhD (Stats) | Slide 48 | Former Professor of Statistics, KIMS, B’lore
Qualitative Forecasting
Delphi Method
• Feedback is provided to the experts, who now
review their forecasts in light of the feedback.
This step may be iterated until a satisfactory
level of consensus is reached.
• Final forecasts are constructed by
aggregating the experts’ forecasts.

Prof.Gangaboraiah PhD (Stats) | Slide 49 | Former Professor of Statistics, KIMS, B’lore


Qualitative Forecasting
Delphi Method
• Each stage of the Delphi method comes with
its own challenges. In what follows, we
provide some suggestions and discussions
about each one of these.

Prof.Gangaboraiah PhD (Stats) | Slide 50 | Former Professor of Statistics, KIMS, B’lore


Qualitative Forecasting
• Market Research Method
– This method is used to collect based on well-
defined objectives and assumptions about
future value of variable.
– Questionnaire is used to gather data and
prepared summary of responses.
– This method produces a narrow range of
forecasts rather than a single view of future.

Prof.Gangaboraiah PhD (Stats) | Slide 51 | Former Professor of Statistics, KIMS, B’lore


Qualitative Methods
Type Characteristics Strengths Weaknesses
Executive A group of managers Good for strategic or One person's opinion
opinion meet & come up with new-product can dominate the
a forecast forecasting forecast

Market Uses surveys & Good determinant of It can be difficult to


research interviews to identify customer preferences develop a good
customer preferences questionnaire

Delphi Seeks to develop a Excellent for Time consuming to


method consensus among a forecasting long-term develop
group of experts product demand,
technological
changes, and
Prof.Gangaboraiah PhD (Stats) | Slide 52 | Former Professor of Statistics, KIMS, B’lore
Quantitative Forecasting
• Time Series Models:
–Assumes information needed to generate a
forecast is contained in a time series of data
–Assumes the future will follow same patterns as
the past
• Causal Models or Associative Models
–Explores cause-and-effect relationships
–Uses leading indicators to predict the future
• Eg. Housing starts and appliance sales
Prof.Gangaboraiah PhD (Stats) | Slide 53 | Former Professor of Statistics, KIMS, B’lore
Time series
• Time Series Models:
– A time series is a set of observations xt , each one
being recorded at a specific time t. A discrete-time time
series is one in which the set T0 of times at which
observations are made is a discrete set, as is the case,
for example, when observations are made at fixed time
intervals.
– Continuous - time time series are obtained when
observations are recorded continuously over some time
interval, e.g., when T0 [0, 1].
Prof.Gangaboraiah PhD (Stats) | Slide 54 | Former Professor of Statistics, KIMS, B’lore
Decomposition Models
This is an important technique for all types
of time series analysis, especially for seasonal
adjustment. It seeks to construct, from an
observed time series, a number of component
series (that could be used to reconstruct the
original by additions or multiplications) where
each of these has a certain characteristic or type
of behaviour. For example, time series are
usually decomposed into:
Prof.Gangaboraiah PhD (Stats) | Slide 55 | Former Professor of Statistics, KIMS, B’lore
Decomposition Models
Tt: the trend component at time t, which reflects the
long-term progression of the series (secular
variation). A trend exists when there is a persistent
increasing or decreasing direction in the data. The
trend component does not have to be linear
Ct: the cyclical component at time t, which reflects
repeated but non-periodic fluctuations. The duration
of these fluctuations is usually of at least two years
Prof.Gangaboraiah PhD (Stats) | Slide 56 | Former Professor of Statistics, KIMS, B’lore
Decomposition Models
St: the seasonal component at time t,
reflecting seasonality (seasonal variation). A
seasonal pattern exists when a time series is
influenced by seasonal factors. Seasonality
occurs over a fixed and known period (e.g., the
quarter of the year, the month, or day of the
week)

Prof.Gangaboraiah PhD (Stats) | Slide 57 | Former Professor of Statistics, KIMS, B’lore


Decomposition Models
It: the irregular component (or "noise") at
time t, which describes random, irregular
influences. It represents the residuals or
remainder of the time series after the other
components have been removed.

Prof.Gangaboraiah PhD (Stats) | Slide 58 | Former Professor of Statistics, KIMS, B’lore


Decomposition Models
Hence a time series using an additive model
can be thought of as:
yt = Tt + Ct + St + It
Where as the multiplicative model can be
thought of as:
yt = Tt x Ct x St x It
Prof.Gangaboraiah PhD (Stats) | Slide 59 | Former Professor of Statistics, KIMS, B’lore
Decomposition Models
An additive model would be used when the
variations around the trend do not vary with the
level of the time series whereas a multiplicative
model would be appropriate if the trend is
proportional to the level of the time series.

Prof.Gangaboraiah PhD (Stats) | Slide 60 | Former Professor of Statistics, KIMS, B’lore


Decomposition Models
Sometimes the trend and cyclical components are
grouped into one, called the trend-cycle component. The
trend-cycle component can just be referred to as the
"trend" component, even though it may contain cyclical
behaviour. For example, a seasonal decomposition of
time series plot decomposes a time series into seasonal,
trend and irregular components using loess and plots the
components separately, whereby the cyclical component
(if present in the data) is included in the "trend"
component plot.
Prof.Gangaboraiah PhD (Stats) | Slide 61 | Former Professor of Statistics, KIMS, B’lore
Decomposition Models
Sometimes the trend and cyclical components
are grouped into one, called the trend-cycle
component. The trend-cycle component can
just be referred to as the "trend" component,
even though it may contain cyclical
behaviour. For example, a seasonal
decomposition of time series plot decomposes
a time series into seasonal, trend and irregular
components
Prof.Gangaboraiah using
PhD (Stats) | Slide 62 loess and plots
| Former the
Professor of Statistics, KIMS, B’lore
Time series
The Trend Component
The overall pattern in the
plot of the time series is
called the trend
component. If a series Most time series have
shows no particular trend an increasing (see
over time and has a figure) or decreasing
relatively consistent trend with other
mean, it is said to be fluctuations around the
stationary in the mean. trend.
Prof.Gangaboraiah PhD (Stats) | Slide 63 | Former Professor of Statistics, KIMS, B’lore
Time Series Components

Trend Cyclical

Seasonal Irregular

Prof.Gangaboraiah PhD (Stats) | Slide 64 | Former Professor of Statistics, KIMS, B’lore


Time Series Components
Trend:
– Sometimes Times Series displays a steady
tendency of either upward or downward
movement in the average value of the forecast
variable y over time. Such a tendency is called a
Trend. When observations are plotted against
time a straight line describes the increase or
decrease in the time series over a period of time

Prof.Gangaboraiah PhD (Stats) | Slide 65 | Former Professor of Statistics, KIMS, B’lore


Time Series graphs
The first thing to do in any data analysis task is to plot
the data. Graphs enable many features of the data to
be visualised, including patterns, unusual observations,
changes over time, and relationships between
variables. The features that are seen in plots of the
data must then be incorporated, as much as possible,
into the forecasting methods to be used. Just as the
type of data determines what forecasting method to
use, it also determines what graphs are appropriate.
Prof.Gangaboraiah PhD (Stats) | Slide 66 | Former Professor of Statistics, KIMS, B’lore
Time Series Components
Trend:
• Persistent, overall Response
upward or
downward pattern
• Due to population,
Mo., Qtr., Yr.
technology etc.
• Several years
duration
Prof.Gangaboraiah PhD (Stats) | Slide 67 | Former Professor of Statistics, KIMS, B’lore
Time Series Components
• Persistent, overall upward or downward pattern
• Due to population, technology etc.
• Several years duration
y

Time

Prof.Gangaboraiah PhD (Stats) | Slide 68 | Former Professor of Statistics, KIMS, B’lore


Time Series Components
Cyclical Component
Regular cycles in the data with periods longer
than one year are referred to as cyclical
components.
When a cyclical component can be related to a
predictable phenomenon, then it can be
modeled based on some regular behavior and
added to whatever model is being built for the
time series.
Prof.Gangaboraiah PhD (Stats) | Slide 69 | Former Professor of Statistics, KIMS, B’lore
Time Series Components
Cyclical:
– An upward or downward movement in the
variable value about the trend time over a
period of time are called cycles. A cycle may
vary in length, usually more than a year but less
that 5-7 years. The movement is through four
phases: from peak (prosperity) to contradiction
(recession) to trough (depression) to expansion
(recovery or growth).
Prof.Gangaboraiah PhD (Stats) | Slide 70 | Former Professor of Statistics, KIMS, B’lore
Time Series Components
Graph showing cycles Cyclical variation:
y A variation in
which the value of
the variable
fluctuates above
and below a trend
line and lasting
more than one
year.
Time

Prof.Gangaboraiah PhD (Stats) | Slide 71 | Former Professor of Statistics, KIMS, B’lore


Time Series Components
Cyclical:
• Repeating up & down
movements Cycle
Response
• Due to interactions of
factors influencing
economy Mo., Qtr., Yr.

• Usually 2-10 years


duration

Prof.Gangaboraiah PhD (Stats) | Slide 72 | Former Professor of Statistics, KIMS, B’lore


Time Series Components
• Upward or Downward Swings
• May Vary in Length
• Usually Lasts 2 - 10 Years
y

Time
Prof.Gangaboraiah PhD (Stats) | Slide 73 | Former Professor of Statistics, KIMS, B’lore
Time Series Components
The Seasonal Component
The seasonal
component of a time
series is the part of the
variation that fluctuates
in a way that is roughly
stable over time with
respect to timing,
direction, and
Note that the first point in each set
magnitude. of four points is consistently higher
in the time series plot above.
Prof.Gangaboraiah PhD (Stats) | Slide 74 | Former Professor of Statistics, KIMS, B’lore
Time Series Components
The Seasonal Component
The seasonal
component of a time
series is the part of the
variation that fluctuates
in a way that is roughly
stable over time with
respect to timing, Note that the first point in each set
direction, and
of four points is consistently higher
magnitude.
in the time series plot above.
Prof.Gangaboraiah PhD (Stats) | Slide 75 | Former Professor of Statistics, KIMS, B’lore
Time Series Components
The Seasonal Component
A deseasonalized, or seasonally adjusted
series is one from which the seasonal
component has been removed.
The time between peaks of a seasonal
component is referred to as the period.

Prof.Gangaboraiah PhD (Stats) | Slide 76 | Former Professor of Statistics, KIMS, B’lore


Time Series Components
Seasonal:
– It is a special case of cyclical component in
which fluctuations are repeated usually
within a year (eg., daily, weekly, monthly,
quarterly) with a high degree of regularity.
• Eg., Average sales of a retail store may
increase greatly during festival

Prof.Gangaboraiah PhD (Stats) | Slide 77 | Former Professor of Statistics, KIMS, B’lore


Time Series Components
Seasonal:
• Regular pattern of up Summer
& down fluctuations Response © 1984-1994 T/Mak

• Due to weather,
customs etc.
• Occurs within one Mo., Qtr.

year
Prof.Gangaboraiah PhD (Stats) | Slide 78 | Former Professor of Statistics, KIMS, B’lore
Time Series Components
Seasonal: y

• Upward or
Downward Swings © 1984-1994 T/Mak

• Regular Patterns
• Observed Within
One Year
Time (Monthly or Quarterly)

Prof.Gangaboraiah PhD (Stats) | Slide 79 | Former Professor of Statistics, KIMS, B’lore


Time Series Components
Irregular:
– Rapid changes or bleeps in the data
caused by short term unanticipated and
non-recurring factors. Irregular fluctuations
can happen as often as day to day.

Prof.Gangaboraiah PhD (Stats) | Slide 80 | Former Professor of Statistics, KIMS, B’lore


Time Series Components
Irregular Component
In time series modeling, the residuals – the part of the data
not fit by the model – are call the irregular component.
Typically the variability of the irregular component is of
interest – whether the variability changes over time or
whether there are any outliers or spikes that may deserve
special attention.
A time series that has a relatively constant variance is said
to be stationary in the variance.
Prof.Gangaboraiah PhD (Stats) | Slide 81 | Former Professor of Statistics, KIMS, B’lore
Time Series Components
Irregular:
• Erratic, unsystematic, ‘residual’
fluctuations © 1984-1994 T/Maker Co.

• Due to random variation or unforeseen


events
–Union strike
–War
• Short duration & nonrepeating
Prof.Gangaboraiah PhD (Stats) | Slide 82 | Former Professor of Statistics, KIMS, B’lore
Reference
• Peter J Brockwell and Richard A Davis.
Introduction to Time Series and Forecasting,
2/e, Springer
• Douglas C. Montgomery, and Cheryl L.
Jennings, Murat Kulahcin. Introduction to Time
Series Analysis and Forecasting, 2/e, Wiley

Prof.Gangaboraiah PhD (Stats) | Slide 83 | Former Professor of Statistics, KIMS, B’lore


Prof.Gangaboraiah PhD (Stats) | Slide 84 | Former Professor of Statistics, KIMS, B’lore

You might also like