## 2 Literature Review
### Bibliometric Review
## 4 Data Analysis

Understanding its statistical characteristics is essential for more precise time series forecasting. This enables the selection of forecasting models that best align with these characteristics. For the SARIMA model, for example, some parameters must be passed; these are the Autoregression (AR), Integrated (I), and Moving Average (MA) parameters, represented by the letters \(p,d,q\), respectively. The \(d\) parameter is determined in Section 4.1, while \(p,q\) in Section 4.2. Additionally, seasonality in the time series eliminates the suitability of linear regression models, as they assume a linear relationship between the independent and dependent variables. However, a straight line cannot accurately capture the cyclical patterns exhibited by seasonal time series. Section 4.3 presents statistical tests to evaluate whether the energy consumption in Brazil follows a seasonal pattern, along with the decomposition into its seasonal, trend, and residual components. Moreover, the findings from an analysis of long-term memory in a time series may indicate whether the past observations in a time series are informative for future forecasting or not. This analysis is provided in Section 4.4. Furthermore, the patterns and components of the time series may manifest as a consequence of other underlying factors, which may not directly correlate with the values in the time series or depend on them. These factors are termed exogenous variables, and considering them may also enhance the accuracy of the forecasting model. This evaluation is presented in Section 4.5. This section presents these evaluations before comparing the results between the different models. ### Unit Root Test and Differencing Order

Ensuring stationarity is a crucial step before applying many statistical methods. It implies that statistical properties of the data, such as mean, variance, and autocorrelation, remain constant over time. This characteristic impacts forecasting accuracy and model selection, as it is a fundamental assumption in many time series models, ARIMA. Non-stationary data, often characterized by the presence of a unit root, can lead to unreliable parameter estimates and erroneous forecast results. It is manifested as a trend that increases or decreases. As seen in Section 4.3.1, the energy consumption time series in Brazil is not stationary, as it has an increasing trend component. To address this unit root problem, stationarity is achieved by removing non-stationary features from the time series. The number of differences required to achieve stationarity is estimated using unit root tests, such as the Augmented Dickey-Fuller (ADF) test. The times series has a unit root, it is non-stationary. The series does not have a unit root, it is stationary. For the original time series, the ADF test results a \(p\)-value of 0.84, which is greater than 0.05, suggesting acceptance of the null hypothesis. After one difference, however, the \(p\)-value is 0.0003 and indicates acceptance of the alternative hypothesis. This means that the time series is stationary after one difference. This determines that the \(d\) parameter of the SARIMA model must be equal to 1. ### Autoregressive and Moving Average Orders

To ascertain the remaining parameters for SARIMA, namely the Autoregressive (AR) and Moving Average (MA) parameters, denoted as \(p\) and \(q\) respectively, the Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF) can be employed. To determine the AR parameter, \(p\), and the MA parameter, \(q\), the plots from Figure 3 are used. In this Figure, the blue shades represent the confidence interval, at a 95% confidence level. The ACF displays the correlations between the time series and its lagged values, which are past observations of a variable at specific time points relative to the current observation.