Male altruism may not be due to a generous spirit after all. Instead, a new study suggests men put on their best behavior when attractive members of the opposite sex are nearby, reports Science Daily.

Published in the British Journal of Psychology, the study recruited 65 men and 65 women with an average age of 21 to participate in two experiments.

In the first experiment, participants were asked to play a game that involved making donations to a group fund.

Males donated more when observed by the sexy woman than by the man, but interestingly enough, women gave the same amount no matter who was observing them, explains The Telegraph.

In the second experiment, the men could make public donations while being watched by one of the observers. When the woman watched, the men fought with each other over who could donate the most. But when the man was observing, they behaved in the opposite fashion, explains Science Daily.

"The research shows that good deeds among men increase when presented with an opportunity to copulate. Theoretically, this suggests that a good deed is the human equivalent of the peacock's tail. Practically, this research shows how societies can encourage selfless acts," Dr Wendy Iredale of Sheffield Hallam University said in a press statement.

Another positive influence women can have on male behavior? A recent study concluded marriage and children lead men to cut smoking, both cigarettes and marijuana, along with drinking.