Its actually called 'Post Hypnotic Suggestion' it happens all the time, eg, a group of people, one lights up, if there are other smokers in the group, even if at the time they didn't want to, they'll light up also, there are loads of other examples,
Go in for a bit of people watching, and you'll see it happening with all sorts of things.
You yawn because of lack of air and as caz said if in the same vicinity you would do it, but as for doing it just reading the question its a bit like pavlovs theory with the bell ringing. Most of us would associate someone yawning with actually doing it so we do.
Lonnie is right. It's a sub-conscious reaction that all humans have. It's basically our way of empathising with others. E.g. scientific tests were carried out where people sat on a chair and had sensors attached to their fingertips. They were then made to watch a video clip of somebody throwing a tennis ball at the screen. Even though the people watching the film knew that the ball wasn't real, the sensors picked up slight but rapid movements in their fingers where their body reacted to wanting to catch the ball. It wasn't even noticeable by the human eye.