Visionary leadership is a dynamic blend of heterogeneous qualities such as: integrity, ability to set achievable goals, empowering the masses to achieving the goals, being courageous in making proper decisions for tackling challenging problems, being creative in bringing out innovative ideas for economic and technological transformations, etc. Regrettably, Nigeria has been facing a lot of technological and economic challenges due to lack of visionary leaders ever since the inception of the fourth republic from 1999 to date. The root of this problem is due to improper screening of candidates vying for various political offices during party primary elections which are marred with money-politics whereby the highest bidder always emerges as the party’s representative for a given political office. This work therefore developed a statistical formula that uses the Decision Tree technique – which is a machine learning model – as a veritable tool for screening and selecting credible candidates during party primaries so that visionary leaders can be elected to contribute positively towards the technological and economic well-being of the masses. The variables used by the Decision Tree technique for screening candidates are: integrity, interpersonal skills, leadership experience, exposure, and academic qualification. The probability of success of a candidate based on the first two variables were determined through an online opinion poll collected from the party members (using simulation as a hypothetical example), while the probability of success of a candidate based on the last three variables were obtained from the candidate’s CV and certificates. The various probabilities of successes for each candidate were analyzed by the developed statistical formula. The candidate whose overall probability of success is closest to one (1), becomes the most visionary leader selected as the party’s flag bearer for a given political office.