D ONALD TRUMP owes his presidency to America’s quaint system of electing leaders. Despite losing the popular vote, he prevailed in the electoral college by winning lots of states by small margins and losing a few by large ones. Now, as Democrats prepare to impeach him, a similar quirk is helping him stay in office—and insulating his party from voters’ wrath.

Whereas the electoral college is only mildly anti-majoritarian, the Senate often deviates wildly from the popular will. Because each state is weighted equally, voters in less-populous states are over-represented relative to those in large ones. Now that Republicans derive an outsize portion of their support from rural voters, their share of senators exceeds their share of total votes cast in Senate elections.

This imbalance weighs on the politics of impeachment. Even if the Senate were apportioned by population, as the House of Representatives is, it would not reach the two-thirds majority needed to convict the president. However, if the chamber reflected public opinion more closely, some Republican members seeking re-election might feel obliged to support his removal.

In reality, Republicans are likely to benefit from closing ranks around Mr Trump. To determine senators’ incentives, we estimated opinions on impeachment using a method called multi-level regression and post-stratification ( MRP ). Its first step uses a national survey—YouGov, a pollster, gave us data from 18,000 people—to measure how demographic traits affect views (eg, Hispanic voters over age 64 tend to oppose impeachment). Next, MRP applies these relationships to the demography of each state, mimicking 50 separate state polls.

The result should make Democrats nervous. Although 52% of voters with an opinion back impeachment, that is less than the 55% who disapprove of the president. This means that a block of voters dislikes him, but wants Congress to leave him in place.

Moreover, in 29 of the 50 states, a plurality of voters opposes impeachment. Views split about 50/50 in Colorado, Maine and Arizona, giving those states’ Republican senators little reason to buck their party ahead of tough re-election races. Impeachment is unpopular in Iowa and North Carolina. Surprisingly, Texas, long a Republican bastion, is also 50/50. But most pundits put its Senate seat out of the Democrats’ reach.

Meanwhile, Democrats may struggle to keep their caucus on side. Voting to remove Mr Trump might end Doug Jones’s hope of re-election in deep-red Alabama. And although divided public opinion will probably prevent defections in Minnesota and Michigan, New Hampshire is an outlier. Despite voting for Hillary Clinton in 2016, MRP finds that impeachment trails there by 48% to 41%. Jeanne Shaheen, a Democratic incumbent in the state, is expected to win re-election, but far from assured. If she backs impeachment, Republicans might gain the chance to pick up a seat in a cycle when they are mostly on the defensive. ■

Sources: United States Census Bureau; YouGov; The Economist