A new study published in the journal PLoS One suggests that yawning could be contagious depending on how well you know the person

The researchers recorded over 480 yawns within the first three minutes after the instigating yawn by the “trigger” group and found that people were more likely to respond to the yawn if they knew the person.
“Our results demonstrate that yawn contagion is primarily driven by the emotional closeness between individuals and not by other variables, such as gender and nationality. Related individuals showed the greatest contagion, in terms of both occurrence of yawning and frequency of yawns”, the researchers wrote in their report.
Source-Medindia