This caught my eye:
If you’ve ever had to take a test in a room with a lot of people, you may be able to relate to this study: The more people you’re competing against, it turns out, the less motivated and competitive you are. Psychologists observed this pattern across several different situations. Students taking standardized tests in more crowded venues got lower scores. Students asked to complete a short general-knowledge test as fast as possible to win a prize if they were in the fastest 20 percent completed it faster if they were told that they were competing against 10 people rather than 100. Students asked how fast they would run in a race for a $1,000 prize if they finished in the top 10 percent said they would run faster in a race against 50 people rather than 500. Similarly, students contemplating a job interview or Facebook-friending contest said they would be less competitive if they expected more competitors – even if "winning" only required finishing in the top 20 percent. The authors conclude that competitiveness was curtailed because the larger the group, the more difficult it is to compare oneself directly to others.
The original paper is here, but note that context effects may well give you varying results in other settings. The initial article, from the Boston Globe, discusses several other social science mechanisms of interest, although I was not surprised to learn that your dog relaxes you.
Addendum: Here is my earlier article on invisible competition.