## 2 Literature Review
### Bibliometric Review
In contrast, the PACF plot reveals the autocorrelation of a time series with itself at different lags, while controlling for the influence of intermediate lags, thus isolating the direct correlation between each observation and its specific lagged value. For the \(p\) parameter, the PACF plot, in Figure 2(b), is examined. A significant peak at lag 1 in the PACF plot, indicated by a spike beyond the confidence interval, represented by the blue shade, suggests a strong correlation between the current observation and its immediate lagged value. This is indicative of an autoregressive relationship. Consequently, \(p\) is determined to be 1. Figure 3: Determination of AR and MA parameters. A similar approach is used in the ACF plot, in Figure 2(a), for the moving average parameter \(q\) extends to the ACF plot. A significant decay in correlation after the first lag in the ACF plot indicates the presence of a moving average process, where subsequent observations are influenced by past forecast errors. Thus, the observation of a significant correlation at lag 1 in the ACF plot, coupled with a rapid decay in subsequent lags, signifies the influence of one lagged forecast error on the current observation, leading to the determination of \(q\) as 1. In addition to that, the ACF may also provide evidence of seasonality in a time series. A 12-month seasonality in energy consumption in Brazil is evidenced by Figure 2(a). ### Seasonality Tests

Identifying cyclical patterns in the time series empowers forecasting models to deliver more precise predictions. Hence, the seasonality and the temporal periodicity at which the time series presents this behavior must be detected. For evaluating the seasonality of the energy consumption, the stationary time series, after one difference, is used, according to Section 4.1. The intention is to eliminate its underlying trend, intending to evidence short-term fluctuations and the seasonal component. The Kruskal-Wallis test is a non-parametric statistical method utilized to evaluate whether the medians of two or more groups are different. Its hypotheses are as follows:

**Hypothesis 3**. : _The medians of all the groups are equal; that is, \(\widetilde{\mu}_{1}=\widetilde{\mu}_{2}=...=\widetilde{\mu}_{n}\), where \(\widetilde{\mu}_{i}\) represents the median of the \(i\)th group._

**Hypothesis 4**. : _At least one of the group medians is different from the others._

To apply this test, the trend-subtracted time series is divided into 20 groups of 12 months each, each representing a year of energy consumption between 2004 and 2023. The length of 12 months is chosen based on the ACF results from Section 4.2. These groups are inputted into the Kruskal-Wallis test, which returned a \(p\)-value of 0.994, more significant than the significance level of 0.05. Therefore, the null hypothesis is accepted, which suggests that the time series presents the same median throughout all years, endorsing the existence of yearly seasonality in the time series. #### 4.3.1 Seasonal and Trend Decomposition Using LOESS

After formal proof of the seasonality of the energy consumption in Brazil, the time series may be decomposed into its components using Locally Estimated Scatterplot Smoothing (LOESS). This results in the seasonal, trend, and residual components, as depicted in Figure 4. The decomposition is performed with additive seasonality, resulting in a consistent seasonal pattern, thus suggesting its additive nature. The trend component represents the long-term direction of the time series. As seen in Figure 4, energy consumption is consistently rising, despite drops in 2009 and 2020 and a change in the slope in 2015. The seasonal component represents the repeating pattern in the data at fixed intervals. This section proved that this fixed interval is 12 months wide.