A COMPLETE GUIDE TO TIME SERIES MODELLING
Tags: programming, python, datascience, machinelearning
Published: 2023-10-30 21:01:29

### What is a Time Series Model?
 -An ordered sequence of values of variable at equally spaced time intervals. Used in accurately predicting patterns and trends in time-dependent data can offer valuable insights into fields such as climate analysis, stock marketing analysis and economics.
<b>Time series modeling</b> is a statistical and mathematical technique used to analyze and make predictions about data points collected and recorded over a series of time intervals. It's a method of analyzing a collection of data points over a period of time.

<b><u>Characteristics of Time Series Model</u>:</b>

<b>1.<u>Autocorrelation</u></b>-It's the degree of similarity between a given time series and a lagged version of itself over successive time intervals. Autocorrelation measures the relationship between a variable's current value and its past values. It measures the correlation between a time series and a lagged version of itself. Helps in model selection and diagnostics. 

<b>2.<u>Seasonality</u></b>-characteristic of time series in which data experiences regular and predictable changes that reoccur every year and is said to be seasonal. Seasonality refers to periodic fluctuations. Many time series exhibit seasonality which is recurring patterns or cycles that occur at regular intervals.

<b>3.<u>Stationarity</u></b>-A fundamental assumption in time series analysis is stationarity. A time series mean, variance, and autocorrelation remain constant over time.

<b><u>Time Series Analysis:</u></b>

<b>1.<u>Segmentation</u></b>- splits the data into segments to reveal the underlying properties of the source information.

<b>2.<u>Explanative Analysis</u></b>-attempts to understand the data and the relationship between it's cause effect.

<b>3.<u>Classification</u></b>-Identifies and assigns categories to the data.

<b>4.<u>Forecasting</u></b>-Predicts future data. Time series models are used for forecasting future values of the series. Common techniques for forecasting include autoregressive (AR) models, moving average (MA) models, and their combinations in autoregressive integrated moving average (ARIMA) models.

<b>5.<u>Curve Fitting</u></b>-Plots the data along a curve to study the relationships of variable within the data. 

<b>6.<u>Descriptive Analysis</u></b>-Patterns in the time series data such as trends, seasonal variations and cycles.

<b>7.<u>Exploratory analysis</u></b>- Highlights the main characteristics of the time series data, usually in a visual format.

<b><u>Models of Time Series:</b></u>

<b><u>ARIMA (Autoregressive Integrated Moving Average)</u></b>
-A time series forecasting model used for analyzing and forecasting time-dependent data. It combines three key components: autoregression (AR), differencing (I for Integrated), and moving averages (MA). ARIMA models can apply in some cases where data show non-stationarity in the mean.

<b><u>Parts of ARIMA</u></b>
<b>AR (Autoregressive):</b> refers to the number of previous values to consider for the forecast. Described by the perimeter "p". Autoregressive is the lags of the variables in the stationary series in the estimation equation.

<b>I (Integrated):</b> differentiation of time series data. Characterized by "d". Refers to the number of differencing applied with the objective of achieving stationary time series. Integrated means that the data values are changed with the difference between their own values and previous values to make the series stable.

<b>MA (Moving Average):</b> a linear combination of past error values instead of previous values of the variable interest. Described by the parameter "q". Refers to the lags of forecast errors.

<b><u>SARIMA MODEL ( Seasonal Autoregressive Integrated Moving Average)</u></b>
It's designed to handle time series data with seasonal patterns. SARIMA models are widely used for time series forecasting and analysis, particularly when the data exhibit recurring patterns at regular intervals, such as daily, monthly, or yearly seasonality.

When there's seasonality in the series SARIMA will instead ARIMA. There is only one variable in both data and it will be a suitable model as SARIMA supports univariate time series data.