THE French presidential campaign is in full swing, with the first round scheduled for April 23rd and a likely run-off between the top two finishers on May 7th. The election has received an unusual amount of international attention because Marine Le Pen, the National Front candidate, has consistently led the polls. Her success or failure will be widely interpreted as a measure of the continued strength of nationalist populist movements, which enjoyed two triumphs last year in the Brexit referendum and Donald Trump′s election.

The first few months of the race have been highly volatile. The stunningly unpopular incumbent president, François Hollande of the Socialist Party, chose not to stand for reelection rather than face certain defeat. François Fillon, the conservative standard-bearer of the other mainstream party, has seen his chances sink after a French newspaper revealed an ill-timed scandal involving payments to his wife.

Given the large number of candidates and the complexity of the two-stage vote, figuring out where the race stands is deceptively difficult. To provide readers with a clearer sense of what to expect, The Economist has built a statistical model to predict the outcome. First, in order to measure how accurate public surveys have been in the past, we consulted a database compiled by two political scientists, Will Jennings and Christopher Wlezien, of 642 French presidential polls taken since 1965—the first direct election during the Fifth Republic. Next, we aggregate all public polls taken during this year′s campaign, to produce a snapshot of the current state of the race. Finally, we conduct 10,000 random simulations of the election every day, each one representing a single plausible scenario given the latest polling averages, and see how often each candidate wins. Readers interested in learning more about the statistical minutiae of our efforts are invited to read the meaty technical appendix to this post.

A run-off is seen as all but certain, since polls give the leaders merely half of the majority of the first-round vote necessary to avoid one. Indeed, no candidate in French history has ever won a first-round victory. During the two weeks between ballots, the two finalists will vie to win over the supporters of their eliminated rivals. In previous elections, supporters of the mainstream left- and right-wing parties have created an informal alliance, the “front républicain”, to keep the xenophobic National Front out of office. In 2002, when Ms Le Pen’s father Jean-Marie led the National Front into the second round against the conservative Jacques Chirac, Libération, a centre-left newspaper, urged readers to “vote for the crook [meaning Mr Chirac], not the fascist [meaning Le Pen père]”. They did: Mr Chirac won more than 80% of votes. Polling suggests Ms Le Pen is a heavy favourite to reach the second round this year. The front républicain seems likely to hold, but just how likely may depend on her opponent.