A Comparative Study of Stochastic Models for Forecasting Electricity Generation and Consumption in Nigeria
Bridget Nkemnole 1, Akintayo Akinola 1
1 University of Lagos
101017 University Road, Akoka, Lagos State, Nigeria
DOI: 10.22178/pos.62-3 LCC Subject Category: TD1-1066
Received 25.08.2020 Accepted 28.09.2020 Published online 30.09.2020
Corresponding Author: Bridget Nkemnole [email protected]
© 2020 The Authors. This article is licensed under a Creative Commons Attribution 4.0 License HOm
Abstract. With energy serious shortage of the Nigerian Power Sector owing to industry deregulation, abrupt variations in electricity demand, and increasing population density, Nigeria's economic development has been restricted. Thus, it is significant to balance the relationship between power generation and consumption, and further stabilize the two in a reasonable scope. To achieve balance, an accurate model to fit and predict electricity generation and consumption in Nigeria is required. This study, therefore, proposes a comparative study on stochastic modeling; (Harvey model, Autoregressive model, and Markov chain model) for forecasting electricity generation and consumption in Nigeria. The data gathered were analyzed and the model parameters were estimated using the maximum likelihood estimation technique. The comparative performance revealed that the Markov chain model best-predicted electricity generation than the Harvey and Autoregressive models. Also, for electricity consumption, results showed that the Harvey model predicted best than the Markov and Autoregressive models for electricity consumption. Thus, the Markov and Harvey model used to forecast electricity generation and consumption in Nigeria for the next 20 years (2018 to 2037) did not only reveal that electricity generation and consumption will continue to increase from 3,692.11 mln kW/h to 18,250.67 mln kW/h and from 2,961.10 mln kW/h to 127,071.30 mln kW/h respectively but also indicates high accuracy and the reference value of these models.
Keywords: Autoregressive model; Electricity generation; Electricity consumption; Forecasting; Harvey model; Markov model.
INTRODUCTION
The generation of electric power in Nigeria is overwhelmed by excessive demand for electricity by consumers because of inadequate supply. This supply shortfall has resulted in prolonged and intermittent power outages supplies to the consumers over the years. It is the belief that efficient power supply results in quality health care and economic growth on nation-building to mention a few [1]. Growth results in an increase in power demand, which certainly requires planning ahead of time to meet the present and future demand for uninterruptible power supply [2].
Forecasting electricity generation and consumption with high accuracy is important as it helps to plan production along with required demand in advance and prevent energy wastage and system
failure. Electricity consumption forecasting is one of the most significant challenges in dealing with the supply and demand of electricity. Also, accurate forecast leads to increase the reliability of power supply, precise decision making for future development, quality savings in operation, and maintenance costs [3]. The dynamic nature of the electricity market, therefore, requires that an investor in power generation must be sure that there is a demand for electricity before setting up a generation plant, while distribution companies will want to be guaranteed that there is an available supply for their customers. Hence, a safe and reliable source of electricity involves a feasible and practical method for demand forecasting.
Many theoretical methods including growth curves, multiple linear regression methods that use economic, social, geographic, and
demographic factors, and Box-Jenkins autoregressive moving average (ARMA) and autoregressive integrated moving average (ARIMA) techniques, Harvey logistic model, Harvey model, and Autoregressive model has been applied in forecasting electricity generation and consumption. Likewise, different research works have compared various models to determine which has a better forecasting accuracy. The task of ensuring power supply has become so important that researchers use various predictive models to conduct research and analysis on power in different countries. At the same time, the best estimate for the forecast of these predictive models is helpful for forecasting demand in other energy sectors. Nonetheless, there are not many shaping documents such as power prediction and accuracy comparison by using some models at the same time.
A study to determine the best model for forecasting the prices of electricity in a competitive market was shown by [4]. They compared four models; AR, MA, GARCH, and ARCH models to determine the best model and provide the estimates of electricity prices based on the best model. Other variables that provide energy in the industries were used to test the validity of the model. The models were ranked on the bases of the Akaike information criterion (AIC) and the Bayesian Information Criterion (BIC). The empirical analysis revealed that the ARMA (2,1,2) had the lowest root mean square error and the mean absolute percentage error than the GARCH (2, 1) model which indicates that the ARMA is a better model in forecasting the electricity prices than the GARCH model when there exist exogenous variables. Authors [5] used the GARCH model to estimate the volatility of the marketplace, while Harvey logistic model was used to forecast electricity demand and supply in Nigeria between 2005 and 2026. Authors [6] forecasted electricity demand in Ta-male Ghana using the ARIMA model. Secondary data from 1990 to 2013 was applied, and the result showed that both domestic and commercial demand was increasing more rapidly than industrial sector demand. In [7] predicting electricity consumption using regression, the Kalman filter adaptation algorithm and ANN was investigated. Empirical results from the analysis showed that the Kalman filter adaptation algorithm was the best in terms of future prediction of electricity consumption. Authors [8] modeled and predicted residential electricity utilization in Nigeria using multiple/quadratic regression models. Empirical
analysis showed that the quadratic regression model outperformed the multiple regression model. Authors [9] conducted a comparative study on medium-term load forecasting using Artificial Neural Network, (ANN) and regression model. Results showed that ANN-model performed better than the regression model for load forecasting. In [10], a study on long term electric load forecasting on the Nigerian power system using the modified form of the exponential regression model was carried out. The model was used to predict residential, commercial, and industrial load demand.
Authors [11] applied the Markov model in crude oil price forecasting. They found patterns in past crude oil price datasets that match with today's crude oil price behavior, then incorporate these two datasets with appropriate neighboring price elements to forecasting tomorrow's crude oil price. Based on a state sequence, three different states were assumed, with state-space S = (S1,S2S3), S1 =Up, S2 =Same and S3 =Down, which were decided by comparing the previous closing price and the current closing price. The number of days that both the first day and the second day are up to was calculated using data obtained on the closing index from WTI (West Texas Intermediate) for daily crude oil prices from 2nd January 2015 to 29th May 2015 to model the process. Results obtained showed that the transition matrix was stable, and the most likely trend of the index is down since the probability of down is the biggest. The previous price dated 29th May 2015 was $60.25 and the price of the predicted day, 1st June 2015 was $60.24 respectively. The result shows that forecasting is accurate and reliable. Thus, they concluded that the Markov model can produce an accurate forecast based on the description of historical patterns in crude oil prices.
In this research, three models; Harvey, Autoregressive, and Markov Chain Models will be compared on historical data of electricity generation and consumption in Nigeria and determine which of the three models has a better prediction accuracy. The model with the best fit will be used to forecast electricity generation and consumption for the next twenty years; (2017-2036).
METHODS
Autoregressive model. An autoregressive (AR) model predicts future outcomes based on the past outcome. In an AR model, the value of the outcome
variable (Y) at some point t in time is directly related to the predictor variable (X). It is simply a linear regression of the current value of the series against one or more prior values of the series. The value of p is called the order of the AR model. AR models can be analyzed with one of the various methods, such as the standard linear least square techniques. A common approach for modeling univariate time series is the AR model:
Xt= ^ + 01Xt-1 + 02Xt-2 + - + 0pXt-p + et
where Xt is the time series and Et is the white noise, with ^ denoting the process mean.
An autoregressive model of order p, denoted by AR (p) with mean zero is generally given the equation:
Xt — 0iX(t-i) + ^2^(t-2) + + •••
+ QpXt-p + Et
Or
Xt — (faL + fcl2 + foL3 + • + MP)Xt + where — Et
<P(L) — (1- № + fa2h2 + <p3L3 + • + fapLP) where L is the lag operator;
—.,$p (fap ^ 0) are the autoregressive model parameters and Et is the random shock or white noise process, with mean zero and variance o^. The mean of Xt is zero. If the mean, ^ of Xt is not zero, replace Xt by Xt-ß, i.e.
Xt-ß — <pi(Xt-i + + fc(Xt-2 + +
+ (pp(Xt-p +p)+Et
Or write,
Xt — c + (piXt-i + $:Xt-2 + •■■ + fapXt-p + et
where c — 1 — — —. 0p).
An AR (p) model is stationary if the roots of = 0 all lie outside the unit circle. A necessary condition for stationary is that rk = 0 as k ^ ro.
Maximum likelihood estimation (MLE) for autoregressive models. Given an AR (1) model
Xt — C + (pxt-i + Et (1)
Et ~ iid N(0,a2),t — 1,—,T 0 — (c,(p,a2)',\(p\ < 1
conditional on It-i
xt\It-i~ N(c + faxt-i,a2),t — 2.....T
which only depends on xt-i. The conditional density f(xt\It-i,0) is then:
f(xt\xt-i,0) — (2na2) i/2exp(—^2(xt — c + faxt-i)2),t — 2.....T (2)
To determine the marginal density for the initial value x1, recall that for a stationary AR (1) process:
E[xi] — ß —
Var(xi) —
1 — fa
a2
1 — fa2
It follows that:
xi~ N
c o
1 — §'1 — §2.
f(xn 0) — (2*-—■;) / exp {xi —
(3)
The conditional log-likelihood function is:
^lnf(xt\xt-i,0) — t=2
-(T — 1)
-1
2
(T — 1)
\n(2n)
ln(a2)
T t=2
(xt — c — faxt-i)2
c
T
The conditional log-likelihood function has the form of the log-likelihood function for a linear regression model with normal errors. It follows that the conditional mles for c and 0 are identical to the least-squares estimates from the regression:
xtIIt-i~N(c + ^xt-i,a2),t = 2.....T
From which it follows that
xt = c + Qxt-1 + et,t = 2, ...,T
The conditional mle for a2 and marginal log-likelihood for the initial value x1 are given by equation (5) and (6) respectively.
o,
<Pcmlext-l)
2
c ml e 2
= ( T ^ 1^c=2(xt Ccmle
(5)
i-<p2 2a2
I nf(xx; 6) = -\ln(2n) -±ln (£2;) -
{xi-ih)2 (6)
E[xtVt-i] = c + №t-i
Var[xtllt-i] = o2
The 1-step ahead prediction errors may then be defined as
Vt = xt -E[xtlh-i] =xt-c + fat-1, t = 2, ...,T
The variance of the prediction error at time t is
with exact log-likelihood function:
ft = var(vt) = var(et) = o2, t = 2, ....T
lnL( 6lx) = -lln(2n)-±ln(1^)
(xi-ih) -
i-<2 2 a2 K"1 1-<p; C - $xt-i)2
^'n(«2)-¿II=2(xC-
(7)
The exact log-likelihood function is a non-linear function of the parameters B, thus there is no closed-form solution for the exact mles. A New-ton-Raphson type algorithm is used for the maximization which leads to the iterative scheme:
6mle,n = 6mle,n_l — ^^{j6mle,n_l^ $(6mle,n_l)
where H(6) is an estimate of the Hessian matrix (2nd derivative of the log-likelihood function), and S( 6) is an estimate of the score vector (1st derivative of the loglikelihood function). The estimates of the Hessian and Score are computed numerically using numerical derivative routines.
Prediction error decomposition. For general time series models, the log-likelihood function is computed using an algorithm known as the prediction error decomposition. To illustrate this algorithm, consider again the simple AR (1) model. Recall,
For the initial value, the first prediction error and its variance are
v1 = x1 — E[x1] = x1
1-Q
f1 = var(v1) =
o
1-Q2
Using the prediction errors and the prediction error variances, the exact log-likelihood function is re-expressed as:
InL(eix) = -\\n(2n)-1ZLilnft-iZLij
which is the prediction error decomposition. Further simplification is achieved by:
var(vt) = o2ft*
o2.
1
1-Q2
f or t = 1
= o2.for t > 1
That is ft* = 1/(1- 02) fort =1 and ft* = 1 for t > 1. Thus the log-likelihood becomes
T 2
lnL(e\x) — — — \n(2n) ——Ino2 — lnft'
T 2
T
1 v
t=i
i 1 2 1 y^t2
2o2 L ft"
t=i
Logistic model
The Logistic model is given by (1):
f(t) —
1<t<T
(9)
1+PeYt
where a is the saturation level, ft and y are parameters of the model to be estimated, t is the time in years. In the Logistic model, a is estimated by a Fibonacci search technique.
Differentiating equation (9) to t and natural logarithms are taken on both sides, we have:
In^jQ — 2lnf(t)+S + rt
(10)
where 8 — \n
Harvey logistic model. The Harvey Logistic model is based on the Logistic model. From equation (10), the Harvey Logistic model is:
lnyt — 2lnYt-i + S + yt + et,t — 2.......T
lnyt — plnYt-i + S + yt + Et
t = 2.......T
where p = , S = ln(kfta1/ky)
p, ft and y are parameters of the model to be estimated, et is the error term with mean zero and constant variance.
Maximum likelihood estimation for Harvey models. Electricity generation and consumption based on the Harvey model is generally given as:
f(t) — a(1 + ßevty
The proposed model is given as:
\nxt — a \n xt-i + ß + yt + et
(11)
(12)
where a, ft and y are the parameters of the model to be estimated. et is the error term with mean zero and constant variance.
Since xt = Xt — Xt-1, substituting for xt in equation (12) gives:
\n(Xt—Xt-i) — a\n(Xt-i) + ß+yt+ et (13)
where Yt is the data to be predicted at year t, yt = ln ^T^ = a ln(^t-1) + + yt + et (14)
Yt — Yt-1,t = 2......T , et is a disturbance term
with zero mean and constant variance, S and y are constants to be found by regression.
Harvey model. The Harvey model based on generally modified exponentials is of the form:
Therefore, parameters of the Harvey model in equation (14) are estimated using the maximum likelihood method as shown below.
Taking the likelihood of equation (11),
a
f(t) = a(1 + fteyt)k
The value of k determines the form of the function f(t). When k = —1, f(t) is Logistic and when k = 1 it is a simple modified exponential.
Differentiating and taking natural logarithm as for the Logistic model, leads to the Harvey model based on the simple modified exponential. Thus, the Harvey model is given by:
L[f(t,a,p,y)] = n=1(a(1 + PeYt)k) = n^l + Pe^)*] (15)
Let x = $eyt Equation (15) becomes, L[f(t,a,p,y)] = nU[<1 + x)k] (16)
Recall the binomial expansion of (1 + x) n,
i.e.
(1 + x)-n = 1+
-nx (-n(-n-l)x2)
(-n(-n-1)(-n-2)x3)
3!
+ - +
1! 2! (-n(-n-1)(-n-r)xr)
However, from equation (16),
(1 + x)
k _
xk (k(k - 1)x2)
1 + — + —-
1! 2!
(k(k - 1)(k - 2)x3)
+
3!
(k(k -1)(k- 2)xr)
!
a(1 + x)k = a + kxa +
a(k(k - 1)x2) 2!
+ a(k(k-1)(k-2)x3)
+
3!
a(k(k - 1)(k - 2)xr)
!
a(1 + x)k = a + kxa +
a(k(k - 1)x2) 2
+
a(k(k - 1)(k - 2)x3) 6
n
nnn a(1 + x)k
1=1
= an
+
+
ill
=1
1 + x k +
k( k - 1) x2
2
k(k - 1)(k - 2)x3
a n(1 + x)
kn _ an
+
+
ill
=1
6
1 + x k +
k( k - 1) x2
2
k(k - 1)(k - 2)x3
6
x2kn x3kn = nlna + xkn-----+ ■
+ 2 3
lnL[f(t, a,ß, y)]
= nlna + ßeYtkn
ß3eyH3kn + ----
ß2ev2t2kn
= nlna + kn ße
lnL[f(t,a,ß,y)] _ d(a,ß,Y) _
ß2eY2t2 ß3eY3t3
yt
d
ß2ey2t2 ß3ey3t3
+
2
3
d(a,ß,y)
nlna + k n
2
Therefore,
lnL[f(t,a,ß,y)]
3
ßeyt (17)
d(a)
nlna + k n
ß3eV3t3
= 0
lnL[f(t,a,ß,y)]
d(ß)
nlna + k n
ß2eY2t2
ßeyt - ^-+
2
ß2eY2t2
ßeyt - ^-+
ß3eV3t3
=0
lnL[f(t,a,ß,y)]
d(y)
nlna + k n
ß
yt _ ß2eY22
+
ß3eY3t3
=0
Newton Raphson Iterative procedure technique for solving equations numerically is used to estimate the parameters ( a,(3,f) of the model in equation (17).
However, estimated parameters would then reflect in equation (14) above to become:
Still from equation (16),
ln[f( t.a.p.r)] = lnan(1 + x)kn = lnan
k(k - 1)x2
+ In
1 + x k +
2
+
k(k - 1)(k - 2)x3
= nlna + kn
6
23 x2 x3
X-X2+~
\n(j^-) = aln(xt-1)+ ß + Yt
(18)
for the appropriate prediction of electricity generation and consumption of the Harvey model.
Markov chain. A Markov chain is a sequence of random variables X1,X2,X3,..., with the Markov property namely that, the conditional probability of any future event, given any past event and the present state, is independent of the past event and
T!
2
3
3
2
3
depends only on the present state. In other words, the present state is only dependent on the last state and does not depend on the states before the last state.
Let Xt denotes a random variable which represents the state of a system at time t, where t =
0,1,2,......If Xt+1 only depends on the state of Xt,
and does not depend on the states before Xt, then:
P(.Xn+i — x\Xi — Xi,X2 — X2,.....,Xn —
xn) =P(Xn+i — xn+i\Xn — xn) [19]
Xt is a stationary Markov chain (or time-homogenous Markov chain). Let p^j denotes the probability that the system is in a state j at the time t + 1 given the system is in state i at time t. If the system has a finite number of states, 1,2,... s, the stationary Markov chain is defined by a transition probability matrix:
restrictions on it, but rather want to estimate it from data. Given the matrix entries pij defined as:
Pij — Pr (Xt+i—j\Xt — i)
[20)
What we observe is a sample from the chain, x™ = This is a realization of the random
variable X".
The probability of this realization is
PriXJl = x?) = Pr(Xx = xx) n=2 Pr № =
(21)
xt\X[-1 — x1-1)
— Pr(X1 —
Xi)U%2Pr(Xt — Xt\xt-1 — Xt-1) [22)
Re-write in terms of the transition probabilities Pij , to get the likelihood of a given transition matrix:
Pli Pl2 -Pis
p — P21 P22 -P2S
Psl PS2 P •••1 ss
L(p) — Pr(Xi— xi)ni=2PXt-1
t-i xt
[23)
where pij > 0,i,j > 0 and
J=S
1=1
Define the transition counts N^ = number of times i is followed by j in X™ , and re-write the likelihood in terms of:
L(p) — Pr(Xi— Xi)nf=iUUPuj
[24)
The transition probability matrix of a stationary Markov chain can be generated from the observations of the system state X0, Xx, X2,..., Xn, at time taking the log results in (24)
t = 0, ...,N — 1, we get the transition probability matrix as follows:
Nij p.. = —+■
where N[j is the number of observation pairs Xt and Xt+x with Xt in state i and Xt+x in state j; Nt is the number of observation pairs Xt and Xt+x with Xt in state i and Xt+x in any state.
Maximum likelihood estimation for Markov chain.
Derivation of the MLE for Markov chains. The transition matrix, p, is unknown, and we impose no
L(p) — logL(p) — logPr(Xi — xi) + + Zi,jnij\ogpiJ [25)
Taking the derivative: --r— = —
dPij Pij
Setting equal to zero at pij : — = 0
Pij
From above, the parameters cannot all change arbitrarily, because the probabilities of making transitions from a state have to add up to 1. That is, for each i, ZjPij = 1.
Thus, by explicitly eliminating parameters, we arbitrarily pick one of the transition probabilities to express in terms of the others; such that the
probability of going to 1, we have for each i, ptl =
i - Y7
-2 Pij .
Taking the derivatives of the likelihood, we leave out d/dPil, and the other terms will be changed:
dL _ nij
dpi
Pij Pii
(26)
Setting this equal to zero at the MLE p,
ij _ nii pij pil
(27)
data, while n is the number of observations or data points. The higher the value of the coefficient of determination, the better the model.
Root mean square error (RMSE). The Root Mean Square Error (RMSE) of an estimator measures the average of the squares of the errors or deviations. That is the difference between the estimator and what is estimated. If X is a vector of n predictions, and X is the vector of observed values corresponding to the inputs to the function which generated the predictions, then the RMSE of the predictor is estimated by:
nij nn
POL
pn
(28)
Since this holds for all j ^ 1, we can conclude that pij <x ntj, and in fact:
Z?=1(xt-xt)2
(31)
where, Xt and Xt are the estimated and actual value of generation or consumption of electricity data, while n is the number of observations or data points. The lower the value of the root mean square error, the better the model.
Pa
_ ij
Y™ n --Y=i nij
(29)
The choice of pil as the transition probability to eliminate in favor of the others is arbitrary and we get the same result for any other.
Performance evaluation of the model. This section presents statistical tools such as the coefficient of determination (r2), Root Mean Square Error (RMSE), and Akaike Information Criteria (AIC) to evaluate the models discussed in the previous section.
Akaike information criteria (AIC). The Akaike Information Criterion (AIC) is a measure of the relative quality of statistical models for a given set of data. Given a collection of models for the data, AIC estimates the quality of each model, relative to each of the other models.
Suppose that we have a statistical model M of some data x, let k be the number of estimated parameters in the model. Let L be the maximized value of the likelihood function for the model; i.e. L = P(x/6, M) where 6 are the parameter values that maximize the likelihood function. Then, the AIC value of the model results in (32):
n
n
Coefficient of determination. The coefficient of determination (r2) is used to determine the effectiveness of using the model in forecasting. It is the proportion of the variance in the dependent variable that is predictable from the independent var-iable(s). It gives the coefficient of the total variance in the dependent variable explained by the model.
„2- Yt=i(Xt-X)2
=
Y?=i(Xt-x)
where, Xt and Xt are the estimated and actual value of generation or consumption of electricity
AIC = 2k-2ln(Z).
RESULTS AND DISCUSSION
(32)
The proposed models (Harvey model, Autoregressive model, and Markov chain model) discussed in the previous section are applied to model electricity generation and consumption in Nigeria between 1990 and 2017. The data was extracted from the archives of the Central Bank of Nigeria, and the National Bureau of Statistics. The volume of electricity generated and consumed between 1990 and 2017 constitutes the historical data set. The data set is used to compare the
prediction accuracy of the three models. The models would be fitted on the historical data of electricity generation and consumption in Nigeria and the best model would be used to forecast electricity generation and consumption for the next
twenty years; (2018-2037). Figures 1 and 2 show the Electricity Generation and Consumption in Nigeria. Table 1 reported the descriptive statistics of annual electricity generation and consumption.
Table 1 - Distributional characteristics of annual electricity generation and consumption, mln kWh
Characteristics Electricity Generation Electricity Consumption
Mean 1,616.27 2,133.16
Standard Error 133.92 121.30
Median 1,469.39 2,064.65
Standard Deviation 708.61 641.87
Sample Variance 502,134.61 411,992.44
Kurtosis -1.40 -1.12
Skewness 0.42 0.49
Range 2,020.39 2,014.22
Minimum 829.32 1,346.3
Maximum 2,849.72 3,360.52
Sum 45,255.59 59,728.55
Count 28 28
Confidence Level (95.0%) 274.77 248.89
4 000,00 3 500,00 3 000,00 2 500,00 2 000,00 1 500,00 1 000,00 500,00
Electricity production (kWh) (Million)
0 1 2 3 4 5 vo t-. 03 0 1 2 3 4 5 vo 03 0 1 2 3 4 5 vo
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Figure 1 - Electricity Generation in Nigeria between 1990-2017
3 000,00 2 500,00 2 000,00 1 500,00 1 000,00 500,00
Electricity consumption (kWh) (Million)
C^C^C^C^C^C^^C^^C^OOOOOOOOOOt—IT—IT—IT—IT—IT—IT—I^H (^(^(^(^(^(^(^(^(^(^OOOOOOOOOOOOOOOOOO T—IT—IT—IT—IT—IT—IT—IT—IT—IT—ICNCNCNCNCNCNCNCNCNCNCNCNCNCNCNCNCNCN
Figure 2 - Electricity Consumption in Nigeria between 1990-2017
Autoregressive model: Electricity generation
Based on the model parameters shown in Table 2, the Autoregressive model for electricity production is:
Xt = 14.5003 + 0.9403Xt-1 where Xt is the estimated electricity generation.
Table 2 - Results for Electricity Generation Estimation using Autoregressive model
Parameter Coefficient Standard Error AIC r2 RMSE MAE
ß0 14.5003 7.6265 157.99 0.8207162 1266.88 195.6264
ß1 0.9403 0.0627
The model gave r2 of 0.8207 which means that the Autoregressive model was able to explain 82.1% of the variance in electricity generation. The coefficient of Xt , 0.9403, reveals that the electricity
generation in Nigeria increases with time. Table 3 and Figure 3 presents the value of the actual and estimated electricity generation.
Table 3 - Actual anc
Predicted Electricity Generation Using Autoregressive model, mln kWh
S/n Year Actual Predicted S/n Year Actual Predicted
1 1990 1346.3 1219.44 15 2004 2427.5 1912.31
2 1991 1416.7 1280.43 16 2005 2353.9 2297.08
3 1992 1483.4 1346.62 17 2006 2311 2227.87
4 1993 1450.5 1409.34 18 2007 2297.8 2187.53
5 1994 1553.1 1378.41 19 2008 2111 2175.12
6 1995 1585.7 1474.88 20 2009 1977.7 1999.47
7 1996 1624.3 1505.53 21 2010 2612.1 1874.13
8 1997 1611.7 1541.83 22 2011 2703.4 2470.66
9 1998 1511.1 1529.98 23 2012 2870.6 2556.51
10 1999 1608.9 1435.39 24 2013 2888.3 2713.73
11 2000 1472.7 1527.35 25 2014 3039 2730.37
12 2001 1546.3 1399.28 26 2015 3142.6 2872.07
13 2002 2154.4 1468.49 27 2016 3249.73 2969.49
14 2003 2018.3 2040.28 28 2017 3360.52 3070.22
4000,00
e o
■Actual
■Predicted
2 3500,00 §
^ 3000,00
S 2500,00 e
£ 2000,00
re —
e 1500,00
CD
u
fr 1000,00
u
E
500,00 0,00
^^ ^^ c^ ^^ ^^
o cm rn 0000 0000
in VO
o o o
O O "
03 o^ 00 00
CN CO in VO
CNCNCNCNCNCNCNCNCNCNCNCNCNCNCNCNCNCN
Year
Figure 3 - Actual and Predicted Electricity Generation in Nigeria between 1990-2017
Autoregressive model: Electricity consumption Xt = 15.0727 + 0.9492Xt-1
From Table 4 the Autoregressive model parame- where, Tt is the estimated electricity consump-ters for electricity consumption is: tion.
Table 4 - Results ^ for Electricity Consumption Estimation using Autoregressive model
Parameter Coefficient Standard Error AIC r2 RMSE MAE
ß0 15.0727 7.7210 152.33 0.8494 1294.13 210.94
31 0.9492 0.0543
The model gave r2 of0.8494 which means that the Autoregressive model explains 84.9% of the variance in electricity consumption. The coefficient of ]Tt which is 0.9492, implies that electricity
consumption in Nigeria increases with time. The value of the actual and estimated electricity consumption is shown in Table 5 and Figure 4.
Table 5 - Actual and Predicted Electrici
y Consumption Using Autoregressive model, mln kWh
S/n Year Actual Predicted S/n Year Actual Predicted
1 1990 829.32 903.7 15 2004 1672.55 1290.978
2 1991 884.02 802.264 16 2005 1796.03 1602.657
3 1992 910.81 854.1852 17 2006 1592.28 1719.864
4 1993 1,045.81 879.6113 18 2007 2033.55 1526.465
5 1994 1,020.39 1007.756 19 2008 1912.57 1945.318
6 1995 987.89 983.6238 20 2009 1861.02 1830.484
7 1996 950.22 952.7789 21 2010 2162.82 1781.553
8 1997 929.95 917.0173 22 2011 2446.58 2068.021
9 1998 894.57 897.7821 23 2012 2620.86 2337.366
10 1999 904.20 864.1997 24 2013 2452.17 2502.793
11 2000 911.60 873.341 25 2014 2549.72 2342.672
12 2001 947.88 880.3647 26 2015 2652.35 2435.267
13 2002 1346.50 914.8022 27 2016 2746.02 2532.683
14 2003 1344.19 1293.171 28 2017 2849.72 2621.595
e
o
3 000,00
2 500,00
Actual
■Predicted
2 000,00
e
o u
o a
u
u
E
e o
1 500,00
1 000,00
500,00
^^^C^C^C^C^C^C^C^OOOOOOOOOOt—IT—IT—IT—IT—IT—IT—I^H (^(^(^(^(^(^(^(^(^(^OOOOOOOOOOOOOOOOOO T—IT—IT—IT—IT—IT—IT—IT—IT—IT—ICNCNCNCNCNCNCNCNCNCNCNCNCNCNCNCNCNCN
Year
Figure 4 - Actual and Predicted Electricity Consumption in Nigeria between 1990-2017
Harvey model: Electricity production
From Table 6, with r2 value of 0.9072, the Harvey model accounted for 90.7% of the variation in
electricity generation. Moreover, the coefficient of t is positive (f = 0.0155) which means that electricity generation increases with time.
Table 6 - Results for Electricity Generation Estimation using
Parameter Coefficient Standard Error AIC r2 RMSE MAE
<x 0.019984 0.03810 149.18 0.9072 1121.41 152.70
ß -0.07355 22.6370
r 0.01546 0.00563
Harvey Moc
el
The Harvey model is:
ln
ln(j^) = ain(Xt-i)+ ß + ft (y^) = 0.0199ln(Xt-1) - 0.0736
x,
+ 0.0155t
= 0.0199ln(Xt-1) + 0.0155t
Xt = Xt-iexp (aln(Xt-i) +ß + ft
Xt = Xt ! e(0.0199in(Zt-1)+0.0155t-0.07356
Table 7 and Figure 5 present the actual and predicted value of electricity generation based on the Harvey model.
0.0736
Table 7 - Actual and Predicted Electricity Generation Using Harvey model, mln
kWh
S/n Year Actual Predicted S/n Year Actual Predicted
1 1990 1346.3 1389.06 15 2004 2427.5 2217.19
2 1991 1416.7 1467.06 16 2005 2353.9 2676.57
3 1992 1483.4 1545.34 17 2006 2311 2593.83
4 1993 1450.5 1619.59 18 2007 2297.8 2545.62
5 1994 1553.1 1582.96 19 2008 2111 2530.79
6 1995 1585.7 1697.24 20 2009 1977.7 2321.11
7 1996 1624.3 1733.58 21 2010 2612.1 2171.71
8 1997 1611.7 1776.64 22 2011 2703.4 2884.34
9 1998 1511.1 1762.58 23 2012 2870.6 2987.21
10 1999 1608.9 1650.44 24 2013 2888.3 3175.77
11 2000 1472.7 1759.46 25 2014 3039 3195.74
12 2001 1546.3 1607.67 26 2015 3142.6 3365.90
13 2002 2154.4 1689.66 27 2016 3249.73 3482.97
14 2003 2018.3 2369.79 28 2017 3360.52 3604.13
3500
£ 3000
& 2500 e
■.§ ^ 2000 re p s- o
ë S 1500
cd s
^ ^ 1000 'u
u
e
■Actual
■Predicted
500 0
OHtvjm'tmiiiNmo*
c^ ^
^^ ^
000000000011111111 000000000000000000 222222222222222222 Year
Figure 5 - Actual and Predicted Electricity Generation in Nigeria between 1990-2017
Harvey model: Electricity consumption
From Table 8, with r2 value of 0.9485, the Harvey model accounted for 94.85% of the variation in
electricity consumption. Moreover, the coefficient of t is positive (f = 0.1979) which means that electricity consumption increases with time.
Table 8 - Results for Electricity Consumption Estimation using Harvey Model
Parameter Coefficient Standard Error AIC r2 RMSE MAE
cc 0.001558 7.7210 141.22 0.9485 835.63 113.06
ß -0.164895 24.1191
9 0.197852 0.2730
The Harvey model is:
In
ln(j^) = aln(Xt-1)+fi+Yt
= 0.0016ln(Xt-1) - 0.1649
Xt X
+ 0.19191
= 0.0016ln(Xt-1) + 0.1919t
Xt = Xt-iexp (ccln(Xt-1) +ß + ?t
Xt = Xt ! e(° °016ln(Xt-1)+0.1979t -0.1649
Table 9 and Figure 6 present the actual and predicted value of electricity consumption based on the Harvey model.
- 0.1649
Table 9 - Actual and Predicted Electricity Consumption Using the
Harvey moc
S/n Year Actual Predicted S/n Year Actual Predicted
1 1990 829.32 852.88 15 2004 1672.55 1404.91
2 1991 884.02 866.13 16 2005 1796.03 1748.70
3 1992 910.81 923.34 17 2006 1592.28 1878.01
4 1993 1045.81 951.37 18 2007 2033.55 1664.64
5 1994 1020.39 1092.62 19 2008 1912.57 2126.78
6 1995 987.89 1066.02 20 2009 1861.02 2000.06
7 1996 950.22 1032.02 21 2010 2162.82 1946.07
8 1997 929.95 992.61 22 2011 2446.58 2262.19
9 1998 894.57 971.40 23 2012 2620.86 2559.48
10 1999 904.20 934.38 24 2013 2452.17 2742.10
11 2000 911.60 944.46 25 2014 2549.72 2565.34
12 2001 947.88 952.20 26 2015 2652.35 2667.55
13 2002 1346.50 990.16 27 2016 2746.02 2775.10
14 2003 1344.19 1407.33 28 2017 2849.72 2873.26
el, mln kWh
c 3500
CD
cl^ 3000 Ü §
3 S 2500 e s o S
u ^ 2000
% 1500 H &
ju 1000
w
500 0
• Actual — —Predicted
O^HtNrO^Ln^Ot^OO^O^HtNrO^Ln^Ot^OO^O^HtNrO^Ln^Ot^ ONONONONONONONONONONOOOOOOOOOO^H^H^H^H^H^H^H^H ONONONONONONONONONONOOOQOOOOOOOOOOOOOO
YeSEP (N(N(N(N(N(N(N(N(N(N(N(N(N
Figure 6 - Actual and Predicted Electricity Consumption in Nigeria between 1990-2017
Markov chain model
The Markov chain model is used in the prediction of generation and consumption of electricity in Nigeria. Based on the average generation and consumption of electricity, states were classified into five possible states (1, 2, 3, 4, 5). The generation volumes are expressed as 1 = very low (<1,500 MWh), 2 = low (1,501-2,000 MWh), 3 = middle (2,001-2,500 MWh), 4 = high (2,501-3,000 MWh), 5 = very high (>3,000 MWh). Similarly, the consumption volume of electricity were classified into five possible states (1, 2, 3, 4, 5), and expressed as 1 = very low (<1,000 MWh), 2 = low (1,001-1,500 MWh), 3=middle (1,501-2,000 MWh), 4 = high (2,001-2,500 MWh), 5 = very high (>2,500 MWh). If Xt denotes the state of the volume of electricity generated and consumed for a
given year, Xt is a random variable describing the electricity generated and consumed on the tth period and is termed as "the state" of the process.
Electricity Generation. Below is the transition matrix of electricity generation defined by the following states: Very Low, Low, Middle, High, Very High
The transition matrix de
ined as follows:
Very Low Low Middle High Very High
Very Low 0.5000 0.20 0.3000 0 0
Low 0.4625 0.24 0.2975 0 0
Middle 0.4375 0.20 0.3625 0 0
High 0.4375 0.20 0.3625 0 0
Very High 0.5000 0.19 0.3100 0 0
Table 10 - Results for Electricity Generation Estimation using Markov Chain Model
Parameter Coefficient Standard Error AIC r2 RMSE MAE
1300-1500 (Very low) 0.8 0.4010 142.1 0.9613 1027.32 193.44
1501-2000 (Low) 1.075 0.5307
2001-2500 (Middle) 0.9821 0.4749
2501-3000 (High) 0.8929 0.5758
3000+ (Very High) 1.2500 0.8273
From Table 10, with r2 value of 0.9613, it means that the Markov chain model accounted for 96.13% of the variance in electricity generation. The coefficient of the parameter at the space-time
is positive (1.2500) which means that electricity generation in Nigeria increases with the same space-time. The value of the actual and estimated electricity generation are shown in Table 11 and Figure 7.
Table 11 - Actual and Predicted Electricity Generation Using Markov Chain Model, mln kWh
S/n Year Actual Predicted S/n Year Actual Predicted
1 1990 1346.3 1415.23 15 2004 2427.5 2476.11
2 1991 1416.7 1487.46 16 2005 2353.9 2323.16
3 1992 1483.4 1522.10 17 2006 2311 2611.47
4 1993 1450.5 1593 18 2007 2297.8 2418.30
5 1994 1553.1 1630.45 19 2008 2111 2599.20
6 1995 1585.7 1622.80 20 2009 1977.7 2227.38
7 1996 1624.3 1693.07 21 2010 2612.1 2010.49
8 1997 1611.7 1736.91 22 2011 2703.4 2882.11
9 1998 1511.1 1710.3 23 2012 2870.6 2934
10 1999 1608.9 1662.13 24 2013 2888.3 3129.68
11 2000 1472.7 1777.9 25 2014 3039 3481.71
12 2001 1546.3 1563.82 26 2015 3142.6 3421.84
13 2002 2154.4 1700.74 27 2016 3249.73 3305.12
14 2003 2018.3 2311.19 28 2017 3360.52 3725.09
e
CD
+3 t—■
re c
S- CD
CD .S
c =
S Ü
u CD
4000 3000 2000 1000
■Actual
•
• Predicted
Ml»
0 1 2 3 4 m 03 0 2 3 4 m 03 0 1 2 3 4 m
0 o 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 o 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 2 (N 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Year
0
Figure 7 - Actual and Predicted Electricity Generation in Nigeria between 1990-2017
Electricity Consumption. Below is the transition matrix of electricity consumption defined by the following states: Very Low, Low, Middle, High, and Very High.
From Table 12, with r2 value of 0.9417, implies that the Markov chain model accounted for 94.17% of the variance in electricity consumption. Moreover, the coefficient of the parameter at the space-time is positive (1.2500) which means that electricity consumption in Nigeria increases with the same space-time.
The transition matrix defined as follows:
Very Low Low Middle High Very High
Very Low 0.375 0.20 0.3375 0.0875 0
Low 0.275 0.24 0.2925 0.1925 0
Middle 0.375 0.20 0.3375 0.0875 0
High 0.375 0.20 0.3375 0.0875 0
Very High 0.400 0.19 0.2800 0.1300 0
The value of the actual and estimated electricity consumption using the Markov chain is shown in Table 13 and Figure 8.
Table 12 - Electricity Consumption Estimation using Markov Chain Model
Parameter Coefficient Standard Error AIC r2 RMSE MAE
800-1000 (Very low) 0.9 0.3010 150.42 0.9417 888.89 123.05
1001-1500 (Low) 0.85 0.5330
1501-2000 (Middle) 1.05 0.6501
2001-2500 (High) 0.95 0.6330
2501+ (Very High) 1.250 0.7500
Table 13 - Actual and Predicted Electricity Consumption Using Markov Chain Model, mln kWh
S/n Year Actual Predicted S/n Year Actual Predicted
1 1990 829.32 845.10 15 2004 1672.55 1410
2 1991 884.02 877.89 16 2005 1796.03 1698.57
3 1992 910.81 935.28 17 2006 1592.28 1840.27
4 1993 1045.81 979.23 18 2007 2033.55 1704.98
5 1994 1020.39 1103.5 19 2008 1912.57 2100.50
6 1995 987.89 1043.83 20 2009 1861.02 2189.10
7 1996 950.22 1001.34 21 2010 2162.82 1973.56
8 1997 929.95 982.24 22 2011 2446.58 2544.80
9 1998 894.57 960.18 23 2012 2620.86 2599.30
10 1999 904.20 901.39 24 2013 2452.17 2811.11
11 2000 911.60 920.67 25 2014 2549.72 2680.12
12 2001 947.88 939.56 26 2015 2652.35 2709.76
13 2002 1346.50 971.88 27 2016 2746.02 2888.71
14 2003 1344.19 1398.45 28 2017 2849.72 2973.87
e
'■M fp
¡1
o S
u &
u
E
3500 3000 2500 2000 1500 1000 500 0
■Actual
■Predicted
• • • •
V V V V V V V V V s
Year
Figure 8 - Actual and Predicted Electricity Consumption in Nigeria between1999-2017
Tables 14 and 16 compared the appropriateness of Autoregressive, Harvey, and Markov models on electricity generation and consumption in Nigeria. Specification measures such as; Coefficient of determination (r2), Root Mean Square Error (RMSE), and Akaike Information Criterion (AIC) were applied.
Table 14 reveals that the Markov chain model predicted better than the Harvey and Autoregressive models for electricity generation, as it gave a higher value of the coefficient of determination (r2=96.0%), lower Root Mean Square Error
(1027.32), and Akaike Information Criterion (142.1).
The forecasting of electricity generation is obtained from the Markov chain model by extrapolating the data from the year 2018 to 2037. Table 15 shows the forecast for electricity generation in Nigeria using the best-selected Model (Markov Chain Model). The forecast values in Table 15 and Figure 9 indicate that electricity generation in Nigeria is continuously increasing. Electricity generation in Nigeria will increase from 3,692.11 mln kW/h in 2018 to 18,250.67 mln kW/h in 2037.
Table 14: Comparison of the Forecasting Accuracy of the Autoregressive model, Harvey and Markov Chain Model for Electricity Generation_
Model AIC r2 RMSE
Autoregressive 157.99 0.82 1,266.88
Harvey 149.18 0.91 1,121.41
Markov Chain 142.1 0.96 1,027.32
Table 15: Forecast of Electricity production using the Mar
S/n Year Forecast of Electricity Generation, mln kWh S/n Year Forecast of Electricity Generation, mln kWh
1 2018 3,692.11 11 2028 7,037.88
2 2019 3,411.37 12 2029 8,293.03
3 2020 3,210.68 13 2030 9,630.90
4 2021 3,002.87 14 2031 10,793.30
5 2022 3,000.43 15 2032 11,820.40
6 2023 3,220.20 16 2033 12,950.46
7 2024 3,792.00 17 2034 14,987.74
8 2025 4,832.56 18 2035 15,503.56
9 2026 5,503.00 19 2036 16,689.19
10 2027 5,997.19 20 2037 18,250.67
<ov chain Models (2018-2037)
■Forecast of Electricity Production (kWh) (Million)
o P
w ^
0É fU
E
-J
E
20000,00 18000,00 16000,00 14000,00 12000,00 10000,00 8000,00 6000,00 4000,00 2000,00 0,00
20 1 82 0 1 92 0 2 02 0 2 12 0 2 22 0 2 32 0 2 42 0 2 52 0 2 62 0 2 72 0 2 82 0 2 92 0 3 02 0 3 12 0 3 22 0 3 32 0 3 42 0 3 52 0 3 62 0 3 7
YEAR
Figure 9 - The plot of Forecasted Electricity Generation in Nigeria from 2018 - 2037
Table 16 reveals that the Harvey model predicted better than the Markov and Autoregressive models for electricity consumption, as it gave a higher value of the coefficient of determination (r2=95.0%), lower Root Mean Square Error (835.63), and Akaike Information Criterion (141.22).
Table 17 shows the forecast of electricity consumption in Nigeria using the best-selected Model
(Harvey model). The forecasting of electricity consumption is obtained from the Harvey model by extrapolating the data from the year 2018 to 2037. The forecast values in Table 17 and Figure 10 indicate that electricity consumption in Nigeria is continuously increasing. Electricity consumption in Nigeria will increase from 2,961.10 mln kW/h in 2018 to 127,071.30 mln kW/h in 2037.
Table 16 - Comparison of the Forecasting Accuracy of the Autoregressive model, Harvey and Markov Chain Model for Consumption_
Model AIC r2 RMSE
Autoregressive 152.33 0.85 1294.13
Harvey 141.22 0.95 835.63
Markov Chain 148.42 0.94 888.89
Table 17 - Forecast of Electricity consumption using the Harvey Models (2018-2037)
S/n Year Forecast of Electricity Consumption, mln kWh S/n Year Forecast of Electricity Consumption, mln kWh
1 2018 2,961.10 11 2028 21,414.76
2 2019 3,608.93 12 2029 26,099.92
3 2020 4,398.50 13 2030 31,810.12
4 2021 5,360.82 14 2031 38,769.60
5 2022 6,533.67 15 2032 47,251.69
6 2023 7,963.12 16 2033 57,589.50
7 2024 9,705.30 17 2034 70,189.05
8 2025 11,828.65 18 2035 85,545.15
9 2026 14,416.54 19 2036 104,260.89
10 2027 17,570.62 20 2037 127,071.30
^ 140000
o
2 120000
•Forecast of Electricity Consumption (kWh) (Million)
100000
e
o u
IS"
80000 60000 40000 20000 0
20182019202020212022 2023 20242025202620272028202920302031203220332034203520362037
Year
Figure 10 - The plot of Forecasted Electricity Consumption in Nigeria from 2018-2037
CONCLUSION
Forecasting electricity generation and consumption is an important component of the electricity market, as it helps to plan production along with required demand and to prevent energy wastage and system failure. This paper has investigated the effectiveness and validation of three different models; Markov chain, Harvey, and Autoregressive models in modeling electricity generation and consumption in Nigeria. From the analysis performed, it was discovered that the coefficient of t is positive which means that electricity generation and consumption increases with time. There is strong evidence in favor of the fact that there is an increase in demand and consumption of electricity in Nigeria. Again, modeling historical data on generation and consumption was better explained by the Markov chain model for the
generation data and Harvey model for the consumption data. This corresponds to what can be observed from the time series plot in Figures 9 & 10 respectively, which shows the trend in generation and consumption of electricity. The Markov chain and Harvey models also performed better in the prediction of electricity generation and consumption. Hence, the two models are better for describing generation and consumption volume of electricity respectively.
Based on the results obtained from Markov and Harvey models in predicting generation and consumption of electricity, we can conclude that the demand for electricity in Nigeria will maintain an upswing over time. This is evident in the historical data which shows that generation and consumption have majorly been on the increase yearly.
REFERENCES
1. Nwankwo, O. C., & Njogo, B. O. (2010). The effect of electricity supply on industrial production within
the Nigerian economy (1970-2010). Journal of Energy Technologies and Policy, 3, 34-42.
2. Alani, A. Y., & Osunmakinde, I. O. (2017). Short-Term Multiple Forecasting of Electric Energy Loads for
Sustainable Demand Planning in Smart Grids for Smart Homes. Sustainability, 9(11), 1972. doi: 10.3390/su9111972
3. Almeshaiei, E., & Soltan, H. (2011). A methodology for Electric Power Load Forecasting. Alexandria
Engineering Journal, 50(2), 137-144. doi: 10.1016/j.aej.2011.01.015
4. Mwangi, C., Ali, I., Luke, O. & Olivia, W. (2014). Statistical modeling of electricity Prices using time series
model. International Journal of Science and Research, 3(11), 1405-1409.
5. Oyediran Oyelami, B., & adedoyin Adewumi, A. (2014). Models for Forecasting the Demand and Supply
of Electricity in Nigeria. American Journal of Modeling and Optimization, 2(1), 25-33. doi: 10.12691/ajmo-2-1-4
6. Katara, S., Faisal, A. & Engmann, G. M. (2014). A Time Series Analysis of electricity demand in Tamale,
Ghana. International Journal of Statistics and Applications,4, 269-275.
7. Ozoh, P., Abd-Rahman, S., & Labadin, J. (2015). Predicting electricity consumption: A comparative anal-
ysis of the accuracy of various computational techniques. 2015 9th International Conference on IT in Asia (CITA). doi: 10.1109/cita.2015.7349819
8. Amazuilo Ezenugu, I. (2017). Modelling and Forecasting of Residential Electricity Consumption in Ni-
geria Using Multiple and Quadratic Regression Models. American Journal of Software Engineering and Applications, 6(3), 99. doi: 10.11648/j.ajsea.20170603.17
9. Samuel, I. A., Emmanuel, A., Odigwe, I. A., ... Felly-Njoku, F. C. (2017). A Comparative Study of Regres-
sion Analysis and Artificial Neural Network Methods for Medium-Term Load Forecasting. Indian Journal of Science and Technology, 10(10), 1-7. doi: 10.17485/ijst/2017/v10i10/86243
10. Idoniboyeobu, D. C., Ogunsakin, A. J. & Wokoma, B. A. (2018). Forecasting of Electrical Energy Demand in Nigeria using Modified Form of Exponential Model. American Journal of Engineering Research, 7(1), 122-135.
11. Isah, N., & Bon, A. T. (2017). Application of Markov Model in Crude Oil Price Forecasting. Path of
Science, 3(8), 1007-1012. doi: 10.22178/pos.25-3