The Analyst’s Toolbox: Time-series forecasting techniques
This article, written by Neil Mason, was originally published on Clickz.com and is republished here with permission.
Over the past few weeks I have been taking a look at various analytical techniques that may be appropriate for understanding more about visitor behaviour than you may find in your average web analytics tool. Many of these techniques like classification and segmentation involve the use of statistical analysis tools. This week I’m going to continue in that vein by taking a look at the subject of forecasting and some of the techniques that be used to assess and understand future trends.
As businesses build up their data trends then the trends become more interesting and useful. One of the problems with a fast growing environment where all the charts are showing lines that go “up and to the right” is that is difficult to know what the underlying trends are and whether marketing activity is having any effect on this growth.
When it comes to forecasting there are two broad categories of forecasting techniques: Quantitative methods and Qualitative methods. The quantitative methods are based on algorithms of varying complexity and qualitative methods are based upon educated guessing.
Quantitative methods of forecasting come in two main types:
- Time-series methods
- Explanatory methods
Time-series methods make their forecasts based purely on the historical patterns in the data that have been observed in the past. Say for example you wanted to make a forecast of visitors to your site over the next few weeks; time-series methods will only use the historical data of visits to your site in the past to make that forecast.
Explanatory methods use other data as inputs into the forecasting data, so in my example above you might include marketing data as inputs into a model to understand how they impact on visit levels and use that data to also make forecasts for the future. These types of techniques have been used for ages in the offline world to evaluate the effect of marketing activity on brand awareness or sales.
Time-series methods are probably the simplest methods to deploy and can be quite accurate, particularly over the short term. Most quantitative forecasting methods look to explain patterns in historical data as a means of then using those patterns to make forecasts for the future.
Simple time-series methods include moving average models. In this case the forecast is the average of the last ‘x’ number of observations, where ‘x’ is some suitable number. For example if you were forecasting monthly sales data you might use a 12 month moving average where the forecast for the next month is the average over the past year.
The trouble is that simple averaging methods don’t tend to work well when there is either a trend in the data or there are seasonal effects. This tends to be the case in a lot of marketing data! In the case, other techniques such as exponential smoothing techniques may be more appropriate.
With moving averages every point in the data carries equal ‘weight’ in making the forecast. With smoothing methods more importance is placed on the most recent data than on the historical data for forecasting. So, if there is a trend in the data then it is going to use the recent observations to make up the bulk of the forecast and the forecast is more likely to reflect the trend.
Moving averages and simple exponential smoothing techniques are available in Excel and so are easy to execute. That’s one of the great advantages of time-series methods, they are generally simple, cheap to run and relatively easy to interpret.
There are more complex time-series techniques out there as well such as ARIMA or Box-Jenkins models. These are more heavy duty statistical routines that can cope with data that have trends and seasonality in them. You would probably need to invest in a statistical analysis package or a dedicated forecasting package to use these more powerful algorithms. Like any analytical technique though, you shouldn’t use them ‘blind’ and treat the results as gospel. In fact, all forecasts are invariably wrong. It’s just a question of how wrong they are!
So why would you use these types of forecasting techniques?
Forecasting techniques are often used as much for their explanatory power as for their predictive power. Understanding the trends and seasonal behaviour of your business gives you a better understanding of the underlying health of the business.
In consumer goods marketing for example, these types of forecasting techniques are often used to assess the “baseline” performance of the brand. A forecast is made of what the sales would have been in the absence of certain types of promotions or advertising, so that the underlying trends can be assessed.
Explanatory forecasting methods take the process a step further and allow you to relate changes in marketing activity to changes in outputs such as sales, brand awareness, registrations and so on. Here we are looking for “causality” and can use that to feed into forecasts but as a way of evaluating marketing response. We’ll take a look at this in more detail next time.
Till then…