Take the lazy way (from Agence France-Presse, via the (Toronto) Globe and Mail,): it is better to wait for the bus than to walk along the route of the bus and get on the bus when it catches up to you. This is intuitively obvious: whether you start walking or not, you end up arriving at your destination on the same bus (and therefore at the same time), and if you walk you risk that the bus will pass you between stops. The result is due to Justin Chen, Scott Kominers, and Robert Sinnott.
This was actually in the arXiv a couple weeks ago (0801.02979v2), but I didn't see it. Surprisingly enough, a newspaper article about mathematics in the mainstream news actually linked to the original research it was referring to! (This is surprisingly rare, and not just for articles about mathematics, but for just about anything.)
On a personal note, I walk to school and back each day even though there is public transit paralleling my usual route. This is contrary to the solution explained in the paper, but there are things that the paper doesn't include. First, by walking (a mile and a half each way) I get exercise, so I don't have to go to a gym. Second, I get frustrated if I wait for the trolley and it doesn't come. Third, I get a lot of my best thinking done while walking; the trolley is noisy enough and bumpy enough that I can't think well on it. Fourth, I'm cheap. Fifth, bus schedules around herre works of fiction anyway, and solving this problem correctly would require a more sophisticated probabilistic model, which I'm not going to go to the trouble of doing.
And the comments on this on fark.com are actually rather interesting.