Before talking about time series forecasting, let us understand time series data and some of their properties. We will explore why time series data are different from non-time series data.
Time series data are the continuous or discrete sequences of observations that are recorded over certain (usually same) interval of time. For example, the daily average temperature of a city observed over past 3 years, the number of books sold by a book seller every week, weekly total demand from customers for an online product, amount of shipments delivered by a cargo company every hour etc. The list can go on and on because time series observations are very ubiquitous. In electrical engineering, measurement of amplitude is observed as a function of time, which is also called as signal. Mathematically any signal is a function of time represented as and can vary as where is the last observation and usually the interval remains constant i.e. . Hence, unlike non-time series data, the order of sequences are of prime importance in time series data.
There are a number of features which need to be considered and properly taken care of before dealing with the time series data. Below, we will highlight some of them:
Stationarity: Time series is said to be stationary, when all the statistical properties such as mean, variance, autocorrelation etc. remains constant over time. If the statistical properties of time series changes over time, then the prediction becomes difficult and they will always underestimate the mean and variance in future prediction. Stationarity makes sure that the statistical behaviour of the series remains constant in the future so that our forecast is well estimated.
Also, there are a lot of interesting theories for stationary time series than for non-stationary time series. Hence, we check if the given time-series shows stationarity before performing any time series forecasting.
plot and visualise the trend in time series. Check to see if the trend is monotonously increasing or decreasing or if the trend doesn’t show any stationary behaviour.
Plot and visualise the moving statistics such as moving mean and moving standard deviation of the time series. The time series is stationary if the value is constant.
Another most widely used test of stationarity is the “Dickey Fuller Test”