## Time Series Analysis: Residuals During COVID-19 Lockdowns
### Overview
The image contains two side-by-side time series plots, labeled (a) and (b), analyzing residuals (errors) from a predictive model over time, likely related to energy demand or a similar metric. The analysis spans from 2018 to early 2023 and highlights the impact of COVID-19 lockdown periods. Plot (a) shows residuals as a percentage, while plot (b) shows residuals in absolute megawatts (MW).
### Components/Axes
**Plot (a) - Left Panel:**
* **Y-axis:** Label: "Residual (%)". Scale: -30 to 30, with major ticks at intervals of 10 (-30, -20, -10, 0, 10, 20, 30).
* **X-axis:** Label: "Date". Major ticks mark the start of each year: 2018, 2019, 2020, 2021, 2022, 2023.
* **Legend (Top-Left Corner):**
* `Residual` - Black line
* `15-day rolling average` - Red line
* `Mean (2015-2020)` - Solid blue line
* `Beginning of lockdown` - Green dashed vertical line
* `End of lockdown` - Magenta dashed vertical line
* **Key Horizontal Line:** A solid blue line representing the mean from 2015-2020 is positioned at approximately **-6%**.
**Plot (b) - Right Panel:**
* **Y-axis:** Label: "Residuals (MW)". Scale: -15000 to 10000, with major ticks at intervals of 5000 (-15000, -10000, -5000, 0, 5000, 10000).
* **X-axis:** Label: "Date". Identical timeline to plot (a): 2018 to 2023.
* **Data Series:**
* Black line: Raw residuals in MW.
* Red line: A step-function line, likely representing a regime-specific mean or baseline.
### Detailed Analysis
**Plot (a) - Percentage Residuals:**
* **Trend Verification:** The black "Residual" line is highly volatile throughout the period. The red "15-day rolling average" smooths this volatility, revealing a clear, sharp downward trend beginning in early 2020, reaching a trough, and then partially recovering but remaining below the pre-2020 baseline.
* **Lockdown Periods:** Multiple lockdown periods are marked by pairs of green (start) and magenta (end) vertical dashed lines. The most significant period begins around **March 2020** (first green line) and ends around **June/July 2020** (first magenta line). Subsequent, shorter lockdown periods are indicated in late 2020/early 2021 and possibly later in 2021.
* **Data Points & Correlation:** During the first and most severe lockdown period (approx. Q1-Q2 2020), the residuals plummet. The rolling average (red line) drops from near **0%** to a low of approximately **-20% to -25%**. The raw residuals (black line) show spikes as low as **-30%**. This negative residual indicates the model was consistently over-predicting the actual value during this time.
* **Post-Lockdown:** After the initial lockdown, the rolling average recovers to fluctuate between **-5% and -10%**, but does not return to the pre-2020 level near 0%. Another notable dip occurs in late 2022.
**Plot (b) - Absolute Residuals (MW):**
* **Trend Verification:** The black residual line shows high-frequency noise. The red step-line reveals discrete shifts in the average residual level.
* **Step-Line Analysis (Red Line):**
* **2018 - Early 2020:** The step-line is at approximately **0 MW**.
* **Early 2020 - Mid 2020:** A sharp step down to approximately **-2,500 MW**.
* **Mid 2020 - Early 2021:** A further step down to approximately **-5,000 MW**.
* **Early 2021 - Late 2022:** The step-line rises to approximately **-2,500 MW**.
* **Late 2022 - 2023:** A final step down to approximately **-7,500 MW**.
* **Magnitude:** The largest negative residuals in MW occur around the 2020 lockdown, with the black line spiking down to nearly **-15,000 MW**.
### Key Observations
1. **Synchronized Impact:** Both plots show a dramatic structural break in the data coinciding precisely with the first COVID-19 lockdown in early 2020.
2. **Persistent Bias:** The model's predictive bias (negative residuals) does not fully revert to pre-pandemic levels after the initial shock, suggesting a lasting change in the underlying system being modeled.
3. **Scale Difference:** The percentage plot (a) highlights the relative severity of the model error, while the MW plot (b) shows the immense absolute scale of the discrepancy (thousands of megawatts).
4. **Regime Shifts:** The step-function in plot (b) clearly identifies distinct operational regimes or periods of stable model bias, with the most significant negative shift occurring during the pandemic.
### Interpretation
This data strongly suggests that a predictive model (likely for electricity demand or generation) experienced a severe and persistent failure during COVID-19 lockdowns. The consistent negative residuals mean the model's predictions were systematically **higher than the actual observed values**.
* **Causal Relationship:** The perfect alignment of the residual crash with the "Beginning of lockdown" line provides compelling visual evidence that lockdown-induced behavioral changes (e.g., reduced commercial/industrial activity, changed residential patterns) were the primary cause of the model's failure.
* **Systemic Change:** The failure to return to a zero-mean residual indicates the pandemic caused a semi-permanent shift in the patterns the model was built to forecast. The model, trained on pre-2020 data, could not adapt to the new normal without retraining.
* **Operational Significance:** In plot (b), a residual of -10,000 MW represents a massive over-prediction. For a grid operator, this could lead to significant financial costs from procuring unnecessary power or operational challenges from managing an unexpected surplus.
* **Analytical Value:** The use of both percentage and absolute residual plots is insightful. Plot (a) shows the *relative* model breakdown, while plot (b) quantifies the *real-world magnitude* of the error, which is critical for impact assessment. The step-line in (b) is particularly effective for identifying distinct periods of model performance.