Forecasting

Statistical Techniques in Tableau

Maarten Van den Broeck

Content Developer at DataCamp

Correlation vs. autocorrelation

Worldwide google search for "DIY" from 2013 tot 2021, by month, in % of interest. A third degree polynomial trend line tries to capture the overall trend but misses the recurring patterns.

Worldwide google search for "DIY" from 2013 tot 2021, by month, in % of interest. The yearly recurring patterns is highlighted.

Statistical Techniques in Tableau

Correlation vs. autocorrelation

Worldwide google search for "DIY" from 2013 tot 2021, by month, in % of interest.

  • Autocorrelation: repeating pattern correlates with itself
  • Time series: a value measured repeatedly over time, in discrete time-intervals
  • Time series analysis: general term for analysis on time series
Statistical Techniques in Tableau

Forecasting

Worldwide google search for "DIY" from 2013 tot 2021, by month, in % of interest, now with a 23 month forecast.

  • Predictions about the future based on historical data
  • Estimation: probability where future data points will fall, using confidence intervals
  • Used in
    • supply chain management
    • earthquakes
    • hormone levels
    • market stocks
    • sports performance
    • weather
Statistical Techniques in Tableau

Naive forecast

$F_{t+1} = A_{t}$

Month $_t$ Actual $A$ Forecast $F$
January 5
February 7 5
March 6 7
April 5 6
May 3 5
June 8 3
July 2 8
August 2

Naive forecast of sample data.

  • Useful for benchmarking
Statistical Techniques in Tableau

Exponential smoothing

$F_{t+1} = F_t + \alpha(A_{t}-F_t)$

Month $_t$ Actual $A$ Forecast $F$
January 5 5
February 7 5
March 6 4,6
April 5 4,32
May 3 4,184
June 8 4,4208
July 2 3,70496
August 5 4,045952
  • Predictions will be influenced more by recent value changes than the past

Exponential smoothing forecast of sample data.

  • Tableau will run many models and select the best one
Statistical Techniques in Tableau

Mean absolute error (MAE)

Month Actual Forecast Error Absolute Error
January 5
February 7 5 2 2
March 6 7 -1 1
April 5 6 -1 1
May 3 5 -2 2
June 8 3 5 5
July 2 8 -6 6
August 5 2 3 3
September 5 MAE 2.86
Statistical Techniques in Tableau

Mean absolute scaled error (MASE)

$MASE = \frac{MAE_{model}}{MAE_{naive}}$

  • MASE compares MAE of your model with MAE of naive forecast
  • Typically between 0 (good) and 1 (bad), or higher (even worse)
  • You can customize options in Tableau, but out-of-the-box forecast is acceptable by default

Worldwide google search for "DIY" from 2013 tot 2021, by month, in % of interest, once without and once with seasonality. The MASE is higher for the seasonal model.

Statistical Techniques in Tableau

Let's practice!

Statistical Techniques in Tableau

Preparing Video For Download...