Our four-legged friend's uncanny ability to know we are in a bad mood is something dog owners have long sworn by.
However, scientists have now shown that dogs really are affected by their owners' emotions.
Researchers from the University of Bristol discovered that dogs' behaviour is changed by the smell of stress in our sweat and breath.
Dogs who smelled a stressed-out human also had a more ‘pessimistic' outlook on life.
Lead author Dr Nicola Rooney says: ‘Working dog handlers often describe stress travelling down the lead, but we’ve also shown it can also travel through the air.'
Researchers have discovered that dog's become more pessimistic when they smell stressed out humans. In a trial 18 dogs (pictured) were found to be make less optimistic choices after smelling the scent of stress
Previous research into dogs' emotions has suggested that they are particularly sensitive to the moods and actions of those around them.
However, what had not yet been shown was whether smell played any role in spreading those emotional states.
Dr Rooney says: ‘Dog owners know how attuned their pets are to their emotions, but here we show that even the odour of a stressed, unfamiliar human affects a dog’s emotional state, perception of rewards, and ability to learn.'
To test this theory, the researchers recruited 18 human and dog pairs to take part in a series of trials.
First, the dogs were trained to recognise the difference between a good and bad situation.

Dogs were trained to know that bowls in some locations had treats while others had none. To measure the dog's optimism a bowl was placed in a new location while the researchers measured how quickly the dog approached it
When a food bowl was placed in one location it contained a treat, but when an identical bowl was placed in a second location it was empty.
Once the dogs learned the difference between these locations, they were faster to approach the location containing the treat than the empty location.
When a third bowl was placed in a new location, the researchers measured how long it would take for the dog to go and investigate.
If the dog went quickly, this was a sign they were optimistic that the bowl would have a treat.
Conversely, if the dog was more reluctant to go and check the new bowl for food, the more pessimistic their attitude.

The researchers say that dog's ability to detect human stress may have evolved to help them conserve energy and avoid disappointment (stock image)
During the trial, the dogs completed the same test while being exposed to the odours of sweat and breath samples taken from humans who were not their owners.
These odours were either collected while the human participants were relaxing listening to soundscapes or being stressed out by taking an arithmetic test.
The researchers discovered that dogs that had been exposed to stress smells were significantly less likely to go over to check the bowl, regardless of its location.
However, when they were given the smell of a relaxed human the dogs went to the bowls more often than when given a neutral-smelling cloth.
Later trials also showed that the dogs continued to get better at recognising the locations of the bowls and learnt the difference faster when exposed to a stress smell.

Researchers found that dogs were less likely to approach a bowl in a new location if they could smell a stressed out human. But if they smelled a calm human the dogs were more positive and more likely to check out a new bowl
Primary author Dr Zoe Parr-Cortes told MailOnline: ‘As one of our closest companions, dogs have co-evolved alongside humans for thousands of years.'
This causes dogs to experience a phenomenon called 'emotional contagion' in which they pick up the moods of their owners.
‘This can be beneficial as a threat perceived by another group member could indicate a threat to themselves; therefore, detecting and responding to fear or “alarm” in others, can be advantageous in avoiding a common threat,' Dr Parr-Cortes explains.
Dogs may have developed this ‘pessimistic response' to human stress in order to conserve energy and avoid disappointment.
The researchers say this discovery could help professional dog handlers and owners understand how their own emotions affect their dog's training.
This could be an important consideration for working dogs in high-stress roles such as police work or search and rescue operations.

As dogs have evolved alongside humans they have developed several incredible abilities to communicate and understand with their human partners including detecting our emotions
However, social contagion might also be just as important for the average owner training a puppy.
Dr Parr-Cortes adds: ‘It [human stress] can make them less likely to try something risky if they think they will be disappointed.
‘Relaxed odour did not have this effect so keeping calm or even doing a relaxing activity before training your dog could reduce this effect.'
While previous studies have shown that dogs have some reactions to other human emotions there are yet to be any studies on how these affect optimism and pessimism.
In the future, the researchers say they would like to look at the effect of emotions like happiness or deep relaxation on dog moods.
This research was published in Scientific Reports.