Immunization has been called one of the most successful public health interventions in medical history. Yet controlling the coronavirus pandemic depends not only on access to the shots but also on individuals’ willingness to be vaccinated.

A Pew Research Center poll found that in September 2020 just 51 percent of Americans said they would get the vaccine. That figure rose to 60 percent in November 2020 and then 69 percent in February. The number of people who say they are willing to get a COVID-19 vaccine has been rising during the early rollout period, when inoculations have been difficult to get—and seeing a neighbor receive one may foster feelings of envy and less anxiety about safety issues.

Behavioral economists, who use psychology to understand economic decision-making, are familiar with such a shift in attitudes. They have even coined a name for it: the scarcity heuristic. This concept suggests that consumers place a higher value on goods and services that are in short supply than those that are abundant.

Eldar Shafir, a professor of psychology at Princeton University and co-author of Scarcity: The True Cost of Not Having Enough, says that vaccine availability, or the lack of it, holds tremendous sway over our preferences and the value we place on getting a shot. It can also explain why attitudes toward inoculations might change. “People’s preferences are not well defined. We form a preference as we go,” he says. “A scarcity heuristic is just a general strategy that if something is hard to find, it must be better.”

The vaccine availability issue is also playing out in the Black community, which has borne a disproportionate burden in COVID case numbers, exposure as frontline workers and lack of vaccine access. Fear of being used as medical test subjects makes Black Americans one of the groups that is most reluctant to be vaccinated. Yet as the early vaccine numbers showed that white people were being prioritized over people of color, attitudes began to change.

Brittany Baker, an assistant professor of clinical nursing at North Carolina Central University, has been deeply involved in efforts to reduce vaccine hesitancy in Black communities throughout the state—and has witnessed a dramatic transformation in outlook. “There’s this mistrust in the minority community as it relates to health care. But on the flip side, it’s like ‘Why is it that the majority groups are able to get this vaccine, and we're left out, and they’re intentionally trying to marginalize us?’” Baker says. “Black people were already dying at disproportionate rates. That moved a lot of people.”

The numbers appear to bear out Baker’s observation. In the Pew poll conducted last month, 61 percent of Black Americans said they planned to get a COVID vaccine or had already received one, a nearly 20-percentage-point increase since November.

At times, however, the psychology of scarcity can work in the opposite direction. Caroline Roux, research chair of the psychology of resource scarcity at Concordia University in Montreal, says the absence of something desirable persuades some people to become more altruistic. Instead of trying to acquire the hard-to-attain resource for themselves, their primary instinct is to sacrifice for the greater good.

In the case of COVID vaccines, they might try to give up their place to someone they deem more deserving or in greater need, which would be a mistake, Roux says. “Because of the logistics and the way [distribution] is organized, if you have the opportunity, then you should take it,” she says. “It’s not like you can transfer it easily between locations or to someone else. So you’re not really helping society as a whole by opting out.”

President Joe Biden recently proclaimed that the U.S. will have enough vaccines to inoculate every adult in the nation by the end of May—two months earlier than previously projected. As of early March, more than 90 million doses have been administered. So what happens when scarcity is no longer an issue? Will hesitancy come roaring back?

That seems unlikely. Shafir points to another idea from behavioral economics: the heuristic called social proof, also known as informational social influence, occurs when someone who is uncertain of how to behave, or who or what to believe, looks to others for behavioral guidance.

Social proof is most effective when it can be observed directly. It may already be playing a role in changing attitudes, but it needs to become more of a force. While the tens of millions of Americans who have been vaccinated seem like impressive numbers, these statistics mean less if they are not visible to someone who is contemplating getting a vaccine. “My guess is that once we have enough of a supply so that ‘Go get vaccinated’ is actual advice rather than a mere taunt, it may be wise to introduce lapel pins, stickers, social media messaging, et cetera, to provide social proof,” Shafir says.

In the meantime, those “I got vaccinated” selfies and tweets that are popping up on social media will have to serve as a stand-in.

Read more about the coronavirus outbreak from Scientific American here. And read coverage from our international network of magazines here.