Educators and policy makers, including Secretary of Education Arne Duncan, have said in recent days that they hope President Obama’s example as a model student could inspire millions of American students, especially blacks, to higher academic performance.

Now researchers have documented what they call an Obama effect, showing that a performance gap between African-Americans and whites on a 20-question test administered before Mr. Obama’s nomination all but disappeared when the exam was administered after his acceptance speech and again after the presidential election.

The inspiring role model that Mr. Obama projected helped blacks overcome anxieties about racial stereotypes that had been shown, in earlier research, to lower the test-taking proficiency of African-Americans, the researchers conclude in a report summarizing their results.

“Obama is obviously inspirational, but we wondered whether he would contribute to an improvement in something as important as black test-taking,” said Ray Friedman, a management professor at Vanderbilt University, one of the study’s three authors. “We were skeptical that we would find any effect, but our results surprised us.”