An African-American man in a suit was handed car keys by someone who thought he was a parking attendant. A black lawyer was patted down by guards at a courthouse, even though his white colleagues entered without a search. An African-American politician was told she did not look like a legislator.

Such encounters are the plight of many people of color in the United States, highlighted in October when flight attendants questioned the credentials of a black doctor while she was trying to treat a passenger in distress.

When the physician, Fatima Cody Stanford, later explained that she always carries her medical license to help disarm skeptics in situations like the one she had experienced, other professionals said they, too, had developed strategies to brace themselves for people who will doubt them.

Those in professional fields historically dominated by white people, including law, medicine and politics, say that the pressure to be prepared for these moments can feel particularly acute. It affects how they dress, what they carry in their wallets and how they behave.