John Minchillo / AP

It’s a frequent lament these days: the devoted Bernie Sanders fans who say they don’t want to vote for Hillary Clinton, but will do it anyway because they live in Ohio, or Florida, and they know their protest ballots for Jill Stein could swing the election to Donald Trump. Or it’s the angry Republican delegates  from Washington state, for example, who can afford to reject Trump and support Gary Johnson because they know their fellow voters will inevitably go for Clinton in November.

How much does a state’s importance on the electoral map determine the percentage of voters who reject the major-party candidates? To take just one example: On Monday, Sally Bradshaw, a top adviser to Jeb Bush, joined the ranks of potential third-party voters. Bradshaw helped write the Republican National Committee’s “autopsy” report after the 2012 election, but as of Monday, she’s no longer a Republican and has ruled out voting for its nominee. “I haven’t made a decision yet between Clinton, Gary Johnson, or writing in a candidate,” she told CNN. “If the race in Florida is close,” she added, “I will vote for Hillary Clinton.”

Voters, it seems, might be more likely to support third-party candidates when they feel their vote won’t actually impact the election. To test this theory, we collected state vote totals for every presidential election since 1980, comparing how the closeness of a state’s vote correlated to the relative popularity of outside candidates.

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.”

Most voters don’t want to “waste” their vote on a candidate who can’t win. But in states where races aren’t competitive, voters sometimes back a third-party candidate for that very reason: They don’t want that politician to be president, but they want to register a protest against the major parties. In 1992, Stone’s mother was one of them. “Can you guarantee that Ross Perot will lose?” he recalled her asking him during that race. “Because if you can, I’m going to vote for him.” Perot won 20.6 percent of the vote in California in 1992, losing to Bill Clinton by 26 points.

The nominations of two of the most unpopular major-party candidates in modern history have given Gary Johnson, the Libertarian, and Jill Stein, the Green Party candidate, opportunities to significantly broaden their support compared to their respective 2012 bids and, potentially, win more votes than any third-party hopeful in the last 20 years. Johnson, a former two-term governor of New Mexico, has reached double-digit support in some polls and can earn a spot in the fall debates if he can reach 15 percent by September.

But history suggests Johnson’s support is likely to drop as the election draws closer. “Most voters are drawn back to their home bases over the course of an election, and that’s doubly true of an election where the parties and the candidates are so polarized,” Stone said.

Alan Abramowitz, a political scientist at Emory University, noted the example of John Anderson, the former Illinois congressman who ran as an Independent in 1980. By late in the summer, Anderson had reached 15 percent in the polls and made it into a fall debate with Ronald Reagan (which President Jimmy Carter refused to join). “You had a lot of voters in 1980 who were unhappy with Carter but who had reservations about Reagan, and so I think initially Anderson was getting a lot of votes from those folks,” Abramowitz said. But by Election Day, support for him had slipped, and he ended up with just 6.6 percent of the vote nationwide.

A few states have proven more fertile for long-shot candidates than the rest. Perot finished second in Maine in 1992, earning 30 percent of the vote to slip past President George H.W. Bush (despite the president owning a summer home in Kennebunkport). Nader scored higher in Maine than he did in most other states in both 2000 and 2008. Utah is similar: Perot also finished second there in 1992, and polling has found strong support in the state this year for Gary Johnson.

Both Stone and Abramowitz cited research showing that third-party candidates do worse when voters see a big difference between the major-party nominees. That bodes poorly for Johnson and Stein as the 2016 presidential campaign nears its final stretch. “They’re both pretty unpopular, but most voters do have a pretty strong preference for one over the other,” Abramowitz said. “There aren’t that many voters that equally dislike Clinton and Trump.”

The ads and media coverage blanketing swing states this fall will only serve to deepen that divide, as Republicans and Democrats implore voters to stop Clinton or Trump as much as they urge support for their own candidate. The more one-sided states, by contrast, are unlikely to see as many of those ads.

If recent elections are a guide, Johnson and Stein might find at least a few more persuadable votes on the dark red and blue parts of the map than those that are shaded purple. That would make it less likely that either of them would affect the ultimate outcome of the election. Yet as Americans discovered in 2000, it could only take a few votes in a single state to swing an election and change the course of history.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.