## ARMA :

ARMA, or Autoregressive Moving Average, is a type of statistical model used in time series analysis to capture the effects of past values on current values in the data. It is a combination of two models: autoregression (AR) and moving average (MA).

Autoregression is a type of regression analysis where the dependent variable is regressed on its own lagged values. In other words, it is a model that explains current values of the data based on past values of the same data. For example, if we want to predict the value of a stock at time t, we can use autoregression to model the relationship between the stock price at time t-1 and the stock price at time t. This is known as an AR(1) model, because it uses one lagged value. We can also use more than one lagged value, such as an AR(2) model that uses the values at times t-1 and t-2 to predict the value at time t.

Moving average, on the other hand, is a type of model that explains the current value of the data based on the average of past values. For example, if we want to predict the value of a stock at time t, we can use a moving average model to model the relationship between the average of the stock prices at times t-1, t-2, and t-3 and the stock price at time t. This is known as an MA(3) model, because it uses the average of the last three values.

ARMA combines these two models by including both autoregressive and moving average terms in the model. For example, an ARMA(2,1) model includes two autoregressive terms and one moving average term, while an ARMA(1,3) model includes one autoregressive term and three moving average terms. This allows the model to capture both the past values of the data and the average of past values in predicting the current value.

One example of using ARMA is in stock market prediction. By using historical data on stock prices, we can build an ARMA model to predict the future stock prices. For example, if we have daily stock prices for the past year, we can use an ARMA(2,1) model to predict the stock price at time t based on the stock prices at times t-1 and t-2, as well as the average of the stock prices at times t-1, t-2, and t-3.

Another example of using ARMA is in forecasting economic indicators, such as unemployment rates or gross domestic product (GDP). By using historical data on these indicators, we can build an ARMA model to predict future values. For example, if we have monthly unemployment rates for the past 10 years, we can use an ARMA(1,3) model to predict the unemployment rate at time t based on the unemployment rate at time t-1 and the average of the unemployment rates at times t-1, t-2, and t-3.

Overall, ARMA is a useful tool in time series analysis, as it allows us to capture the effects of past values on current values in the data. It is commonly used in various fields, such as finance, economics, and meteorology, to make predictions and forecast future values.