 Methodology
 Open Access
 Published:
A Markov chain Monte Carlo (MCMC) methodology with bootstrap percentile estimates for predicting presidential election results in Ghana
SpringerPlus volume 4, Article number: 525 (2015)
Abstract
Although, there exists numerous literature on the procedure for forecasting or predicting election results, in Ghana only opinion poll strategies have been used. To fill this gap, the paper develops Markov chain models for forecasting the 2016 presidential election results at the Regional, Zonal (i.e. Savannah, Coastal and Forest) and the National levels using past presidential election results of Ghana. The methodology develops a model for prediction of the 2016 presidential election results in Ghana using the Markov chains Monte Carlo (MCMC) methodology with bootstrap estimates. The results were that the ruling NDC may marginally win the 2016 Presidential Elections but would not obtain the more than 50 % votes to be declared an outright winner. This means that there is going to be a runoff election between the two giant political parties: the ruling NDC and the major opposition party, NPP. The prediction for the 2016 Presidential runoff election between the NDC and the NPP was rather in favour of the major opposition party, the NPP with a little over the 50 % votes obtained.
Background
The prime concern for any political party is to map up strategies that would aid them to win an election particularly, the presidential election. This is of key interest to political analysts and the mass media as they would like to discuss and compare parties’ campaign strategies. There is the need therefore to study these political strategies and come up with a mathematical model to predict future elections. Most researchers (Wang et al. 2014; Boon 2012; Campbell and LewisBeck 2008) have published papers on election forecasting using opinion polls but not on Markov chain Monte Carlo (MCMC) approach. This research is motivated in introducing this statistical technique to predict the election results in Ghana.
Elections in Ghana can be classified as a random process and similar to the incremental methods, the knowledge of outcomes of previous elections can be used for predictions of future elections. In probability theory, Markov chains are an important type of processes used to study experiments in which the outcomes can be affected by the outcomes of all previous experiments. What is more important about Markov chains is that the outcome of an experiment depends only on the previous experiment. The Ghana Presidential elections from the fourth republic often appear to “flipflop” after two terms (i.e. a National Democratic Congress (NDC) candidate will win two terms and a National Patriotic Party (NPP) candidate will win the next two terms). MCs should therefore be a useful tool for predicting election results. However, the large literature on methods of predicting election results does not include Markov chain (MC) models in Ghana. One can find the studies on the US presidential elections and the British elections using Markov chains (see for example Wagner 2012; Certin and Bentli 2013).
This paper uses Markov chains generated from previous election data to predict the 2016 presidential elections in Ghana. Confidence intervals for these predictions are obtained from bootstrap percentiles.
Electoral history of Ghana
The country Ghana which was formerly called the Gold Coast came into existence after so many years of being under the British colony and GermanTogo land territory. In 1957, Ghana gained independence under the leadership of Osagyefo Dr. Kwame Nkrumah and became the first West African country to have won freedom from its colonial masters. For over a decade, in 1966–69, 1972–79 and 1981–92 respectively (Asante and GyimahBoadi 2004) there had been numerous coup d’états which had affected the socioeconomic processes of the new born country Ghana.
When Ft. Lt. Jerry John Rawlings took over power in 1981 (Rothschild 1985), he banned political parties until 1992 (Handley 2008) when he lifted the ban and restored the country Ghana to multiparty democracy and also introduced a new constitution. He later formed a new party called the National Democratic Congress (NDC) and was voted into power in 1992 and 1996 elections (BimpongButa 2005).
After his 2nd term, a new opposition party by then known as the National Patriotic Party (NPP) was formed under the DankwaBusia tradition (Ayee 2009) and led by John Agyekum Kuffour also won for two terms, in 2000 and 2004 elections.
The NDC again is in its 2nd term (i.e. 2008date) for the 2nd time and is currently led by John Dramani Mahama
Since the introduction of the new constitution by Rawlings in 1992, voting patterns have been swindling and that’s why it is of key interest to researchers, political analysts and mass media as a whole, to find answers to why this phenomenon.
Ghana as displayed in Fig. 1 is spatially divided into three ecological zones, namely: the Savannah belt that consists of the Northern, Upper East and Upper West regions; the Forest or Middle belt consisting of Ashanti, Brong Ahafo and Eastern regions with the largest representation of the Akans and finally the Coastal belt which consists of the Western, Central, Greater Accra an Volta regions. It is believed that voting is actually characterized by ethnic sentiments and thus the study would want to find out if predicted results of the 2016 elections really follow that assertion.
Markov chains
Let X = {X _{0}, X _{1},…} be a sequence of random variables taking values in some countable set S = {s _{1}, s _{2},…} referred to as state space. The sequence {X _{0}, X _{1},…}is called a Markov chain if
for all k ≥ 1 and x _{0},…, i, j in S. In addition, if
then the Markov chain is homogeneous. Here, p _{ ij } in Eq. (2) is referred to as the matrix of transition probabilities and it satisfies the following conditions:
and
Each transition is called a step. Any matrix satisfying Eqs. (2), (3) and (4) is referred to as a stochastic matrix. In addition if \(\sum\limits_{i} {p_{ij} = 1}\) then it is called a doubly stochastic matrix.
The firstorder difference equation of a MC is expressed as
where P is an mbym square matrix.
Theorem 1
Let P be a matrix of transition probabilities of a Markov chain. The ijth element \(p_{{_{ij} }}^{n}\) of the matrix P ^{n} is the given probability that the Markov chain starting in state s _{ i } will transition to state s _{ j } after nsteps.
If p _{ ij } is regular, then there is a unique vector ϕ _{ r } such that, for any probability vector ϕ _{0} and for large values of r,
Here the vector ϕ _{ r } in Eq. (6) is called equilibrium or an ergodic vector of the MC. Therefore, we can compute probability vectors given that the transition matrix and the original probability vector are known (Lay 2011; Lial et al. 2012).
Methodology
In Ghana, the Presidential election results are determined by the Electoral Commission (EC) and the elections are carried out at various constituencies in each Region. In this paper, the Upper East, Upper West and Northern regions form the Savannah Zone; BrongAhafo, Ashanti and Eastern regions form the Forest Zone; and Western, Central, Greater Accra and Volta regions form the Coastal Zone. In the Ghana Presidential elections, each candidate receives a certain number of votes and the candidate with more than 50 % of the total valid votes casted wins the presidential election in Ghana. Otherwise, a runoff election is organized for the two topmost candidates.
We used the 1992–2008 Presidential election results to generate a stochastic matrix and the 2012 Presidential results as the probability vector to predict the 2016 Presidential election results. Following the methodology of Wagner (2012), the transition probability matrices are created from the previous election results as depicted in Table 1.
We let ϕ _{ i }, i = 1, 2,…, 8 represent the presidential election results for 1992, 1996,…, 2012. Thus, we have:
The stochastic matrix for the model is thus obtained by averaging the transformation of the previous election results. This is the socalled Average Transformation Method (ATM) of Wagner (2012). Let L _{ i }, i = 1,…, 7 be the transformation matrix from ith to the (i + 1)th election results such that L _{ i } ϕ _{ i } = ϕ _{ i+1}. For instance, L _{1}is the transformation matrix of the Presidential Elections results from 1992 to 1996 is given by
where, O and R are Other parties and Rejected votes respectively. Here, L _{1} is unknown but the probability vectors for the 1992 and 1996 elections are known and hence from Eq. (5), we have
where, l _{11} is the percentage of people who voted for NDC in the 1992 PE that also voted for the same party in the 1996 PE. Similar, explanations holds for l _{ ij }, ∀i, j = 1, 2, 3, 4.
For the use of MC analysis, the following assumptions were made:

1.
Everyone who voted in the preceding election year voted in the following election year.

2.
There is an equal probability for voting for another party in the following election year provided you did not vote for these parties in the preceding election year.

3.
Other parties which did not take part in runoff elections were recorded zero.

4.
There is no rejected votes in all runoff elections
Based on the first assumption,
and
Similarly, the percentage of other political parties l _{33} = 0.0137/0.01370.1130.0.1130 = 0.1212 and l _{31} = l _{32} = l _{34} = 0.2929. However, the percentage of NPP votes increased from 1992 to 1996, so we have l _{22} = 1 and l _{21} = l _{23} = l _{24} = 0.
In addition l _{44} = 1 and l _{41} = l _{42} = l _{43} = 0.
Therefore, as specified in Eq. (8), we have:
The same procedure is followed to obtain the other transformation matrices L _{2}…., L _{7}. The average of the transition matrices are obtained as \({\mathbf{P}} = 7^{  1} \sum\limits_{i = 1}^{7} {L_{i} }\).
Using the steady state property of Eq. (5), we obtain the following results as shown in Table 2.
Since no candidate is expected to obtain more than 50 % in the 2016 Presidential votes by the model results: there will be no clear winner in the 2016 first round elections. Hence, a runoff vote between the two dominant parties i.e. the NDC and the NPP.
To model this, we follow assumptions 3 and 4 to modify Table 1 as follows:
Applying the procedure to the generated observations in Table 3 yields the predicted values as shown in Table 4. Figures 2 and 3 display respectively, the regional and ecological zone forecasts 2016 Presidential Election with Bootstrap estimates.
Similarly the same methodology was applied to the regional and ecological Presidential Election results to predict the runoff results in 2016. The results are as shown below:
Table 5 shows the model’s predictions for the regional presidential election results for the 2016 presidential elections. The results show that the NDC is the popular choice of voters in the Western (50.64 %), Greater Accra (50.64 %), Volta (82.8 %), Northern (57.5 %), Upper East (65.09 %), and Upper West (63.35 %) whereas the NPP is popular in the Eastern (50.6 %) and Ashanti (70.58 %) regions.
The prediction of the Ecological zone presidential election results are presented in Table 6. The NDC has over 50 % of valid votes from the Savannah and Coastal belts whereas the NPP, their closest oponents remain the toast of the forest belt.
Forecasting the regional presidential votes for 2016
Western region
which equals \(\left[ {0. 5 1 6 2 { }\,\,0. 4 3 8 1 { }\,0.\,0 2 2 1 { }\,\, 0. 0 2 3 6} \right]\)
Central region
which equals \(\left[ {0. 4 8 9 5 { }\,\,0. 4 5 4 4 { }\,0.0 2 5 2 { }\,\,0.0 30 8} \right]\)
Greater Accra region
which equals \(\left[ {0. 50 6 4 { }\,0. 4 5 7 3 { }\,0.0 1 7 3 { }\,\,0.0 1 90} \right]\)
Volta region
which equals \(\left[ {0. 40 3 6 { }\,0. 5 6 60 \, \,0.0 1 4 7 { }\,\,0.0 1 5 6} \right]\)
Eastern region
which equals \(\left[ {0. 8 2 80 \, \,0. 1 3 9 1 { }\,0.0 1 3 3 { }\,\,0.0 1 9 6} \right]\)
Ashanti region
which equals \(\left[ {0. 2 6 6 6 { }\,0. 70 5 8 { }\,0.0 1 2 9 { }\,\,0.0 1 4 8} \right]\)
Brong Ahafo region
which equals \(\left[ {0. 4 8 3 5 { }\,0. 4 8 5 8 { }\,0.0 1 5 6 { }\,\,0.0 1 5 1} \right]\)
Northern region
which equals \(\left[ {0. 5 7 50 \, \,0. 3 7 8 4 { }\,0.0 2 1 4 { }\,0.0 2 5 2} \right]\)
Upper east
which equals \(\left[ {0. 6 50 9 { }\,0. 2 7 6 8 { }\,0.0 3 8 4 { }\,0.0 3 3 9} \right]\)
Upper West
which equals \(\left[ {0. 6 3 3 5 { }\,0. 30 4 9 { }\,0.0 2 8 2 { }\,0.0 3 3 5} \right]\)
Forecasting ecological zone for presidential votes
Savannah zone
which equals \(\left[ {0. 5 4 7 2 { }\,0. 30 9 9 { }\,0.0 2 7 2 { }\,0. 1 1 5 8} \right]\)
Forest zone
which equals \(\left[ {0. 3 4 5 1 { }\,0. 6 1 4 7 { }\,0.0 1 9 6 { }\,0.0 20 6} \right]\)
Coastal zone
which equals \(\left[ {0. 5 2 3 6 { }\,0. 3 9 8 3 { }\,0.0 3 8 9 { }\,0.0 3 9 1} \right]\)
Conclusion
The model used in this study predicted the party that will win the 2016 PE with NDC having 49.72 %, NPP (47.52 %) and Other parties and Rejected votes having 1.8 and 0.96 %. The overall average error in this prediction was estimated as ≈2.4 %. This was determined by finding the absolute percentage differences between the predicted and the actual results for previous elections.
It is evidently clear that both NPP and NDC have approximately 47 % of loyal voters who would always vote for these parties on any day and any time. Therefore with more education on how to reduce rejected votes, certainly would show a significant effect in the 2016 PE. Thus, the party that would channel lots of resources into voter education could sway the results in its favour.
A further study on this research is to also use other sophisticated mathematical models like Bayesian Estimation to compare the results of this method.
References
Asante R and GyimahBoadi E (2004) Ethnic structure, inequality and governance of the public sector in Ghana, United Nations Research Institute for Social Development (UNRISD), pp 58–70
Ayee JR (2009) “The evolution and development of the new patriotic party in Ghana”, SAIIA, Occasional Paper, No 19
BimpongButa SY (2005) “The role of the supreme court in the development of constitutional law in Ghana”, Doctor of Law—LLD Thesis, University of South Africa
Boon M (2012) Predicting elections, a wisdom of crowds approach. Int J Mark Res 54(4):465–483
Campbell JE, LewisBeck MS (2008) US presidential election forecasting: an introduction. Int J Forecast 24:189–192
Certin N, Bentli I (2013) Application of Markov Process to forecast elections outcomes by computer simulation, Epoka conference systems, First international conference on management and economics, pp 104–110
Handley A (2008) “The world bank made me do it: international factors and Ghana’s transition to democracy”, CDDRL Working Papers, No 82, Standford University, CA
Lay DC (2011) Linear algebra and its applications, 4th edn. Addison Wesley, USA, pp 253–259, 360–365
Lial ML, Greenwell RN, Ritchey NP (2012) Finite mathematics, 10th edn. Pearson Education, Inc, New York, pp 453–458
Rothschild D (1985) “The Rawlings revolution in Ghana: pragmatism with populist rhetoric”, CSIS Africa Notes, No 42, pp 1–6
Wagner CS (2012) “U.S. Presidential Election Forecasts: through the lens of linear algebra. Retrieved on 11/03/2014 from http://home2.fvcc.edu/~dhicketh/LinearAlgebra/studentprojects/spring2012/Cassia_Linear%20Algebra%20Project/Final%20Project.pdf
Wang W, Rothschild D, Goel S, Andrew G (2014) “Forecasting elections with non representative polls” international journal of forecasting—Elsevier BV
Authors’contributions
ENNN conceptualized and designed the methodology of the study and also acquired the data and was part of the team who analyzed the data. TAN worked on the literature review, both theoretical and empirical, and was also involved in writing the Rcodes for the analysis. RAA wrote some parts of the discussion of the manuscript. RM wrote the additional Rcodes for the prediction and bootstrap percentile estimates. All authors agree to be accountable for all aspects of the work and jointly own the work. All authors read and approved the final manuscript.
Acknowledgements
The authors are grateful to the Ghana Electoral Commission (EC) for allowing them to use their data sets of Presidential Election results in Ghana.
Compliance with ethical guidelines
Competing interests We, the authors hereby certify that there is no conflict of interest with any organisation regarding the material and the research discussed in the manuscript. The research is also not financed by any entity and so remains the sole work of the authors.
Author information
Affiliations
Corresponding author
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Nortey, E.N.N., AnsahNarh, T., AsahAsante, R. et al. A Markov chain Monte Carlo (MCMC) methodology with bootstrap percentile estimates for predicting presidential election results in Ghana. SpringerPlus 4, 525 (2015). https://doi.org/10.1186/s4006401513102
Received:
Accepted:
Published:
Keywords
 Markov chains
 Stochastic matrix
 Elections
 Forecasting
 NDC
 NPP
 Ghana