Time Series Analysis & OLS


The most wide spread application of OLS method of regression analysis is in time series analysis. Here, the two variables are a dimension and measure and essentially the analysis focuses on comparing the measure against itself, but in a different instance.

  • Exploratory/Descriptive Context
    • What is the sales for today vs yesterday vs day before
    • What is the stock price for ACME today vs last month vs last year
  • Predictive Context
    • Based on historical sales, how does the next month sales look like
    • Based on historical sales, will sales meet target
Simple OLS Regression. Actual and Predicted values.

Since “Time” is linear in nature, the past is used to predict future. OLS regression is a quick and dirty method and its simple nature of showing output (i.e. line equation y=mx+c) is easy to comprehend and visualize. Historical measure values do not change and the accuracy of predicted variable i.e. measure is good.

Aggregated Data Using OLS regression technique on aggregated data will have impact on prediction accuracy. The time window for analyzing Monthly Sales vs Quarterly Sales for 3 years will have 36 and 12 data points respectively. The outcome predicted values will change based on the context and will not reconcile.

OLS Monthly vs Quarterly Comparison

Outliers It is a well known fact that Outliers sway the results of predictive outcome. In time series analysis, outliers must not be ignored as they represent an actual data point. Equation will have a different slope and intercept if outliers are ignored and accuracy of prediction will diminish.

Seasonality/Randomness While making prediction, the randomness of measure warrants attention because many factors influence day to day decision and events. Consider scenario of sales over 365 year period, which will have multiple spikes and falls. OLS does not strive to find any patterns or prediction, but in turn normalizes all peaks and valleys by first aggregating the data and then computing mean.

Single vs Multiple Measures Predicting a single measure versus multiple measures against time uses the same set of principle to derive the prediction equation. The context of analysis in such scenarios are more than just prediction of outcome, but include inter relationships between the measures. (Will address this as separate article)

In general, OLS on time series analysis data can be used as a general tool to see an overall trend at a high level and then diverge into more specialized methods of analysis.

Be the first to comment

Leave a Reply

Your email address will not be published.