- Methodology
- Open Access

# A Markov chain Monte Carlo (MCMC) methodology with bootstrap percentile estimates for predicting presidential election results in Ghana

- Ezekiel N. N. Nortey
^{1}Email author, - Theophilus Ansah-Narh
^{2}, - Richard Asah-Asante
^{3}and - Richard Minkah
^{1}

**Received:**27 April 2015**Accepted:**4 September 2015**Published:**18 September 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 run-off election between the two giant political parties: the ruling NDC and the major opposition party, NPP. The prediction for the 2016 Presidential run-off 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.

## Keywords

- Markov chains
- Stochastic matrix
- Elections
- Forecasting
- NDC
- NPP
- Ghana

## 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 Lewis-Beck 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 “flip-flop” 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 German-Togo 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 Gyimah-Boadi 2004) there had been numerous coup d’états which had affected the socio-economic 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 (Bimpong-Buta 2005).

After his 2nd term, a new opposition party by then known as the National Patriotic Party (NPP) was formed under the Dankwa-Busia 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. 2008-date) 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.

## Markov chains

*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

*k*≥ 1 and

*x*

_{0},…,

*i*,

*j*in

*S*. In addition, if

*p*

_{ ij }in Eq. (2) is referred to as the matrix of transition probabilities and it satisfies the following conditions:

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.

**P**is an m-by-m square matrix.

### Theorem 1

Let **P** be a matrix of transition probabilities of a Markov chain. The *ij*th 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 *n*-steps.

*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; Brong-Ahafo, 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 run-off election is organized for the two topmost candidates.

National presidential election (PE) votes for the period 1992–2012

No. | Year | NDC | NPP | Other | Rejected votes |
---|---|---|---|---|---|

1 | 1992 | 58.4 | 30.3 | 11.30 | 0 |

2 | 1996 | 57.4 | 39.7 | 1.37 | 1.53 |

3 | 2000 | 44.5 | 48.17 | 5.53 | 1.80 |

4 | 2000 | 43.10 | 56.90 | 0 | 0 |

5 | 2004 | 44.64 | 52.45 | 0.78 | 2.13 |

6 | 2008 | 47.92 | 49.13 | 0.55 | 2.4 |

7 | 2008 | 50.23 | 49.77 | 0 | 0 |

8 | 2012 | 50.70 | 47.74 | 1.21 | 0.35 |

*ϕ*

_{ i },

*i*= 1, 2,…, 8 represent the presidential election results for 1992, 1996,…, 2012. Thus, we have:

*L*

_{ i },

*i*= 1,…, 7 be the transformation matrix from

*i*th 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

*L*

_{1}is unknown but the probability vectors for the 1992 and 1996 elections are known and hence from Eq. (5), we have

*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.

- 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 run-off elections were recorded zero.

- 4.
There is no rejected votes in all run-off elections

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.

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} }\).

Predicted 2016 presidential elections with bootstrap standard errors

Year | NDC | NPP | Other | Rejected |
---|---|---|---|---|

Percentage | 48.70 | 47.80 | 1.80 | 1.60 |

SE | 4.80 | 6.4 | 0.26 | 0.80 |

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 run-off 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:

Suggested national presidential run-off votes

Year | % NDC | % NPP | % Other | % Rejected votes |
---|---|---|---|---|

1992 | 64.05 | 35.95 | 0 | 0 |

1996 | 58.85 | 41.15 | 0 | 0 |

2000 | 49.17 | 51.83 | 0 | 0 |

2000 | 43.10 | 56.90 | 0 | 0 |

2004 | 46.10 | 53.90 | 0 | 0 |

2008 | 49.40 | 50.60 | 0 | 0 |

2008 | 50.23 | 49.77 | 0 | 0 |

2012 | 51.48 | 48.52 | 0 | 0 |

Predicted 2016 presidential run-off election results with bootstrap standard errors

NDC | NPP | |
---|---|---|

Percentage | 48.30 | 51.70 |

Bootstrap SE | 5.90 | 5.90 |

Similarly the same methodology was applied to the regional and ecological Presidential Election results to predict the run-off results in 2016. The results are as shown below:

Forecasted regional presidential election results for 2016

Region | NDC | NPP | Other | Rejected votes | |||
---|---|---|---|---|---|---|---|

Main (%) | Run-off (%) | Main (%) | Run-off (%) | Main (%) | Main (%) | Run-off (%) | |

National | 48.70 | 48.30 | 47.80 | 51.70 | 1.80 | 1.60 | – |

Western | 51.62 | 53.27 | 43.81 | 46.73 | 2.21 | 2.36 | – |

Central | 48.95 | 50.95 | 45.44 | 49.05 | 2.55 | 3.08 | – |

Greater Accra | 50.64 | 52.44 | 45.73 | 47.56 | 1.73 | 1.90 | – |

Volta | 82.80 | 83.77 | 13.91 | 16.23 | 1.33 | 1.96 | – |

Eastern | 40.36 | 41.21 | 50.60 | 58.79 | 1.47 | 1.56 | – |

Ashanti | 26.66 | 27.63 | 70.58 | 72.37 | 1.29 | 1.48 | – |

Brong Ahafo | 48.35 | 49.38 | 48.58 | 50.62 | 1.56 | 1.51 | – |

Northern | 57.50 | 60.00 | 37.84 | 40.00 | 2.14 | 2.52 | – |

Upper East | 65.09 | 68.93 | 27.68 | 31.07 | 3.84 | 3.39 | – |

Upper West | 63.35 | 63.46 | 30.49 | 35.54 | 2.82 | 3.35 | – |

Forecasted ecological zone presidential election results for 2016

Ecological | NDC | NPP | Other | Rejected votes | |||
---|---|---|---|---|---|---|---|

Main election (%) | Round-off (%) | Main election (%) | Round-off (%) | Main election (%) | Main election (%) | Run-off (%) | |

National | 49.72 | 48.30 | 47.52 | 51.70 | 1.80 | 0.96 | – |

Savannah | 54.72 | 62.01 | 30.99 | 37.99 | 2.72 | 11.57 | – |

Forest zone | 34.51 | 38.42 | 61.47 | 61.58 | 1.96 | 2.06 | – |

Coastal zone | 52.36 | 52.66 | 39.83 | 47.34 | 3.89 | 3.95 | – |

### 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.

## Declarations

### 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. TA-N worked on the literature review, both theoretical and empirical, and was also involved in writing the R-codes for the analysis. RA-A wrote some parts of the discussion of the manuscript. RM wrote the additional R-codes 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.

**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.

## Authors’ Affiliations

## References

- Asante R and Gyimah-Boadi E (2004) Ethnic structure, inequality and governance of the public sector in Ghana, United Nations Research Institute for Social Development (UNRISD), pp 58–70Google Scholar
- Ayee JR (2009) “The evolution and development of the new patriotic party in Ghana”, SAIIA, Occasional Paper, No 19Google Scholar
- Bimpong-Buta SY (2005) “The role of the supreme court in the development of constitutional law in Ghana”, Doctor of Law—LLD Thesis, University of South AfricaGoogle Scholar
- Boon M (2012) Predicting elections, a wisdom of crowds approach. Int J Mark Res 54(4):465–483View ArticleGoogle Scholar
- Campbell JE, Lewis-Beck MS (2008) US presidential election forecasting: an introduction. Int J Forecast 24:189–192View ArticleGoogle Scholar
- 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–110Google Scholar
- 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, CAGoogle Scholar
- Lay DC (2011) Linear algebra and its applications, 4th edn. Addison Wesley, USA, pp 253–259, 360–365Google Scholar
- Lial ML, Greenwell RN, Ritchey NP (2012) Finite mathematics, 10th edn. Pearson Education, Inc, New York, pp 453–458Google Scholar
- Rothschild D (1985) “The Rawlings revolution in Ghana: pragmatism with populist rhetoric”, CSIS Africa Notes, No 42, pp 1–6Google Scholar
- 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 BVGoogle Scholar