2026 Midterm Forecast

By Christian Johnson

This is an election forecast model that aims to give reasonable posteriors for the 2026 midterms. It's based on public polling data - no "fundamentals" like the state of the economy, presidential approval ratings, and so on. Which is not to say those aren't useful pieces of information, but dealing with them properly requires some care. My sense is that the large systematic uncertainties associated with polling drown out any additional accuracy one might get from those numbers.

A note for transparency: this application & its code are AI-generated (albeit with a lot of back-and-forth prompting). However, all the prose & explanations you see are human-written.

The methodology of the model is presented via the interactive shown below. Although I show it as a series of discrete steps for explanatory purposes, I want to make clear that the actual fit is not a series of discrete steps. It's a single joint fit across all the pieces of data simultaneously. The reason for that is I wanted to minimize the places where model bias could creep in. By allowing pollster house effects to float along with the rest of the parameters, for example, I don't have to make any assumptions that, say, Republican-affiliated pollsters will produce Republican-biased polls. That may (or may not!) be true. The model is agnostic about those kinds of priors, though.

The model is built by writing down a likelihood function - something that is maximized when our model fits the data well. Remember, the data we're considering here is just from polls. Each poll gives us a noisy estimate at a point in time of the margin of a particular race, i.e. a measurement of: \begin{equation} M_r = n_E + \lambda_r + \epsilon \end{equation} Where $M_r$ is the margin in race $r$, $n_E$ is the national environment (like D+5, or R+3) on Election Day, $\lambda_r$ is the partisan lean of race $r$, and $\epsilon$ is the noise from a global polling error.

Polling errors, of course, can't be estimated from the polls themselves (that's the whole point of a polling error). Plenty of ink has been spilled about polling errors, though, and we have okay estimates of how big they've been in previous years. So $\epsilon$ is a fixed random normal variate, with a mean of zero and a standard deviation of 3 percentage points (see slide 5 in the interactive below).

The national environment changes over time, so $n_E$ is not going to be the same as $n_{E-4}$ (4 weeks before the election). Polls of the national environment are linked via a random walk over time, such that $n_t = n_{t-1} + \mathcal{N}(0, \sigma)$, where $\sigma$ is fit from the data. If the uncertainty on each poll were known exactly, this would just be a Kalman filter model, but the uncertainties (below) actually have to be fitted. The nice part about a random walk is that it allows for newer polls to count for more without fitting or assuming any decay parameter.

Now that we have got a handle on all the pieces of the margin $M_r$, let's consider the "noisy estimate" part of the poll. The noise comes from a few pieces:

We assume all the noises here are Gaussian. Then we can write down the likelihood function, which is the probability of the data, given the parameters in our model: \begin{equation} L(\theta) = \prod_i \mathcal{N}\left(y_i \;\middle|\; n_{t_i} + \lambda_{r_i} + \delta_{r_i} + h_{p_i},\ v_i + \tau_{o_i}^2\right) \end{equation}

Usually we would maximize $L$ via stochastic gradient descent, or some other optimization method, and then report error bounds on each of the parameters $\theta$. But that's not the goal here. The goal here is to sample the probability distribution of $\theta$ induced by the data. For that, we use a Hamiltonian Monte Carlo method. (Actually, we sample the likelihood multiplied by the prior, which is informed by the initial guess of $\lambda_r$ from the Cook Political Report's PVI). By drawing a large number of samples of $\theta$, such that more likely scenarios are sampled more often, we get a reasonable estimate of the probability of different outcomes. That's what you see in slide 11 in the interactive below.

Interactive explanation

Variable explanations
\(y_i\)one poll's Democratic margin
\(n_t\)the national mood in week \(t\) (\(E\) is election day)
\(\lambda_r\)how far race \(r\) leans from the national mood
\(\delta_r\)a miss shared by every poll of race \(r\), part of it statewide (none for national polls)
\(h_p\)pollster \(p\)'s house effect
\(v_i\)the poll's sampling error, from its sample size
\(\tau_o\)extra spread for each kind of poll \(o\): national, House, Senate or governor
\(p(\theta)\)what is assumed before any polls, mostly from past elections
\(M_r\)race \(r\)'s margin on election day, in one simulated election
\(\epsilon\)a polling miss shared by every race, within ± points 80% of the time

The national environment

The easiest place to start is the generic ballot polls, which ask which party voters want in Congress. There have been of those since January 2025. Each bubble shown on the right is a noisy measurement \(y_i\) of the national mood \(n_t\) in the week it was taken. Click each bubble to open the raw source of the data.