Something interesting and relevant I just came across:
Because direct surveys of racial biases are unreliable at best for obvious reasons, this Harvard doctoral candidate decided to tap into something else, something that has much more direct access to peoples' private interests, unfiltered by social norms and political correctness: Google search queries.
The regional 2004 election data for John Kerry plus the average vote gain by 2008 Democratic congressional candidates was established as the baseline for the Democratic election performance expectation for 2008. He then took regional-level data from the 2008 presidential election and the corresponding regional Google search data and found a strong correlation between:
a) The vote percentage by which Obama's election results underperformed the baseline expectation in a region, and
b) The frequency with which the N-word is Googled in that region.
The method for calculating the baseline expectation was highly accurate in predicting actual results for regions with the least searches using the N-word, but in those places that Google it the most, Obama's performance suffered 7% or more. The study estimates that the difference between reality and expectations in the overall national popular vote in 2008 was around 3 to 5%, which is actually pretty damn significant in a presidential election.
tl;dr: Obama probably lost 3-5% of the popular vote in 2008 to racism.