Drinking coffee can make us happier by giving us a better outlook on life, a new study suggests.

German researchers found that participants who had been administered a caffeine dose that was equivalent to two to three cups of coffee were faster and more accurate at recognizing positive words in a series of experiments.

However, researchers found that caffeine did not have the same effect when it came to negative words, according to the study published in the journal PLoS ONE.

Past research have shown that people are better and quicker at recognizing positive words, images and sounds than negative ones, and in an effort to understand this emotional bias, researchers want to see if caffeine, which leads to faster responses and fewer errors in simple mental tasks, can help people recognize both positive and negative words more quickly.

Study author Lars Kuchinke and his team from Ruhr University, Germany, asked 66 volunteers to decide as quickly as possible whether a combination of letters shown on a computer screen were words.

Half of the participants were given pills containing 200mg of caffeine 30 minutes before testing and the others in the control group were given a lactose pill.

The results show that participants who were given caffeine pills were 7 percent more accurate at recognizing positive words. However, researchers found that caffeine produced no effect when it came to detecting emotionally neutral or negative words.

Researchers said that the latest finding suggest that caffeine may only stimulate parts of the brain connected to positivity.

"Although caffeine improves some mental functions, our study shows this may be specific for certain types of stimuli, like only positive words," Kuchinke said, according to the Daily Mail.

Past research suggests that caffeine may stimulate the central nervous system by increasing activity of the pleasure-inducing brain chemical dopamine associated with rewards, creativity, impulsivity and addiction, leading researchers to suggest that the root of our positivity preference may rest in dopamine.