Introduction

This report summarizes the analysis of Germany’s daily electricity consumption, focusing on trends, seasonal patterns, and forecasting.

Data Overview

The data-set contains daily electricity consumption, wind, and solar production data from 2006 to 2018.

Load data

First 6 Rows of the Dataset
Date Consumption Wind Solar Wind.Solar
2006-01-01 1069.184 NA NA NA
2006-01-02 1380.521 NA NA NA
2006-01-03 1442.533 NA NA NA
2006-01-04 1457.217 NA NA NA
2006-01-05 1477.131 NA NA NA
2006-01-06 1403.427 NA NA NA

Summary

Summarize Data Frame to understand better way.

Summary Statistics
Date Consumption Wind Solar Wind.Solar
Min. :2006-01-01 Min. : 842.4 Min. : 5.757 Min. : 1.968 Min. : 21.48
1st Qu.:2008-12-31 1st Qu.:1217.9 1st Qu.: 62.353 1st Qu.: 35.179 1st Qu.:172.19
Median :2012-01-01 Median :1367.1 Median :119.098 Median : 86.407 Median :240.99
Mean :2012-01-01 Mean :1338.7 Mean :164.814 Mean : 89.259 Mean :272.66
3rd Qu.:2014-12-31 3rd Qu.:1457.8 3rd Qu.:217.900 3rd Qu.:135.071 3rd Qu.:338.99
Max. :2017-12-31 Max. :1709.6 Max. :826.278 Max. :241.580 Max. :851.56
NA NA NA’s :1463 NA’s :2195 NA’s :2196

Data preprocessing

## [1] "2006-01-01" "2006-01-02" "2006-01-03" "2006-01-04" "2006-01-05"
## [6] "2006-01-06"
##         Date Consumption Wind Solar Wind.Solar year month day
## 1 2006-01-01    1069.184   NA    NA         NA 2006     1   1
## 2 2006-01-02    1380.521   NA    NA         NA 2006     1   2
## 3 2006-01-03    1442.533   NA    NA         NA 2006     1   3
## 4 2006-01-04    1457.217   NA    NA         NA 2006     1   4
## 5 2006-01-05    1477.131   NA    NA         NA 2006     1   5
## 6 2006-01-06    1403.427   NA    NA         NA 2006     1   6

Hypothesis Testing

ANOVA:Yearly Consumption Differences

We tested if electricity consumption differs significantly across years.

##                Df    Sum Sq Mean Sq F value Pr(>F)    
## factor(year)   11   8303614  754874   29.43 <2e-16 ***
## Residuals    4371 112120696   25651                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Conclusion

The p-value is less than 0.05, indicating significant differances in consumption across years.

ANOVA: Seasonal Consumption Differences

We also tested if consumption differs across seasons.

##               Df    Sum Sq Mean Sq F value Pr(>F)    
## season         3  15227607 5075869   211.3 <2e-16 ***
## Residuals   4379 105196703   24023                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Conclusion

The p-value is less than 0.05, indicating significant differences in consumption across seasons.

Correlation Analysis

Correlation Matrix

The matrix below shows the correlation between consumption, wind, and solar production.

Forecasting

ARIMA Model

We fitted an ARIMA model to forecast future electricity consumption.

Accuracy

ARIMA Model Accuracy
ME RMSE MAE MPE MAPE MASE ACF1
Training set -0.0354426 83.39549 59.83591 -0.3915875 4.674948 0.4853672 -0.0344969

ETS Model

We also fitted an ETS model for comparison.

Accuracy

ETS Model Accuracy
ME RMSE MAE MPE MAPE MASE ACF1
Training set -0.0416266 57.8157 32.27235 -0.1462378 2.586819 0.6242534 0.0860811

Conclusion

Electricity consumption in Germany shows clear yearly, monthly, and daily trends.

There are significant differences in consumption across years and seasons.

The ETS model provided a better fit for forecasting compared to ARIMA.