PDA

View Full Version : Simple theoretical car question.


JoshuaD
12-27-2005, 03:16 PM
I had an argument with a friend about this situation, and I was unable to convince him. Please post what you think the answer is and why so I can link him to this thread.

You're about to leave your house and go to the gas station. On the way there you've got to make a few left turns that are subject to bad traffic and there are a few traffic lights.

If you leave 5 seconds earlier than you were initially going to, how much earlier will you get there on average?

fiskebent
12-27-2005, 03:17 PM
5 seconds

ADDboy
12-27-2005, 04:48 PM
The mean is 5 seconds, but the median difference in arrival time is smaller and possibly 0.

To see that the mean is 5 seconds, let T_1 be the travel time if we leave now, and T_2 the travel time if we leave in 5 seconds. These are clearly far from independent, but for expectation what matters is that they have the same distribution and thus E{T_1-T_2)=ET_1-ET_2=0. Since the expected difference in travel time is 0, the expected difference in arrival time is 5 seconds.

There are two reasons why the median is almost 0. The first is to think about your trip--it seems likely that the car leaving 5 seconds later will catch up to the ghost car that left on time, go through each light at the same time, and get to the gas station at the same time. Occasionally, leaving 5 seconds earlier will get you through an intersection at the last possible moment, thus saving a huge chunk of time. The fact that these two effects cancel each other out and the mean difference in arrival time is 5 seconds implies that saving a big chunk of time is a rare event, hence the median event is that the 5 seconds doesn't end up making a difference.

A more formal way of saying that is to realize that the distribution of the difference cannot be negative, but has a long right tail, hence the mean is noticeably larger than the median.

richard kurtz
12-27-2005, 05:29 PM
no way to tell in fact it could take you more time depending how the lights are set up.

AaronBrown
12-27-2005, 05:59 PM
I agree with ADDBoy. Unless there is some difference between the two times, the expected arrival difference should be five seconds. I also agree that the average is probably composed of a lot of zeros with a few one minute or longer differences.

An example of a difference beween the two times that could change the answer is if you normally leave when you hear a noon air raid siren, and that allows you to arrive at your first traffic light just as it's turning green. If you leave five seconds earlier, you save no time, you just have to wait five seconds at that light. That's pretty unrealistic for a five second delay, but if you said five hours it's a different matter.

Pog0
12-28-2005, 07:09 AM
[ QUOTE ]
no way to tell in fact it could take you more time depending how the lights are set up.

[/ QUOTE ]

Can you give an example?

fiskebent
12-28-2005, 09:59 AM
Let's say that there are no lights, no turns and no traffic. Then you'll always arrive 5 seconds earlier. The average is 5 seconds and there's no variance.

Then let's say that there's a really weird traffic light right in front the gas station that is only green at noon and red the rest of the day. So no matter when you leave, you'll arrive at noon. Let's then divide the day into 17280 5-second intervals. Normally it won't matter that you leave 5 seconds earlier. But there's one 5-second interval where if you'll be at the light just before noon and you'll arrive a day (86400 seconds) earlier.
This averages to 86400 / 17280 = 5 seconds earlier.
So the average is still 5 seconds but with large variance. Depending on how the lights and turns are set up, the variance will be large or small.

SheetWise
12-28-2005, 11:14 AM
[ QUOTE ]
[ QUOTE ]
no way to tell in fact it could take you more time depending how the lights are set up.

[/ QUOTE ]

Can you give an example?

[/ QUOTE ]

I raised an eyebrow at that one as well. But if you include all of the unknowns -- getting stuck behind a bus, or behind someone who needs to make a left turn mid-block, etc., it could be true. One of the most frustrating parts of getting stuck in traffic are those situations where you get locked in and get to watch all of the traffic from behind you advance in other lanes. But I'm still not sure how the lights alone could account for a reversal ...

ohnonotthat
12-28-2005, 09:18 PM
I am WAY out of my element here but it seems the keyword is - [on] AVERAGE

Given this stipulation I am unable to see how a 5 second delay in the time of departure could result in anything other than a 5 second AVERAGE delay in arrival.

A situation could easily exist whereby the TYPICAL benefit is greater than 5 seconds (arrive much sooner by virtue of leaving only a little sooner); conversely it is possible that the TYPICAL result could be a cost of greater than 5 seconds (arrive later, in some cases much later, in spite of having left earlier) but I cannot see how the average would be anything other than static - leave "X" seconds sooner, arrive "X" seconds sooner.

StinkWater
12-29-2005, 02:10 AM
it is much less than five seconds.

if the question was phrased such that the trips began at random times and one began 5 seconds before the selected random time for that specific trip, then the answer would be 5 seconds.

since the trips begin 5 seconds from each other, the lights and traffic correlate.

thephilosofer
12-29-2005, 06:35 AM
Suppose that the lights are timed so that they will be green for 30 seconds and then red for 30 seconds. We are assuming that the original take off time cause us to hit a red light 100% of the time, at some point during the 30 seconds while it is red. If we come to that light 5 seconds
earlier there is a 16.66% that light will be green. (if the light is red for 30 seconds, and we would have arrived while it had been red for 0-5 seconds the first time, then the light will be green if we arrive 5 seconds earlier) On the average we will save 27.5 seconds under these circumstances.( the average of 0-5 seconds is 2.5 seconds) the other 83.33% of the time we will lose 5 seconds waiting at the red light even longer. So

16.66% x 27.5 seconds = expected gain of 4.58 sec and

83.33% x -5 seconds = expected loss of 4.17 sec so

4.58-4.17 = expected gain 0.41 seconds on the average
under these circumstances.

Of course it changes based on how the lights are timed, however on the average you will spend less time driving if you leave early. The reason being that if you know the random circumstances will turn out poor for you, then changing the circumstances will have a greater possibility of helping you than harming you.

By the way ADDboy E(T_1-T_2)=ET_1-ET_2 sure i'll give you that but that doesn't prove that both sides equal zero by any means.

fiskebent
12-29-2005, 07:35 AM
OK. Let's assume that it's possible to set up some lights so that you, on average, arrive 6 seconds earlier. Let's say the trip to the gas station takes 5 minutes.

Now, if I leave 5 seconds earlier, the trip will only take 4:59. OK. So now I leave 10 seconds earlier. The trip will only take 4:58. And if I leave 25 minutes earlier (1500 seconds) the trip will be instantaneous! Wow. Major breakthrough here. Instant travel. And if I leave more than 25 minutes early, I'll actually arrive before I leave.

The same goes if I only arrive 4 seconds earlier when I leave 5 seconds earlier. If I leave 5 hours earlier, the trip will take an hour and 5 minutes.

*On average* you will arrive 5 seconds earlier if you leave 5 seconds earlier. Otherwise things break down. You can only increase or decrease variance by setting lights up in fancy ways.

thephilosofer
12-29-2005, 07:59 PM
Did you read the math? It isn't variance. you leave 25 minutes early the trip is instant? what? the expected time saved for leaving 5 seconds earlier under the circumstances I described was .41 seconds. That doesn't mean that it will be double that for 10 seconds. (actually I think it more than doubles for 10 seconds). If you leave 30 seconds earlier, that means that you will arrive at the light while it is green 100% of the time saving you 15 seconds travel time on average.(under the theoretical conditions I described in my previous post). It's kind of like you hold A9 and your opponent holds KQ and you are both all-in pre flop. flop is AKQ, turn is Q, river is 5. You lose the hand. Suppose that you had the option of going back to the flop and having another 2 random cards for the turn and the river. This of course is beneficial to you, even though it is just variance if you didn't already see the turn/river. Just like leaving 5 seconds earlier is beneficial if you know you would have stopped at a red light.(not quite the same but you may be able to see my point)

KenProspero
12-30-2005, 12:16 PM
Joshua:

There's not enough information given to answer this question.

First of all -- If you were to do a study of all the traffic lights, and average traffic patterns, it MAY be possible to determine that leaving at a precise time gives you the best chance of catching the optimal number of lights. Leaving 5 seconds later, might cause you to miss the first light, which causes you to miss the second light, etc., so it's possible that with perfect information, and perfectly choosing the situation that you could save several minutes. However, all this information will NEVER be available, so let's look at the real world.

Let's assume that for all practical purposes, the traffic lights are random (i.e., there's no way to time your trip to hit the lights). The only other variable is traffic density.

Now this isn't completely random. For example, during rush hour, everyone knows the streets are more crowded than at 3am. Further, traffic density is chartable, meaning, it would be possible to chart the mean amount of time it would take to get from your house to the gas station given any starting time. With enough data points, we'd begin to approximate a curve that rises and falls, depending on traffic patterns (note, factors such as weather, etc, also play in, but let's ignore this. Also, of course, you get different curves for weekends and holidays, than weekdays -- actually, your curve may be somewhat different on different work days too, but let's go on).

Once you have sufficient data points to have a decent curve, all you have to do is look at what the mean time will be at assumed leaving time X, then look at the mean time for assumed leaving time X + 5 seconds, and you can determine whether leaving 5 seconds later will increase your mean time, decrease your mean time or make no difference. With only a 5 second in start time, this difference in means may be insignificant or even unmeasurable for practical purposes. However, if the slope of the curve at your start time is positive, you expect that leaving 5 seconds earlier will decrease your travel time by an average of more than 5 seconds, if the slope is negative, by an average of less than 5 seconds.

All this being said, here's the answer.

Sometimes leaving 5 seconds earlier will result in a decrease in time by more than 5 seconds, sometimes less than 5 seconds. Overall, however, one would expect that that the difference in overall travel time would be insignificant.

KenProspero
12-30-2005, 12:24 PM
Unless you know to the second (or within 5 seconds) how the lights are timed, they can be assumed to be random, and won't effect the AVERAGE time at all.

For any single trip, just making or just missing a light could affect overall time by couple of minutes.

Think of it as Variance.

fiskebent
01-02-2006, 11:25 AM
Sorry this is a bit late. My Internet connection at home isn't working at the moment.

I read your original post now. I'll admit that I didn't at first since I didn't think it was necessary. And it wasen't.

You're adding the condition that if I leave now, the light will always be red. Nowhere in the OP was that specified.

And if you remove that condition, then you arrive on average 5 seconds earlier if you leave 5 seconds earlier since the times when you would have arrived at a red light but now arrive at a green are completely balanced by the times you would have arrived at a green light but arrive at a red light.

TStoneMBD
01-04-2006, 02:44 AM
i cant read all this because my brain sucks but i think i have the answer:

of course you cant answer this question decisively because we have unknown variables of the lights and traffic. however, the answer will usually be that you arrive at the exact same time as before. you will eventually hit a light that you would have hit had you left 5 seconds later, and your arrival time will be exactly the same as before since you will have to wait until the green changes each time.

this assumes that the light are time lights and not the other type of light in which it determines where the traffic is coming from.

then there will be times in which leaving 5 seconds earlier allows you to speed through a yellow light that you would have had to stop for had you left 5 seconds later, allowing you to arrive on time minutes in advance.

Honey Dutch
01-17-2006, 02:28 AM
Sorry to bring up an old topic but how can you make an equation for something so imperfect? Your equations are based on if we lived in a perfect world and assuming there are no impedements. There, however, numerous so how can you determine the time? I read someone's post saying you can't lose time leaving five seconds earlier but i believe you can. What if leaving five seconds earlier causes you to get hit by another car? What if you leave five seconds earlier and something falls off the back of a truck your following and hit yours car? What if your the victim of a Drive by shooting leaving five seconds earlier? I know these are extreme examples but how would you ever include these in an equation because they do happen in life. So how can you give an answer to this question? Wouldn't your answer be unknown? Someone wanna tell me if im completely crazy or not..

Jefferds44
01-18-2006, 12:42 AM
You get there on average 5 seconds earlier.