A Harvard University PhD candidate has conducted a study that may explain why polling data in political races with black candidates has been so unpredictable, and it indicates that race was a negative factor in the 2008 election.

Racially charged Google searches by state
Racially charged Google searches by state. (Chart from the study, “The effects of racial animus on a black Presidential candidate: Using Google search data to find what surveys miss.”)

Election results for black candidates have been historically hard to predict, and anyone involved in a campaign knows that getting voters to answer honestly in any poll can be difficult, particularly when it comes to uncomfortable questions like whether the race of a candidate could impact a person’s vote. The study, titled “The effects of racial animus on a black Presidential candidate: Using Google search data to find what surveys miss,” may have uncovered a way for pollsters and campaigns to understand where the margin of error rests in races with African-American candidates.

Researcher Seth Stephens-Davidowitz examined Google data for search terms indicating racial animus and compared that data in regions where Obama did well, or did poorly, in the 2008 election. The results: Davidowitz found that “between 6.7 and 10.7 percent of white Democrats did not support Barack Obama in 2008 because he was black,” despite the fact that “among whites who told researchers in 2008 and 2010 that they voted for Kerry in 2004, 2.6 percent said they would not vote for a black president.”

That’s a 4-8 point difference in what voters were willing to admit when asked directly if race was a factor in whom they would likely elect as president.

The idea behind the study is that Google searches allow people to use and search for terms that are socially unacceptable. The thesis is that this data exposes hidden racial attitudes among voters. Davidowitz sourced the most commonly used racial epithets to finger regional spikes in voter’s attitudes towards race.

The study examined search results for racially charged terms against election results for John Kerry’s 2004 presidential run and election results from the 2008 presidential and congressional races. The study found that Obama underperformed in precincts where Democratic candidates had traditionally done well and that racially charged searches were a “large and robust negative predictor of Obama’s vote share.”

West Virginia, Louisiana, Pennsylvania, Mississippi and Kentucky ranked the highest among fifty states for racially charged web searches. Of these five states, Pennsylvania was the only state Obama won in 2008. With that said, Obama won only 18 counties in Pennsylvania, to McCain’s 49.

Davidoff wrote, in a New York Times piece on his study:

“The results imply that, relative to the most racially tolerant areas in the United States, prejudice cost Obama between 3.1 percentage points and 5.0 percentage points of the national popular vote. This implies racial animus gave Obama’s opponent roughly the equivalent of a home-state advantage country-wide”

The results matched polling data with hypothetical 2008 match-ups and found an “average” white Democrat would have received about 3 percentage points more votes than Obama did in areas with a higher frequency of racially charged Google searches.

Few people share their actual attitudes on race and rarely do voters discuss their attitudes towards black political candidates in polls. The reticent nature of racial attitudes places this group of voters among the most enigmatic faction in politics – a faction that has real power to sway an election.

Obama won 52.9 percent of the popular vote in 2008, beating John McCain by 7 points. And he won 41 percent of the white vote — a higher percentage of the white vote than any Democrat since Jimmy Carter.

Read the full study here.

Follow Caryn Freeman on Twitter at @carynfreemandc