The judgements and decisions a pig makes are governed by their mood - whether good or bad - and their personality type, researchers said.
The study by researchers at University of Lincoln and Newcastle University in the UK, demonstrates for the first time that the combined mood and personality of an animal have a significant impact on its outlook.
The study was designed to explore how mood and personality affect how optimistic or pessimistic pigs are.
The researchers found that just like humans, domestic pigs are more likely to have a pessimistic outlook on life if they are in a bad mood.
More From This Section
In humans, proactivity and reactivity have been linked to extraversion and neuroticism, with extrovert individuals being more optimistic and people with neurotic tendencies proving more pessimistic.
The scientists worked with a group of pigs which included both 'proactive' and 'reactive' individuals.
The pigs were housed in one of two environments known to influence their mood and were trained to associate two separate feeding bowls with different outcomes.
When a third 'ambiguous' bowl was introduced, researchers observed whether or not the pigs approached the third feeding bowl expecting more sweets (another positive outcome), thus showing how optimistic or pessimistic each pig was.
Pigs with a proactive personality were more likely to respond optimistically regardless, but the optimism of the reactive pigs was significantly affected by their mood.
Reactive pigs living in a more enriched environment, which is known to contribute to a 'good mood', were much more likely to be optimistic about the new feeding bowl.
"The results of our study clearly show that those pigs living in a worse environment were more pessimistic, and those in a better environment were much more optimistic.
"This finding demonstrates that humans are not unique in combining longer term personality traits with shorter term mood biases when making judgements," said Collins.
The study was published in the journal Biology Letters.