Yawning has always been thought of as “contagious” among humans. When someone in a group yawns it always seems to set off a trend of yawning with people around. This has often been thought of as being social in the same way that you think things are more funny when other people laugh and you frown more when other people frown. In a new study reported on by the BBC, researchers have found that yawning as a contagion is not limited to the human species but is seen in chimpanzees as well. What is even more interesting is that chimps in their studies yawned more frequently after seeing chimps from their own group yawn as opposed to when they watched chimps from an outside group yawn. The researchers suggest that this might mean that yawning can be seen as a measure of empathy.
As far as I know there hasn’t been research which has shown if this yawning bias towards ingroup members is present for humans. Empathy in humans has been linked to pro-social behaviour and there is research suggesting that people tend to be more prosocial and feel more empathy towards people in their ingroup than in their outgroup. So if yawning is a measure of empathy, it would make sense that people, like chimps, would yawn more when they see members of their ingroup yawning than when they see outgroup members yawning.