# Explaining stationarity in a visual way

I am new to forecasting and want to try and explain to my peers in a visual and simple way how you know if a time series is stationary or not.

In the forecasting books I have read, the advice is often to inspect the plot manually and say whether the mean and/ or variance is constant over time. If it isn't then you difference the series and inspect the differenced plot.

I have come across this blog: https://machinelearningmastery.com/time-series-data-stationary-python/ which advises splitting your dataset in 2 and computing the mean and variance of each half and comparing the two halves. If the results are in the same ball park then this would suggest a constant mean and variance and would imply stationarity. However, it also suggests plotting a histogram to see the distribution of your series and to check to see if it is bell shaped (see the daily births and airline passengers examples).

I like this simplistic approach but can see how this could yield funny results (especially if the dataset is split in a different way). Is it worth doing this but splitting in a way that is sensible for my dataset?

If it's helpful, I am assessing daily data (over a 27 day period) which is in 15 min intervals (from 6.00 to 00.15, so there are 73 bins per day). Overall, there are 1971 observations in total.

So far, I have calculated the mean over different time windows for the entire series (so using just the first value in the time series, using the first 2 value in the time series, using the first 3 values etc etc). I found the mean fluctuated a lot.

I then differenced the series and again calculated the mean over the time windows mentioned above and found it pretty much dropped to zero after around the first 5 iterations. I took this result as meaning the series was now stationary.

I want to do something similar to show how the variance stays constant but am unsure how to actually implement this. I am doing this in r.

Any help would be much appreciated.

• stationarity doesn't have much to do with the bell shapedness. it's about constancy of your mean and the variance – Aksakal Apr 4 '18 at 17:27
• Ok, that was badly phrased on my part. I understand your point. How can you show constancy of mean and variance in an easy way? A visual way? That's essentially what I am asking – JassiL Apr 4 '18 at 17:33
• otexts.org/fpp/8/1 – Skander H. Apr 13 '18 at 22:12