For most of human history, the ability to predict the future was considered in the realms
of gods and wizards.
In relatively recent times, statistical methods like regression have put the ability to estimate
the future in the hands of us mere mortals.
Big data with its large datasets has become very good at predicting outcomes, and this
feature is available within Power BI.
Here we have a dataset of Tour de France average speeds and distances from the 1903 inaugural
edition until 2016.
In terms of size, this is a very small dataset.
I want to estimate the average speeds from 2017 until 2021.
Not only is the dataset small, but we have a couple of holes in it due to world wars.
Until the 1930s, the race format was significantly different.
It had far fewer, but longer stages, which significantly impacted the cyclists' speed,
and the bikes didn't have gears back then.
First off, I'll create a line graph of just average speed.
At the bottom of the analytics tab, we can see the forecast pane.
I'll throw in a trendline before doing the forecasting.
You can adjust four parameters in your forecast.
Forecasting length is the number of data points you want to forecast into the future.
The drop-down allows you to select time-series specific data points, but in this case, I'll
stick with points as my points are years.
My data ends in 2016, and I want to predict through to 2021, so I'll change the forecast
length to five.
Whenever you change a parameter, you must click the apply button for the change to take
effect.
The confidence level relates to the shaded area around the predicted line.
The higher the confidence, the greater the area.
This means a 95% probability that actual future values will fall within this shaded area.
If I reduce the confidence level to 75%, the area shrinks, meaning 25% of the time, future
data points will fall outside the area and predictions.
Using the " Ignore the last " field, you can move the forecasted prediction back in time
to include current data points.
I want to start predicting from 2008 through to 2021, which is 13 years, and my current
data ends in 2016.
Then, I want to ignore the last eight points or years.
At 75% confidence, the actual figures fall within the predicted range.
Still, the predicted line doesn't take into account year-to-year fluctuations, and I would
not expect it to with the small and very limited dataset.
If you bear with me, I'll move the starting point of the forecast back to the year 1999,
the beginning of the Lance Armstrong era where he won seven Tour de Frances in a row but
was later found to have been using performance-enhancing drugs.
I'll need to change my confidence level to 80% to get the actual figures to fit within
the predicted range.
Now I'll update my dataset to include statistics up until 2021, and it initially looks as if
the actual figures are further outside the estimate.
However, adding additional data points has pushed the "ignore the last data points" out,
so I need to change the 17 to 22 to set us back to 1999.
I still need to have a confidence level set at 80% to have the actuals fall within the
estimated range.
If I start the forecasting in 2007, post Lance Armstrong's winning streak, the actual values
fall comfortably within the estimated range at 75% confidence.