The general thinking about the Republican Senate majority is that it has solidified to the point where Democrats are effectively shut out of gaining control of the upper chamber in 2020. But in truth, the GOP majority is in more danger than many analysts believe. Just how much jeopardy depends on how you think about the overall state of the race: If the election is going to be close, as many analysts (including myself) seem to believe, then the Senate probably leans Republican at best. And if President Trump is likely to lose, perhaps badly (as other analysts suggest), then Republicans will have a very difficult time maintaining control of the chamber.

To evaluate this claim, we’ll revisit a simulation created during the 2014 elections. It employs three simple factors: the president’s imputed job approval in a state on Election Day (estimated from the national job approval rating found in the RealClearPolitics Poll Average and the state’s partisan lean), whether an incumbent is running, and whether a candidate is “highly problematic” (think Sharron Angle or Roy Moore).

The benefit of this approach is straightforward. If a party has a bunch of candidates who are, say, between 51% and 55% favorites to win, a simple look at the predictions would suggest no losses. But in reality, some of those candidates should lose in the aggregate, even if we don’t know which ones. You can calculate the likelihood of various outcomes by hand, but doing so gets tedious, especially for a large field. A simulation allows us to work around that.

The simulation has proved rather accurate over the past few cycles. In 2014, it suggested that if Barack Obama’s job approval were 44 percent on Election Day, Democrats would be expected to lose nine seats. This is what happened. In 2016, it suggested that Democrats should gain three seats; they gained two. In 2018 it suggested that Democrats should lose two seats with President Trump’s job approval at 45% (as it was on Election Day, according to exit polls); Democrats lost two.

Of course, the particulars of the races are not always spot on; in 2018 the simulation clearly understated GOP chances in Florida, and overstated them in West Virginia. Candidate quality is not a variable, because we are trying to keep it parsimonious (especially since we don’t have a ton of observations), and because our goal is meant to predict in the aggregate. Factors like candidate recruitment failures or fundraising foibles will tend to cancel each other out in the aggregate, so the simulations have worked notwithstanding individual misses.

This would also be a good time to remind readers of George Box’s famous (if overused) dictum that “all models are wrong, but some are useful.” There’s little doubt that the actual process by which races are decided is far more complex than the simulation described above. This misses the point, and the basic claim being made. The point is not that this is the “true” way of understanding the upcoming election, or that Democratic chances of taking the Senate if Trump is at 42.5% job approval on Election Day are actually precisely 40%. Rather, it is simply that this approach helps us to understand the basic contours of what we might expect in 2020 (you may want to read this old chestnut as well).

So what does the simulation tell us for 2020? It only looks at competitive seats, on the assumption that safe seats behave differently than competitive seats. The good news for the GOP is that there are relatively few competitive seats in 2020. This may seem surprising, given that 2014 was a very strong year for the party in the Senate, but many of the seats that the GOP picked up were in heavily Republican states that will not be competitive in 2020 except in extreme circumstances.

The bad news for the GOP is that most of the competitive seats are held by Republicans. It is still early, and the list could change if, say, Democratic Gov. (and presidential candidate) Steve Bullock switches over to the Senate race in Montana, or former Arkansas Gov. Mike Beebe gets into the Senate race there. But for now, Democratic seats in Alabama, Michigan, Minnesota and New Hampshire are considered potentially competitive, while Republican seats in Arizona, Colorado, Georgia, Iowa, Kentucky, Maine, North Carolina, and Texas have varying degrees of competitiveness.

This is the universe of competitive seats. We also assume no problematic candidates are nominated (e.g., Roy Moore is not the nominee again in Alabama) and that there are no further retirements. Obviously, this can change over the course of the next year.

That leaves us with presidential job approval as the major open question. As of this writing, Trump’s is hovering around 42.5 percent in the RCP Average. If we assume that Trump’s job approval holds at this point on Election Day, we would expect Republicans to lose two seats, with 95 percent of the simulations falling between a loss of four seats and no net loss. Republicans lose three or more seats (enough to lose the Senate, assuming they also lose the presidency) in about 40 percent of the simulations. So, we would say that Republicans are favored to hold the Senate, but are far from overwhelming favorites to do so.

Looking at individual seats, we see that Republicans would not be favored to be competitive in races for any Democratic-held seats except Alabama’s, which reflects conventional wisdom. If the remaining seats did not flip in the good GOP year of 2014, it is difficult to see them flipping if a Republican president’s job approval is at 42.5 percent.

Republicans start out as underdogs in Maine and Colorado. This probably overstates Susan Collins’ vulnerability, in the same way the simulations overstated Joe Manchin’s vulnerability in 2018. On the other hand, Manchin came within three percentage points of losing his race, though his state is substantially more Republican than Maine is Democratic.

In any event, the key battlegrounds are shaping up to be Arizona, Georgia, and North Carolina, with outside Democratic chances in Iowa, Kentucky, and Texas. The 13% Democratic chance of winning in Texas may seem a bit gaudy, but Beto O’Rourke did almost flip a seat there in 2018 when the president’s job approval was higher than it is today.

Of course, Trump’s approval won’t necessarily be 42.5 percent on Election Day. Over the course of the last year, it has fluctuated in a remarkably narrow band, between 40 and 45 percent. So let’s redo the simulation, except this time before we run the individual numbers, we’ll randomly select a job approval for the president. This will give us an idea of the range of possible outcomes. For those interested in technical details: Job approval is assumed to be normally distributed with a mean of 42.5 and a standard deviation of 1.5. This means that around 95% of our simulated job approvals will fall between 39.5% and 45.5%, with 2.5% higher and 2.5% lower. (The Y axis below indicates the number of simulations where Republicans win/lose a given number of seats)

Under this scenario, the average GOP loss grows to 2.7 seats, with about 53% of the simulations resulting in Democratic gains of three or more seats; 95% of the simulations end with Republican losses ranging from six seats to no seats.

For individual seats, we see deep GOP fortunes worsening even further in Colorado and Maine, while North Carolina and Arizona become pure tossups.

Finally, we can look at the expected number of GOP gains/losses while varying Trump’s job approval. In other words, we can run the simulations with Trump’s job approval fixed at 50%, 49%, 48%, and so forth, and see what expected GOP gains/losses would be.

As you can see, 42% job approval is basically the break point for the GOP holding the Senate. At the same time, if Trump were to get his job approval up to around 49 percent, the GOP could hold all of its seats.

Of course, it is still very early, and we don’t have a clear idea where Trump’s job approval will be on Election Day. But if you think he is in serious jeopardy of losing, then the Republican majority is anything but a given.