As the shadow of the deadly Ebola virus looms over Africa, its danger clear and present, a lesser kind of contagion, diffuse but persistent, has infected social media feeds in the United States.

Ebola is trending on Twitter. Even a cursory hashtag search turns up, among the news articles and official announcements, expressions of fear, gallows humor and bad information. The virus can spread through the air? OMG! (It cannot.) A possible Ebola case in New York City? Time to pack for Mars! (It was not Ebola.)

Why do people feel compelled to post and rebroadcast jokes, rumors and dread of a distant disease that public health officials say is extremely unlikely to pose serious risk on this side of the Atlantic Ocean?

The science behind how and why ideas spread on social media is a growing area of research. At the most basic level, marketing experts say, people tend to share stories that stir their deepest feelings, whether positive or negative. To wit, frightful shark attacks routinely top the trending charts alongside cheerful cat videos and inspirational quotes.

    Most Read Stories

“We are not just information-processing machines; we’re very driven by emotion,” said Jonah Berger, a marketing professor at the Wharton School of the University of Pennsylvania and author of the book “Contagious: Why Things Catch On.” Stronger emotions, Berger has found, increase sharing.

In 2011, he investigated the emotions that compel users to share articles via email. Berger asked 40 students to jog in place, and then presented each of them with a neutral news article that they could email to whomever they wanted.

After the physical arousal of jogging, Berger found that students were more likely to share the article, as compared with when sitting still.

He concluded that people share content when they are stimulated, regardless of the source.

“It’s whatever generates arousal,” he said. “If you read a scary article about Ebola, and then you read another article, you’re more likely to share that second article because you’re anxious.”

Sharing stories on social media may help us relieve some of that anxiety, according to Pamela Rutledge, a psychologist and director of the Media Psychology Research Center in Corona del Mar, California. “Twitter panics, such as we’re seeing with Ebola, are a reflection of people trying to get information, sharing information — even if it’s inaccurate — because being part of the conversation is less threatening than being out of the ‘know,’” Rutledge said by email.

Our compulsion to post on Twitter about Ebola may be compounded by the fact that the human mind is hard-wired to focus on subjects with vivid examples.

“When people think about Ebola, they imagine flesh-eating, visceral, gory stuff,” Berger said. “High-arousal emotions increase sharing, and that’s even more likely when it’s visceral.”

This theory is based on a concept in psychology known as availability bias, which emerged some 40 years ago. In a study published in the journal Cognitive Psychology in 1973, Amos Tversky and Daniel Kahneman found that people tend to judge the likelihood of an event based on immediate examples that come to mind.

For instance, you are much more likely to drown in the ocean than to be eaten by a shark. But since you can imagine a shark attack in graphic detail, you worry about it disproportionately. Public interest in the Ebola outbreak, a rare disease with vivid, disturbing symptoms, may have similar roots. The flu, after all, kills thousands of people in the United States every year, but it is rarely a hot topic on Twitter.

Other researchers, however, believe that the recipe for social-media momentum is less well defined.

“There are a few pretty general features that enhance likelihood that something will go viral,” said Duncan J. Watts, a sociologist and principal researcher at Microsoft Research in New York City.

“For example, if it’s terrible and violent and people are dying, that’s a positive feature in your model,” he said. “Boring and heavy are unlikely to go viral.”

Beyond that, however, Watts posits that social-media obsessions are primarily fueled not by public sentiment, but by the influence of the mass media. Users focus on subjects that major outlets choose to cover, he said, and when journalists write and talk about Ebola, Twitter users begin posting about it.

“I suspect that for a lot of these viral phenomena, look under the surface, and working there is the mass media,” he said.

But the overheated Twitter rhetoric may have a few positive effects, spurring efforts by news media, advocates and individuals like Dr. Thomas R. Frieden, director of the Centers for Disease Control and Prevention, to go into overdrive posting facts and hosting chat sessions to debunk rumors and quell fear.

Moreover, Watts added, when Twitter feeds are abuzz with concerns about Ebola, that may spur public health officials to do more to beat back the outbreak.

“If panic on social media gets world health authorities to pay attention and devote serious resources to a problem, it’s probably a good thing,” he said.