Professional Documents
Culture Documents
ANALYTICS –
SUPERVISED
Forecasting
• Simple Linear Regression. Multiple Linear Regression - Logistic
Regression
• Time series analysis: Variations in time series - trend analysis, cyclical
variations, seasonal variations and irregular variations, forecasting
errors.
• Using Regression Analysis for Forecasting - Linear Trend Projection -
Holt’s Model –Winter’s Model - Using Regression Analysis as a Causal
Forecasting Method - Combining Causal Variables with Trend and
Seasonality
• Chapter 13 Dinesh Kumar
Process of predicting the future while analyzing the past and present
data.
Examples of Forecasting
• Predicting demand – Inventory Level
• Manpower Planning
• Economic Growth
• Stock Market Prediction
Time Series Analysis
• Time Series Analysis is the way of studying the characteristics of the
response variable with respect to time, as the independent variable.
• Time can be Years, Months, Weeks, Days, Hours, Minutes, and
Seconds
Components of Time Series Analysis
• Trend Component (Tt): Trend is the consistent long-term upward or
downward movement of the data over a period of time.
Components of Time Series Analysis
• Seasonal Component (St): Seasonal component (measured using
seasonality index) is the repetitive upward or downward movement
(or fluctuations) from the trend that occurs within a calendar year
such as seasons, quarters, months, days of the week, etc. For
example, heating demands are high in the winter months, sales are
high in Dec.,
Components of Time Series Analysis
• Cyclical Component (Ct): Cyclical component is fluctuation around the
trend line that happens due to macro-economic changes such as
recession, unemployment, etc. Cyclical fluctuations have repetitive
patterns with a time between repetitions of more than a year.
Component consists of the gradual ups and downs that do not repeat
each year and so are excluded from the seasonal component.
Components of Time Series Analysis
• Irregular Component (It): Irregular component is the white noise or
random uncorrelated changes that follow a normal distribution with
mean value of 0 and constant variance.
• White noise time series is defined by a Zero
mean change over the time, Constant
variance over the time, and Zero Co-
relation over the time.
• Is Mean level Zero?
• Is variance constant ?
• Is no co-relation with lag values?
• Now, the question is – if you want to forecast the stock price for
tomorrow, would you consider yesterday’s value or the price 10 days
ago or last year?
• Alpha Parameter a in the equation above is called the smoothing constant and
its value lies between 0 and 1.
• A smaller value (closer to 0) creates a smoother (slowly changing) line
similar to a moving average with a large number of periods. A high value
for alpha tracks the data more closely by giving more weight to recent
data.
Alpha
• Considerations:
• Start with an alpha between 0.2 and 0.5 and see how it fits your
data. Set it higher to fit changes in the data more closely. Set it
lower to emphasize longer term trend.
• If you have lots of data points. For example, daily data for more
than a year, then consider a lower alpha (even as low as 0.01 or
0.02) to include more of your timeline in the calculation.
Double Exponential Smoothing – Holts
Method
• One of the drawbacks of single exponential smoothing is that the
model does not do well in the presence of trend.
• This can be improved by introducing an additional equation for
capturing the trend in the time-series data.
• Double exponential smoothing uses two equations to forecast the
future values of the time series, one for forecasting the level (short
term average value) and another for capturing the trend.
• Beta
• This numeric value, between 0 and 1, controls the trend
calculation. A smaller value considers longer-term trend and a
larger value focus on shorter-term trend.
• Considerations:
• Start with a beta between 0.2 and 0.5 and see how it fits your
data. Set it higher to reflect short-term trends.
• If you have lots of data points. For example, daily data for more
than a year, then consider a lower beta (even as low as 0.01 or
0.02).
Triple Exponential Smoothing – Holt-
Winter Method
• Moving averaging and single and double exponential smoothing
techniques discussed so far can handle data as long as the data do not
have any seasonal component associated with it. However, when
there is seasonality in the time-series data, techniques such as
moving average, exponential smoothing, and double exponential
smoothing are no longer appropriate.
• Season Periods
• If the cycle is one year and the data is weekly, then the season
period is 52 because there are 52 weeks in the cycle. Another
example is if the “seasonality” is daily and the data is hourly, then
set the Season Periods to 24 because the data cycles every 24
hours.
• Gamma
• Like with Alpha and Beta, this parameter is a numeric value
between 0 and 1. A smaller gamma takes into account a longer
history whereas a bigger gamma gives more weight to the recent
history.
Seasonality
Regression Model for Forecasting
• Linear Regression
• Multiple linear regression models with categorical variables can be
used for time series with seasonality.
• Since the demand is seasonal, the first step in forecasting is to
estimate the seasonality index.
• De-seasonalized data is calculated by dividing the value of Yt with the
corresponding seasonality index.
• Regression output for the de-seasonalized demand
Seasonal indices
• The seasonal index (also called seasonal effect or seasonal
component) is a measure of how a particular season compares on
average to the mean of the cycle.
427+463+484+494 /4 =467
Other Methods
• Auto-regressive (AR),
• Moving Average (MR)
• Auto-regressive and moving average (ARMA)
• Auto-regressive integrated moving average (ARIMA)
Regression Forecasting with Causal Variables
• In many forecasting applications, other independent variables besides
time, such as economic indexes or demographic factors, may
influence the time series.
• For example, a manufacturer of hospital equipment might include
such variables as hospital capital spending and changes in the
proportion of people over the age of 65 in building models to forecast
future sales.
• Explanatory/causal models, often called econometric models,