The majority of people fall into one of four personality categories, a recent study from Spain finds. And while people with three of the personalities types — optimistic, pessimistic and trusting — were equally represented in the study, people who were identified as having an envious personality were the most common, the researchers found.

The findings also suggested that being envious may lead people to act in ways that are not rational, according to the study, which was published in August in the journal Science Advances.

In the study, researchers categorized about 540 people as belonging to four personality types — optimistic, pessimistic, trusting and envious — by asking them to play a series of games in pairs. In the games, the people were able to cooperate with their partners, oppose their decisions or even betray them. Then, using a computer algorithm, the researchers sorted the people into the four groups. 

People who were found to have an optimistic personality included those who believe that cooperating with their partners would lead to positive choices for them both, according to the study. The pessimistic group included people who tend to believe in the worst possible outcome. The trusting personality included those people who were born collaborators and were great at working with others. And the researchers assigned to the envious group those people who feel threatened when someone else is more successful than they are.

The researchers found that 30 percent of the people fell into the "envious" category, making it the most common personality type. People with optimistic, pessimistic and trusting personalities each captured 20 percent of the participants.

People in the remaining 10 percent were "undefined" because the algorithm was unable to sort them into a category, according to the study.

The new findings show that people may sometimes act in ways that are not rational without realizing it, the researchers said.

One way to illustrate the different personalities is by imagining a specific dilemma for them, study co-author Anxo Sánchez, a physicist at the Universidad Carlos III de Madrid in Spain, said in a statement.

In this dilemma, two people are allowed to hunt deer if they are hunting together, but if each of them is hunting on his or her own, the person is allowed to only hunt rabbits, Sanchez said.

According to the new findings, an envious person would always choose to hunt rabbits, because he or she would be able to do as well or better than his or her partner when it comes to the prey they might both capture, Sanchez said. An optimist would choose to hunt deer, because he or she would see this option as the most beneficial to both hunters. Similarly, a trusting person would choose deer because hunting them involves cooperation. A pessimist would go for rabbits, because rabbits are easier to hunt, and this would ensure that he or she would catch something, Sánchez said.

Originally published on Live Science.

Copyright 2016 LiveScience, a Purch company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.