Peter Macdiarmid/Getty Images

Have other people’s blithe Facebook updates ever made you feel like a total loser? Or have you ever felt that your best friend’s life is perfectly easy and joyful, while yours is nothing but struggle and anxiety? You’re not alone.

Everybody has these experiences, finds an illuminating new study [PDF] from Stanford University, and they tend to exacerbate feelings of loneliness, isolation and dissatisfaction in an already alienating society. (More on Time.com: See photos of Facebook offices around the world)

In a series of five experiments, the study— which was inspired by the Facebook envy experience though does not explicitly address it— identified several intersecting psychological factors that underlie the grass-is-greener phenomenon. The first two experiments showed that people consistently underestimate how often other people have negative emotions, while overestimating how often they have positive ones.

First, the researchers asked 63 college freshmen to report the positive and negative experiences they had had in the previous two weeks. Participants also reported on whether or not they were alone when they had these experiences, and whether they tried to bury the bad stuff. Researchers found that 29% of students’ bad experiences occurred in private, compared with 15% of the good ones. And 40% of the time, people deliberately concealed negative feelings.

That helps explain why other people always seem like they’re having so much fun — they generally tend to be happier in social settings, and they usually don’t dwell on feelings of loneliness or depression when they’re out in a group. In contrast, many of our negative emotions are experienced alone, so we’re the only ones who see ourselves at our loneliest and most depressed. (More on Time.com: See photos of life inside Facebook’s headquarters)

In the second study, 80 new freshmen were asked to estimate how often they thought other students had the negative experiences identified in the first study — including feeling homesick, receiving a low grade, getting dumped or feeling lonely — and how often they personally had these experiences. They were also asked to estimate the frequency of positive experiences, such as acing a test or going to a great party.

The students estimated that 54% their classmates had felt lonely or missed their friends and family back home in the last couple of weeks, though in reality 83% reported feeling that way. And while the freshmen thought that 62% of their peers had recently been to a fabulous party, only 41% had. Overall, students underestimated their peers’ negative feelings by 17%, while overestimating their positive emotions by 6%.

It’s not surprising, given that when things aren’t going well, people try to keep their negative thoughts inside — no one wants to be a downer. That’s why, for instance, people’s Facebook status updates are happy and self-promoting; very few people report on their latest failure. But although we all know that we hide our own negative feelings from others, we don’t realize how just how often our friends and families are doing exactly the same thing. (More on Time.com: Texting Leads to Sex Sooner — and Easier Breakups Later)

A third experiment in the Stanford study explored whether these perception errors had emotional consequences. A group of 104 new students were again asked to estimate how often their classmates had positive or negative emotions, compared with their own situations. These students were then also screened for loneliness, rumination and depression, and were asked to self-rate their current levels of happiness and overall life satisfaction.

As expected, those who thought other people had the fewest negative experiences were lonelier than other students, dwelled on their problems more and felt less satisfied. Interestingly, however, the students’ misperceptions were not correlated with happiness of depression. But the methods used in the study can’t determine whether being lonely and dissatisfied causes people to underestimate others’ negative emotions — or vice versa.

Researchers also found that these problems exacerbated each other: another portion of the study showed that the more people suppressed their negative emotions and created the false impression that they didn’t have them, the more their peers underestimated the prevalence of these feelings and the lonelier and more dissatisfied those peers felt. That suggests that your extra efforts at “image management” — whether in person or online — probably worsens feelings of isolation and distress in your friends, by adding to their impression that yours and others’ lives are happier and more successful than theirs. (More on Time.com: 5 Ways to Stop Stressing)

Of course, it’s not that your friends want to see you doing badly either. It’s not about schadenfreude. Rather, as the study authors explain, it may be the same phenomenon that makes tragic art so appealing. On the surface, it may not make logical sense to submit ourselves to reading or watching works about other people’s pain. But we don’t enjoy “Romeo and Juliet” because we like to feel superior to the young lovers or happy that they die apart. Instead we identify with their pain — and art gives us a way to witness it and know that we are not alone.

Off stage, however, people’s emotions are mostly hidden, at least the bad ones. Twelve-step programs have a slogan that may be useful here. They say: “Don’t compare your inside to someone else’s outside.” In other words, be aware that you can’t see what other people are really going through; the faces they present to the world may not accurately represent their true feelings.

And remember that if you’re feeling alone, you’re in good company. Absurd as it may sound, the friends whom you envy may be envying you just as much!

The Stanford study was published in the journal Personality and Social Psychology Bulletin and led by Alexander Jordan. [h/t British Psychological Society Research Digest]

More on Time.com:

50 Best iPhone Apps

5 Ways to Beat the Winter Doldrums