The data shows a split in how voters act. In the last three presidential elections, folks who lived in a ​state where elections tend to go strongly for one party appeared somewhat more likely to vote for a third-party candidate. That supports the theory of the protest voter—Republicans in Vermont or Democrats in Wyoming are more willing to spend their votes on a long-shot candidate.

Granted, this alignment was relatively weak. It’s not as if support for third-party candidates spiked hugely in Republican and Democratic bastions compared to swing states. But the correlation between support for the long shots and a state’s ideological one-sidedness was stronger in the two elections after 2000, when many Democrats blamed the 1.63 percent of Floridians who voted for Ralph Nader—in addition to Katherine Harris and five justices on the U.S. Supreme Court—for throwing the presidency from Al Gore to George W. Bush. The effect was bigger in 2004 and 2008 than in 2012. That suggests the memory of the 2000 recount might have boosted strategic voting for a time, resulting in less support for third-party candidates in battleground states. This effect didn’t exist at all before 1996, according to our analysis.

This correlation also disappears when the third-party candidate is a recognizable or compelling figure. Americans were quite familiar with Ross Perot in 1992 and with Ralph Nader, a longtime consumer advocate, when he ran in 2000. In both of those years, there was essentially no correlation between a state’s vote margin and its third-party support. That may mean more people voted affirmatively for Nader and Perot in those years, rather than using their ballot to vote against one of the two major-party nominees.

Yet even in 2000, the places where Nader did the best—Alaska, Vermont, Massachusetts, Rhode Island, and Montana—were all states where the margin separating Bush and Gore was 10 percent or higher. In the Democratic stronghold of California, Nader earned more than twice as high a percentage—3.82 percent—as he did in Florida.

With the exception of Perot, a wealthy businessman who drew nearly 19 percent of the vote in 1992, third-party candidates have struggled to gain traction in presidential races. Walter Stone, a political scientist at the University of California, Davis, who co-authored a book on Perot’s candidacy, said he has seen scant research on the question of whether voters are more likely to vote for a third-party candidate in a more partisan state. But his and other studies have found that voters do take into account a candidate’s chances of victory when they go to the polls. “That tends to depress third-party voting in general,” Stone said. “If voting was simply a sincere statement of preferences, you would see a larger vote share going to candidates like Ross Perot and others who have run recently as third-party candidates.”