NOTHING IS MORE important to America’s Democrats than kicking Donald Trump out of the White House. In a poll published on February 25th, 65% of Democratic voters told YouGov that nominating a candidate who can beat the president in November is more important than selecting one who shares their positions on most issues. Yet there is much confusion over who is best able to evict Mr Trump.

Political polls offer one answer. Most show the various candidates beating Mr Trump by wide enough margins nationally that they would be favoured to win an electoral-college majority. But the election is a long way away, and these polls may not be good at identifying who will actually vote, making them unreliable as measures of candidates’ strength.

Political-betting markets offer another answer to the electability question. Using data from the past 14 months of trading on PredictIt.com, a stockmarket of sorts for betting on political outcomes, The Economist built a statistical model to figure out which candidate has the best chance against Mr Trump. Contenders are weaker if an increase in their odds of winning the nomination corresponds to a boost in the odds of the president’s re-election; and stronger if the probability of their victory dents the president’s. After controlling for various factors—such as the chance that Mr Trump does not finish his first term in office, his approval ratings, the value of the S&P 500 and the recent outbreak of covid-19—our model highlights a clear difference among the candidates.

If Bernie Sanders wins the nomination, Mr Trump is likely to be re-elected, with a probability of 58%. But if the president is up against Joe Biden or Mike Bloomberg, he is likely to lose; the probability of his victory drops to 46% and 49% respectively.

Our analysis of punters’ prices also suggests that the identity of the Democratic candidate could sway the final outcome of the vote as much as other factors popularly cited as influencing elections. Each 1% increase in the S&P 500—about one-third of the average monthly movement in the index—nudged up Mr Trump’s chance of re-election by about half a percentage point. Mr Trump’s approval ratings, which have been low and very stable compared to other presidents, had similar effects on the outcome. Even though the candidates matter, our model predicts a close election regardless of who becomes the Democratic nominee for president.

Dig deeper: