The Society section scored 6.98 on the hedonometer’s 9.0-point scale, on which 5.0 represents neutral. The overall score for The Times was 6.0, with the Science section coming in at 5.71 because of words like “disease” and “cancer.” The lowest score was the International news section’s 5.21.

Similarly, the researchers found that worldwide traffic on Twitter remained consistently upbeat, averaging about 6.0 on the hedonometer scale. It had its rhythms, tending to be higher in the morning and to decline during the day, and it varied according to events. It rose on holidays — the happiest day of the year is Christmas — and dipped when there was bad news. Still, the trend remained positive on days even when there were stunningly awful events like the terrorist attack on the French newspaper Charlie Hebdo.

This relentless cheeriness even on bad-news days suggests to some researchers that the positivity bias isn’t merely a consequence of more good things to talk about. It can also help us cope with the bad stuff.

Researchers studying memory have found another example of the Pollyanna principle: People tend to recall events as more positive than they were really were, apparently to diminish the lingering impact of painful experiences. Just as we see the past through rose-colored glasses, we cope with today’s problems by finding something positive to say.

When terrorists commit an atrocity, we quickly respond with prayers and donations for the victims. Journalists covering the devastation of an earthquake look for stories of heroic rescue workers and of victims found alive in the rubble. Even when a bad event is being described, there can be an effort to counteract its impact by using positive language.

“While there are terrible stories in the news and awful threads on Twitter, we tend not go on about them,” said Peter Sheridan Dodds, who led the hedonometer project along with Chris Danforth, a Vermont colleague, and Brian Tivnan of Mitre. “Language is our great social technology, and we use it to help us get through hard times.”

Previous studies with social media, including one involving The Times’s most-emailed list, have shown that while people are quick to read bad news, they prefer to share uplifting news with their friends. That points to what may be the chief explanation for our use of positive language: We care what others think about us.