In June 2014, Senator Ted Cruz told The New Yorker’s Jeffrey Toobin this:

It is amazing that the wisdom of the chattering class to the Republicans is always, always, always ‘Surrender your principles and agree with the Democrats. That’s been true for my entire lifetime. The chattering classes have consistently said, ‘You crazy Republicans have to give up on what you believe and become more like Democrats.’ And, I would note, every time Republicans do that we lose.

Cruz went on:

And what does the entire D.C. Republican consulting class say? ‘In 2016, we need another establishment moderate!’ Hasn’t worked in four decades. ‘But next time will be the time!’

To Cruz, the logic is simple: more moderate Republicans have lost some presidential elections, so the party should nominate someone less moderate. It’s an unsurprising view from a guy who is on the conservative flank of the party and is now a presidential candidate.

It’s also a view that is largely wrong. Political science research shows that ideological moderation actually is rewarded at the ballot box in House elections and presidential elections. The same thing is true in the 2016 presidential race. In fact, we estimate that in 2016, the electoral penalty for choosing a true believer rather than a moderate is a 23-percentage point decline in the probability of winning the general election.

To arrive at this estimate we use the best measure of electoral viability — the collective wisdom of prediction markets — and compare that to a measure of ideological conservatism calculated by Stanford political scientist Adam Bonica. Specifically, we draw on two prediction markets — Betfair’s Republican Nomination Market and Next President Market — and combine their forecasts using what is called Bayes’ rule.

For example, take Marco Rubio. Based on the prediction markets, what is his probability of winning the general election given that he wins the Republican nomination? We can express this using Bayes’ rule like this:

Prob(Rubio is elected president) x Prob(Rubio won GOP nomination | Rubio is elected president) / Prob(Rubio won GOP nomination)

In words, it is the probability Rubio is elected president, multiplied by the probability that he won the GOP nomination given that he was elected president (which would happen unless he ran as an independent), divided by the probability that he won the nomination.

According to Betfair’s recent matched odds, the probability that Rubio is elected president is 7.5 percent and the probability that Rubio wins the GOP nomination is 20 percent. Assuming that if Rubio wins the presidency, he would do so as the GOP nominee — an assumption supported by Betfair’s Winning Party Market. We calculate his chance of winning the general election as: 0.075 x 1 / 0.20 = 0.375, or a 37.5% chance.

The graph below shows this relationship between general election viability and ideology for the top GOP contenders with Bonica ideology scores. There are two types of Republican candidates in this graph: relative moderates (Christie, Bush, and Kasich) and relative conservatives (Fiorina, Rubio, and Cruz).

This graph suggests a linear relationship between ideology and electability. Moving from the most moderate Republican candidate — Christie — to the most conservative — Cruz — diminishes GOP prospects for winning the presidency by 23 percentage points. And if we compare the two candidates most likely to win the nomination according to Betfair, the more conservative Rubio is 9 points less likely to win the general election than the more moderate Bush.

It may be surprising that Chris Christie emerges as so electable in this analysis. Why would someone as apparently electable be doing so poorly in the primary polls? It’s likely because Christie has more potential appeal to the average voter in the national electorate than the average voter in Republican primaries. In other words, the Republican Party would be rewarded in the general election for nominating someone, like Christie or perhaps even Bush, that is less palatable to their rank-and-file voters.

The rewards of nominating a relative moderate apply to the Democratic Party as well. Of the three candidates under serious consideration, Bonica’s ideology scores deem Sanders the most liberal and Biden the most moderate, with Clinton in between. The Democratic Party’s penalty for nominating Sanders over Biden is a 10 percentage point decline in the probability of winning the general election.

So what about Donald Trump? We do not have a reliable measure of his ideology, so he does not appear in our plot. But we can still calculate the probability that he wins the general election if nominated by the Republican Party. Given that the prediction market might anticipate a successful third party run by Trump, we must take some care in developing this estimate.

The betting market allows for a 1.5 percent possibility that a third party campaign wins the presidency. Of those 1.5 percentage points, what proportion should be allocated to Trump? If we make the heroic assumption that Trump is the one and only third party candidate accounted for by the betting market, then — applying Bayes’ rule — Trump had a 42 percent chance of being elected president if he is the GOP nominee.

If we assume that there is zero percent chance of a successful third party Trump run, he has a 54 percent chance of being elected president if he is the GOP nominee. Under the plausible assumption that Trump’s true electability falls in between these two estimates, he is as electable as Bush and Kasich and more electable than Fiorina and Rubio.

Though we do not have an ideology score for Trump, his public statements suggest that he is fairly unconstrained by ideology — and certainly no orthodox conservative. The prediction markets appear to believe his lack of ideological constraint is an advantage.

The familiar battle in any primary election is between the so-called “establishment” of each party, which often seeks a more moderate nominee, and some activists who prefer someone closer to the ideological poles. This is no different in 2016, particularly in the GOP, where the tension between the establishment and activists is palpable. Our analysis captures what is at stake in that fight.

*Matthew Atkinson is a Visiting Assistant Professor of Political Science at Miami University. Darin DeWitt is an Assistant Professor of Political Science at California State University, Long Beach.*