WASHINGTON — Racial attitudes have not improved in the four years since the nation elected its first black president, an Associated Press poll finds, as a slight majority of Americans now express prejudice toward black people whether they recognize those feelings or not.
Those views could cost President Obama votes as he tries for reelection, the survey found, though the effects are mitigated by some people’s more favorable views of black people.
Racial prejudice has risen slightly since 2008 whether those feelings were measured using questions that explicitly asked respondents about racist attitudes, or through an experimental test that measured implicit views toward race without asking questions about that topic directly.
In all, 51 percent of those surveyed expressed explicit racist attitudes toward black people, compared with 48 percent in a similar 2008 survey. When measured by an implicit racial attitudes test, the share with racist sentiments jumped to 56 percent, up from 49 percent during the last presidential election. In both tests, the share of Americans expressing positive attitudes toward black people fell.
‘‘As much as we’d hope the impact of race would decline over time . . . it appears the impact of antiblack sentiment on voting is about the same as it was four years ago,’’ said Jon Krosnick, a Stanford University professor who helped to develop the survey.
Most Americans also expressed racist attitudes toward Hispanics. In an AP survey in 2011, 52 percent of non-Hispanic whites expressed racist attitudes toward Latinos. That figure rose to 57 percent in the implicit test. The survey on Hispanics had no past data for comparison.
The surveys were conducted with researchers from Stanford University, the University of Michigan, and the University of Chicago.
Experts on race said they were not surprised by the findings.
‘‘We have this false idea that there is uniformity in progress and that things change in one big step. That is not the way history has worked,’’ said Jelani Cobb, director of the Institute for African-American Studies at the University of Connecticut. ‘‘When we’ve seen progress, we’ve also seen backlash.’’
Obama has tread cautiously on the subject of race, but many blacks have talked openly about perceived antagonism toward them since he took office. As evidence, they point to events involving police brutality or cite bumper stickers, cartoons, and protest posters that mock the president as a lion or a monkey, or lynch him in effigy.
‘‘Part of it is growing polarization within American society,’’ said Fredrick Harris, director of the Institute for Research in African-American Studies at Columbia University.
Overall, the survey found that by virtue of racial prejudice, Obama could lose 5 percentage points off his share of the popular vote in his Nov. 6 contest against Republican challenger Mitt Romney.
But Obama also stands to benefit from a 3 percentage point gain because of nonracist sentiment, the researchers said. Overall, that means an estimated net loss of 2 percentage points because of racist attitudes.