San Mateo County sits on the San Francisco peninsula, wedged between that city to the north and Silicon Valley to the south. It’s heavily Democratic, supporting President Biden in last year’s election with about 78 percent of the votes cast. Well, specifically, 77.904 percent of votes.

That specificity is useful when we compare those results to the results of last month’s attempted recall of California Gov. Gavin Newsom (D). Then, San Mateo voted against the recall by a wide margin, with the “no” side earning about 78 percent of the vote. Or specifically, 77.930 percent.

This parallel between support for Biden and rejection of the recall held across the state, though not as precisely as in San Mateo. Political scientist Alan Abramowitz noted the correlation in a tweet he shared Monday.

He mentions that the “R2” is 0.99 — a reference to a statistical measure called the correlation coefficient. That coefficient is described with the shorthand r; r-squared, the value shared by Abramowitz, is the coefficient of determination, measuring how closely the dots on that graph fit the displayed line. A value of 0.99 means, in essence, that they fit very, very well. The maximum value is 1.

Abramowitz’s correlation line, though, doesn’t measure what I was measuring with San Mateo County. If we want to compare actual vote percentages between the 2020 election in each county with the recall vote, we end up with graphs that look like this. In each case, the horizontal axis shows support in the 2020 election; the vertical axis records voting in the recall. San Mateo County is marked. It sits squarely on the dashed line showing where the percentages on each axis are equivalent.

You’ll notice two things. First, that the dots in each image follow a consistent line. For the Democratic vote graph, it starts under the dividing diagonal and moves above it; for the Republican graph, it’s above the whole time. In other words, support for the recall outperformed President Donald Trump in each county. Luckily for Newsom, the most pro-recall counties tended to have the fewest voters.

The point, though, is that just because there’s a correlation between the presidential vote and the recall vote, that, by itself, didn’t ensure Newsom’s victory. Consider the prior recall in California, the one in 2003 that ousted Gov. Gray Davis (D).

Again, there was a correlation by county between the recall vote and the closest presidential contest (the one held in 2004). But the Democratic candidate that year, John F. Kerry, outperformed opposition to the recall in each county as support for the recall outperformed George W. Bush. The result? Kerry won a state governed by Republican Arnold Schwarzenegger.

The 2003 recall was also heavily correlated to the presidential race. The r-squared for Kerry/no-on-recall was 0.948. Not as strong, as evidenced by the less clear line formed by the dots. But still a strong correlation.

It didn’t help Davis.

We’ve seen increased nationalization at the federal level. House seats, for example, used to be held by candidates of one party even as the district voted for a presidential candidate from the other party. But over the past 30 years, that divergence has faded. The 2020 election had the fewest split-ticket House races in decades. (On the graphs below, the dots that sit at some distance from the diagonal line are mostly ones in which people ran unopposed or functionally unopposed.)

The r value in 2020 House races was 0.933. In 2000, it was 0.764.

Notice that not only are there few races won by the president of one party and the House candidate of the other (16 races that fall into the gray-shaded areas on the bottom chart) but that the percentages of support line up, too. It’s not just that Democrats won in districts that Biden won, but that they won with about the same amount of support and the same margin.

In the Senate, the trend has been slightly different. For decades, there has been increased alignment between the party voters send to the Senate in a state and the party they award their electoral votes, but there’s been more divergence in the actual margins of support. Comparing the 2020 presidential election to the most-recent Senate election in each case gives more of a cloud effect than a line. (We cheated a bit, including Sen. Joe Manchin III’s (D-W.Va.) race instead of the race held last year. Try to spot his race on the graphs below!)

Despite the looseness of the link between Senate vote percentages and presidential ones, only a handful of states elected a Republican senator as they voted for the Democrat for president, and vice versa. But again, even tight correlation to national voting doesn’t guarantee that the same party will win.

North Carolina provides precinct-level data on its elections. Last year, the state voted for Trump for president as it reelected Gov. Roy Cooper (D). Why? Because while precinct-level gubernatorial results lined up with presidential ones, they still gave Cooper an advantage that Biden didn’t enjoy.

In fact, the correlation coefficient (r) for those North Carolina precincts between the gubernatorial and presidential elections was higher than any of the other relationships indicated above. The lowest correlation between results at the state and presidential level was in those Senate races.

Abramowitz is right: How people vote in presidential races is often tightly linked to how they vote in state-level or House ones. But that’s not a guarantee of success.

Last year, Virginia backed Biden by 10 points. The Democratic nominee for governor in that state, Terry McAuliffe, certainly hopes that the national vote aligns with the gubernatorial one in next month’s election. In North Carolina — where, to be fair, Trump won by a much narrower margin — it didn’t.