Sunday, December 5, 2010

Traffic management or just bad luck?

Today I picked up my car after scheduled maintenance at the dealership in Lynnwood, and drove from there back to downtown Seattle.  I-5 was a parking lot so I elected for Aurora instead.  After hitting red lights at the first few traffic signals I wondered if I would be starting and stopping the whole way home and decided to track the lights.  I counted 27 traffic lights from the dealership south to Greenlake, of which 17 of them were red for me. Should I be surprised by that result? 

If you assume that each light is independent of each other light, and that each light has a 50% chance of being red and a 50% chance of being green, then the chance that I would hit at least 17 red lights out of 27 is 12.39%.  Not a high probability (roughly 1 in 8), but not so unexpected that I need to rush out and blog about it. 

So 17 out of 27 isn't terribly interesting, but 8 of the first 9 were red- what about that?  The chance I would hit at least 8 out of 9 is 1.95%- pretty uncommon (1 in 50) but not unthinkable.  However, when you're out driving, there's nothing good on the radio and you just want to get home, 8 out of 9 seems like the world has it out for you.

As I was writing this, I realized that I had to make quite a few assumptions and simplifications to use the calculations above.  If you haven't fallen asleep yet, read on:

1) Some of the lights were actually green when I reached them, but there were cars stopped in front of me so I had to do the same.  Thus, I counted as red any light where I had to stop or slow to a near stop, regardless of color.  During periods of heavy traffic, this could be an unreasonable assumption due to the long lines at traffic lights, but traffic was moderate today so I think this treatment was reasonable.

2) I assumed each traffic light was independent of each other traffic light.  This is likely not true, as transportation departments coordinate lights to keep traffic flowing.  However, there are many things that can happen to a driver between two lights: slow drivers could impede you, cars can enter and exit the road, and pedestrians can cross outside the crosswalks, so I think it's a reasonable assumption.

3) To simplify things, I assumed that yellow lights were the same as green lights.  Since you can go through yellows, I think this is reasonable.  By the way, I didn't stop at or go through any yellow lights on my drive. 

4) It's possible that I missed a light or two once I got inside Seattle city limits (south of 145th), but I don't think it changes the story much.  I hope you'll forgive me for putting accident avoidance ahead of spontaneous probability experiments.

Did I miss anything?

P.S.  Rather than go back to first principles and re-learn my college math, I used this site to calculate the probabilities above: http://stattrek.com/Tables/Binomial.aspx

2 comments:

  1. I just remembered you had a new blog and boy was I pleased to see that you've actually been writing on it! Well done sir! The thing that caused me to remember your blog was me thinking about how annoying it is that the number pads on telephones are opposite those on 10-keys. Lindsay disapproves!

    ReplyDelete
  2. Your assumption that you have a 50/50 chance of hitting red/green lights... I'm guessing that many of those lights on Aurora are timed so that green lights last longer on the north/south route than east/west. So technically you should have a greater than 50% chance of hitting a green light...

    However, we'd also need to account for left turns. There are 4 different cycles at each light and only one of those cycles is yours. The left-turn cycles are relatively short and the east/west is shorter than the north/south cycle so who knows, maybe it does even out to about 50/50. But some of the smaller cross-streets probably work to your advantage more, and you could expect 60-70% green lights.

    As you said, traffic gave you bad luck at the lights. Next time TR at 244th and take Fremont to Dayton to Greenwood, or better yet take 3rd instead of Greenwood. Some 4-way stops and slower speed, but maybe a little more relaxing too.

    ReplyDelete