But when he contacted the establishments months later asking them if they would serve Chinese people, over 90 percent said they would not. In an ensuing article, “Attitudes vs. Actions,” LaPiere concluded that polls about social attitudes often reflect how respondents feel rather than how they’ll actually behave.

Subsequent research has repeatedly confirmed this gulf between what people say they will do and what they actually do when it comes to treatment of certain groups. In the 1970s, surveys suggested that military officers would resign if women were admitted to the service academies. Those who opposed the change used the data to fight women’s inclusion, warning that the military would suffer a fatal blow. But when women were admitted anyway, virtually no one left as a result.

The same argument surfaced a generation later to oppose L.G.B.T. military service. In 2008, a Military Times survey noted that 24 percent of service members said they would not want to serve alongside gay or lesbian troops. Citing the poll, opponents of inclusive service warned of a mass exodus that could swell to half a million troops if President Barack Obama insisted on overturning a ban. Some said the policy change could “break the all-volunteer force.”

Yet after the “don’t ask, don’t tell” policy ended in 2011, nothing of the kind took place. A study written by a panel of service academy professors the next year found that “retention was unaffected” by the reversal of the policy. “There was no mass exodus of military members as a result of repeal, and there were only two verifiable resignations linked to the policy change, both military chaplains,” the report said.

An equally relevant example of the gap between attitudes and behavior comes from President Obama’s politically risky decision to back same-sex marriage six months before the 2012 election. A Gallup poll conducted just after the announcement suggested that a quarter of voters were less likely to support the president in November because of his support for marriage equality. While it’s impossible to know how many, if any, of those voters actually declined to vote for Mr. Obama because of his position, he handily won re-election.