An Introduction to Forecasting
Forecasting, the art or science of predicting the future, is used in the decision making process to help business people reach conclusions about buying, selling, producing, hiring and many other actions.
Time-series data are the data gathered on a given characteristic over a period of time at regular intervals. The technique attempts to account for changes over time by examining patterns, cycles or trends or using information about the past period to predict the outcome for a future time period. The methods include averaging, smoothing, regression trend analysis and the decomposition of the possible time-series factors.
Time-Series Components
The time-series data are composed of four elements: trend, cyclicality, seasonality and irregularity. Certainly, not all time-series data have all of these components.
Observe the above figure,
The long-term general direction of data is referred as Trend.
Even though the data moves through upward and downward periods, the general direction or trend is increasing (depicted by the line).
Cycles are patterns of highs and lows through which data moves over time periods usually of more than a year.
We can notice that we have two periods or cycles of highs and lows over a period. Data that do not extend over a long period of time may not have enough history to show cyclical effects.
Seasonal effects are shorter cycles which usually occur in time periods of less than one year. They are often measured by the month or can by quarter or measured in a small time frame like week or a day even!
Irregular fluctuations are rapid changes or bleeps in the data, which occurs in even shorter time frames than seasonal effects. It can often happen as day to day. They are subject to momentary change and are unexplained.
Now, lets observe this figure,
The general trend seem to move downward and contains two cycles.
Time series data that do not shows any trend, cyclical or seasonal effects are said to be Stationary. Techniques used to forecast stationary data analyze only the irregular fluctuation effects.
Measurement of Forecasting Error
To compare the forecasted values with the actual values, we need to determine the amount of Forecasting error.
Several techniques can be used to measure the overall error which includes,
mean error (ME), mean absolute deviation (MAD), mean square error (MSE), mean percentage error (MPE) and mean absolute percentage error (MAPE).
Error : The error of an individual forecast is the difference between the actual value and the forecast of that value.
Mean Absolute Deviation (MAD)
The mean absolute deviation (MAD) is the mean, or average of the absolute value of the errors.
The forecasted errors can either be positive or negative. Taking the summation of the errors is an attempt to compute the overall measure of the error. The positive and negative values in the errors offset each other resulting in an underestimation of the total error. The MAD overcomes the problem by taking the absolute value of the error measurement, thereby analyzing the magnitude of the forecast errors without regard to direction.
Mean Square Error (MSE)
The MSE is another way to circumvent the problem of the cancelling effects of positive and negative forecast errors. The MSE is computed by squaring each error( thus creating a positive number) and averaging the squared errors.
Selection of techniques for computing errors depends upon the forecaster. Different error techniques will yield different information.
In my upcoming blog, I will be discussing more techniques which help in the error estimation of forecasted values.