[HN Gopher] The waiting time paradox: why is my bus always late?...
___________________________________________________________________
The waiting time paradox: why is my bus always late? (2018)
Author : skadamat
Score : 149 points
Date : 2024-08-20 13:55 UTC (9 hours ago)
(HTM) web link (jakevdp.github.io)
(TXT) w3m dump (jakevdp.github.io)
| gpvos wrote:
| It's not just that the bus is always late, it's also that when
| you are late yourself, the bus is always on time and just
| leaving.
| dhosek wrote:
| When I first started going into the office regularly back in
| February, I would stop in a 7-Eleven a block away from my "L"
| stop on my way in.1 Every day for the first couple of weeks, I
| would watch the train leaving the stop right when I walked out
| of 7-Eleven, regardless of when I left my apartment.
|
| My solution has been to stop looking at the station when I
| leave 7-Eleven.
|
| [?]
|
| 1. I still do.
| thesuitonym wrote:
| Same energy as ``Doctor, it hurts when I raise my arm.''
|
| ``Then stop raising your arm.''
| itishappy wrote:
| My favorite version:
|
| A patient comes into a doctors office complaining of pain
| all over. The patient grabs their elbow and says: "It hurts
| when I touch my elbow like this." They then grabs onto
| their shin and says "When I grab my shin like this, it
| starts hurting too!" Finally, they massage their forehead
| and say "It even hurts when I rub my head! Doctor what's
| wrong with me!?"
|
| The doctor runs a few tests and replies: "Your finger is
| broken."
| codetrotter wrote:
| My favorite doctor joke, semi related:
|
| Patient: Doctor will I be able to play piano after the
| procedure?
|
| Doctor: Yes, I don't see why not.
|
| Patient: That's wonderful! I could never play piano
| before!
| itishappy wrote:
| Simpsons did this one in the Planet of the Apes episode.
| Here's a musical rendition by Dankmus.
|
| https://www.youtube.com/watch?v=sMRcIOjdojU
| aaronbrethorst wrote:
| What's wrong with me?
|
| I think you're crazy.
|
| I want a second opinion!
|
| You're also lazy!
| bluGill wrote:
| You just need to practice.
| dhosek wrote:
| I'm fond of an exchange from the end of "The Doctor
| Dances":
|
| Mrs. Harcourt : My leg's grown back. When I come to the
| 'ospital I had one leg.
|
| Dr. Constantine: Well, there is a war on. Is it possible
| you miscounted?
| Obscurity4340 wrote:
| I feel this is my bones
| chongli wrote:
| Yes, or my favourite: the bus shows late and then later and
| later and later on the "next bus" feature on my phone, then
| eventually it jumps 20 minutes indicating the bus has been
| cancelled for that cycle, so I start walking home, only for the
| bus to show up when I'm just too far from the stop to reach it!
| edgarvaldes wrote:
| A variation: I used to take the bus instead of a 15 minute
| walk (it was late in the day, I was tired, etc). Sometimes
| the bus would take more than 15 minutes to arrive, so I
| questioned my decision to continue waiting. When I finally
| walked home, the bus would catch up with me a couple of
| blocks before I got home.
| JeremyNT wrote:
| Yes. This is the key piece to understand this "paradox":
|
| > you arrive _at a random time_
|
| So, um, if you intend to take public transit, it's best to
| _not_ arrive at a _random_ time. Looking at the time tables and
| planning around them is public transit user 101.
| magicalhippo wrote:
| Ah, but it's on time those times you are late but really need to
| get that one departure for some important meeting or similar.
|
| edit: interesting post with a different ending than I imagined.
|
| Been thinking about using some statistical methods to give me
| some better estimates of the busses I take to work. Like "given
| that it's $today, which is a Tuesday, it's 17:30, and the display
| says the bus is 7 minutes delayed, how long til it will actually
| come?
| jeffbee wrote:
| > some statistical methods
|
| Anything would be better than what we have. When I studied
| NextBus predictions for the SF Muni 1-California line I found
| that the predicted arrival time was not even _correlated_ with
| the actual arrival time. If they had taken all the radios and
| computers out of the system and just showed a random number as
| the minutes to arrival that would have been every bit as good
| as NextBus.
| dontlikeyoueith wrote:
| > If they had taken all the radios and computers out of the
| system and just showed a random number as the minutes to
| arrival that would have been every bit as good as NextBus.
|
| Bold of you to assume they hadn't already done that.
|
| Remember, lowest bidder wins the contract.
| SllX wrote:
| Dunno what year you were doing this, but all the buses that
| travel California Street at some point are bad about this and
| you are correct that it might as well be a d20.
|
| The N Judah is usually on time or a little early, except
| going outbound between 6:30pm and 7:30pm. If you're waiting
| for the F, you should mentally add 2 minutes to whatever time
| you see. The J Church going downtown becomes increasingly
| late the closer to downtown it actually gets (partly because
| it often loses the signal lottery with the N Judah since it
| gets stalled out at the Market Street intersection even if it
| was scheduled to go in ahead of time). When the L trains were
| running, it would always seem to depart from the Zoo-side
| terminus on time if you were waiting there, but if you were
| waiting up the street on Taraval, you could reliably add 5 to
| 10 minutes to your wait time.
|
| Also at the Embarcadero, there can never be two working
| upwards escalators going from the MUNI platform to the
| eastern exits at the same time. It simply cannot happen. If
| one gets fixed, the other will break, even if it was just
| fixed a few days ago.
| cbsks wrote:
| (2018), but this article is timeless...
|
| Past discussion: https://news.ycombinator.com/item?id=18321062
| krackers wrote:
| See also https://news.ycombinator.com/item?id=16473718 and
| https://news.ycombinator.com/item?id=16469382 for similar
| incognito124 wrote:
| But, somehow, lighting a cigarette at the station makes the bus
| spawn instantly. 100% reproducible.
| onlyrealcuzzo wrote:
| As a non smoker, I'll buy some cigarettes and see if I can
| reproduce.
|
| Thanks for the tip!
| Something1234 wrote:
| Waste of time because the universe knows you don't actually
| want that pleasure of the cigarette and will be further
| punished by the cigarette for your hubris.
| bregma wrote:
| Filter tip only, I hope.
| Terr_ wrote:
| I've been told by the manufacturers that cigarettes
| _increase_ the odds of reproducing.
|
| https://xkcd.com/583/
| prmoustache wrote:
| I don't understand all those smokers that are lighting a
| cigarettes seconds or 1 minute before the bus reaches the halt.
| Most of the time you can see the bus from a distance yet they
| still light them up.
| laweijfmvo wrote:
| maybe they know they can't smoke on the bus, so they "need"
| to smoke as late as possible before getting on to survive the
| ride? idk, not a smoker.
| bravetraveler wrote:
| Eh, a bus ride is a bus ride. They're all outside of the
| 'comfort window' so to speak. When I was _heavily_
| dependent on nicotine I could still go a couple hours and
| not really mind it.
|
| Maximizing the minutes doesn't track but people _are_
| irrational. When I got an e-cig my use went way, way
| higher.
| humanfromearth9 wrote:
| For me it is shorter : I don't understand all those smokers.
| prmoustache wrote:
| I would say just use the app that says at which bus stop the next
| bus is and when it estimates its arrival.
|
| OK sometimes the app / bus location system fucks up but most of
| the time or their are unexpected road road work or traffic
| accident that suddently forces it to be slower but most of the
| time it is pretty much accurate.
| edgarvaldes wrote:
| The waiting time paradox is not only about the bus.
| xnorswap wrote:
| My favourite corollary of this is that even if you win the
| lottery jackpot, then you win less than the average lottery
| winner.
|
| Average Jackpot prize is JackpotPool/Average winners.
|
| Average Jackpot prize given you win is JackpotPool/(1+Average
| winners).
|
| The number of expected other winners on the date you win is the
| same as the average number of winners. Your winning ticket
| doesn't affect the average number of winners.
|
| This is similar to the classroom paradox where there are more
| winners when the prize is poorly split, so the average observed
| jackpot prize is less than the average jackpot prize averaged
| over events.
| pif wrote:
| > The number of expected other winners on the date you win is
| the same as the average number of winners.
|
| Sorry, but no! The total number of expected winners (including
| you) is the same as the average number of winners.
| xnorswap wrote:
| No, it's 1+average number of winners.
|
| If the odds of winning are 1 in 14 million, and 28 million
| tickets are sold, then you expect there to be 2 winners.
|
| If look at your ticket and see you've won the lottery, then
| the odds of winners are still 1 in 14 million, and out of the
| 27,999,999 other tickets sold, you expect 2 other winners,
| and now expect 3 winners total, given you have won.
| xnorswap wrote:
| For anyone unconvinced, let's simulate this.
|
| Instead of 1 in 14 million, we'll just do 1 in 2, and 8
| players.
|
| So we'll check how many bits are set in the average random
| byte: void Main() {
| byte[] buffer = new byte[256*1024];
| Random.Shared.NextBytes(buffer); var avg =
| buffer.Average(b =>
| System.Runtime.Intrinsics.X86.Popcnt.PopCount(b));
| Console.WriteLine(avg); }
|
| Okay, bounces around 3.998 to 4.001, seems normal.
|
| Now let's check how many bits are set in the average random
| byte given that the low bit is 1 (i.e. player 1 has won!)
| void Main() { byte[] buffer = new
| byte[256*1024]; Random.Shared.NextBytes(buffer);
| var avg = buffer .Where(b => (b & ((byte)0x01))
| == 0x01) .Average(b =>
| System.Runtime.Intrinsics.X86.Popcnt.PopCount(b));
| Console.WriteLine(avg); }
|
| Now ~=4.500
|
| Which is 1+3.5
|
| In this case, we're 1+ average from the 7 other players, so
| being an average of 7 others not 8 others is significant.
|
| If we simulate with millions of players, you'll see that
| removing 1 person from the pool makes essentially no
| difference.
| melenaboija wrote:
| You are making an assumption you did not explain before and
| makes it confusing, you don't know the number of winning
| tickets or the number of winning tickets affects the prize
| quantity, and not all lotteries work like that.
| xnorswap wrote:
| I'm essentially assuming the UK lottery (from 96-200x)
| rules, where players:
|
| Pick 6 numbers from 49, so odds are independent, and
| roughly 1 in 14m.
|
| The prize jackpot is determined from a set percentage
| from the ticket sales, and is shared between jackpot
| winners.
|
| How much the jackpot prize is therefore determined by
| total sales and how many winners there are.
|
| I'm also assuming your individual ticket contribution
| doesn't materially affect either the prize pool or the
| number of people playing. For a large N, small p, this
| holds true.
| adastra22 wrote:
| This is a variant of the Monty Hall problem, and the trick
| that makes it unintuitive is that you've snuck in the
| conditional of assuming you have already won.
|
| If you have a ticket and haven't checked that it is
| winning, you should expect two winners, regardless of
| whether you end up being one of them.
|
| If you play the lottery trillions of times (always with the
| same odds, for simplicity) and build up a frequentist
| sample of winning events, you will on average be part of a
| pool of two winners in those instances where you win.
|
| You snuck in the assumption that the first ticket checked
| (yours) is a winner, which screws up the statistics.
| xnorswap wrote:
| I haven't "snuck in" anything, I very explicitly stated
| that it's the conditional expectation I'm talking about.
|
| Expected(Number of winners | Pop size N and You win) = 1
| + Expected(Number winners | Pop size N-1)
|
| For small p, large N, that's ~1 + Expected(number of
| winners).
| kgwgk wrote:
| The main problem with your argument is that the "average
| lottery winner" doesn't win JackpotPool/Average winners.
| burnished wrote:
| I think you forgot to mention the condition 'given that you
| already have a ticket', and whatever justifications are
| required to assume that two more winning tickets will be
| present (if each ticket has independent odds of being a
| winner then you end up with a distribution of other tickets
| yeah?). Otherwise your premise doesn't quite lead to your
| conclusion.
| xnorswap wrote:
| Right, I didn't spell out the format of the lottery. I'm
| assuming a "pick X numbers from Y" format, rather than a
| raffle style lottery.
|
| This allows for multiple independent winners.
| jncfhnb wrote:
| That doesn't work very well when the average number of
| winners is much less than 1. The math might work out that
| the "expected value" is more than one winner but in a
| realistic lottery you should expect to be the only winner.
| TylerE wrote:
| I'm not sure if this is true, as large jackpots see a
| higher than average number of tickets sold.
| jncfhnb wrote:
| It is true. The average power ball does not have a
| winner.
| bluGill wrote:
| Every lottery I know of has many winners. One big winner
| but many who match only one numbe, and so win a tiny
| amount.
| TylerE wrote:
| Winners in this case means jackpot winners. This is
| especially relevant as unlike partial winners, the
| jackpot is shared, not duplicated.
| cortesoft wrote:
| To understand why your totally understandable conclusion is
| wrong, it helps me to think about what it means to determine
| the average number of other winners when I win.
|
| The reason is similar to the Monty Hall Problem
| (https://en.wikipedia.org/wiki/Monty_Hall_problem)
|
| To understand, lets think about the simplest representation
| of this problem... 2 people playing the lottery, and a 50/50
| chance to win.
|
| So, we can map out all the possible combinations:
|
| A wins (50%) and B wins (50%) - 25% of the time
|
| A wins (50%) and B loses (50%) - 25% of the time
|
| A loses (50%) and B wins (50%) - 25% of the time
|
| A loses (50%) and B loses (50%) - 25% of the time
|
| So we have 4 even outcomes, so to figure out the average
| number of winners, we just add up the total number of winners
| in all the situations and divide by 4... so two winners in
| the first scenario, plus one winner in scenario 2, plus one
| winner in scenario 3, and zero winners in scenario 4, for 4
| total winners in all situations... divide that by 4, and we
| see we have an average of 1 winner per scenario.
|
| This makes sense... with 50/50 chance of winning with 2
| people leads to an average of 1 winner per draw.
|
| Now lets see what happens if we check for situations where
| player A wins; in our example, that is the first two
| scenarios. We throw out scenario 3 and 4, since player A
| loses in those two scenarios.
|
| So scenario one has 2 winners (A + B) while scenario two has
| 1 winner (just A)... so in two (even probability) outcomes
| where A is a winner, we have a total of 3 winners... divide
| that 3 by the two scenarios, and we get an average of 1.5
| winners per scenario where A is a winner.
|
| Why does this happen? In this simple example it is easy to
| see why... we removed the 1/4 chance where we have ZERO
| winners, which was bringing down the average.
|
| This same thing happens no matter how many players and what
| the odds are... by selecting only the scenarios where a
| specific player wins, we are removing all the possible
| outcomes where zero people win.
| xnorswap wrote:
| You said my conclusion was wrong (edit: Apologies, I
| confused the nesting level here), then proved it correct by
| calculating the expected number of winners given you win as
| 3/2.
| FabHK wrote:
| (I think cortesoft was responding to pif, whom you also
| responded to, thus agreeing with you.)
| xnorswap wrote:
| Ah, thank you, navigating the nesting on here is
| difficult sometimes and this has proven a very
| contentious topic!
| FabHK wrote:
| Nice. And, say the lottery jackpot is a constant 6$, then
| the average winning per player is 3$ (case 1) or 6$ (case
| 2) or 6$ (case 3), each equally likely (case 4 is not
| applicable), so $5.
|
| However, if A wins, A wins either $3 (case 1) or $6 (case
| 2), so A's expected winnings are $4.5, which is indeed <
| $5, as GGP asserted.
| kgwgk wrote:
| The "average lottery winner" also wins $4.5 though. (The
| original claim was that "if you win the lottery jackpot,
| then you win less than the average lottery winner".)
|
| If there are 100 draws with a $6 jackpot 25 will have no
| winners, 50 will have one ($6) winner and 25 will have
| two ($3 each) winners.
|
| 100 winners in total - half won $6 and half won $3.
| kgwgk wrote:
| Maybe pif's comment
|
| "The total number of expected winners (including you) is
| the same as the average number of winners"
|
| means
|
| "The total number of expected winners (including you) is
| the same as the average number of winners when there is at
| least one winner"
|
| All the possible outcomes where zero people win are
| irrelevant when it comes to the calculation of how much
| "the average lottery winner" wins.
| cortesoft wrote:
| I mispoke a bit when saying it is ALL because of the case
| where zero people win.
|
| It still holds for non-zero cases, too.
|
| Since whether any individual wins is independent of other
| people winning, selecting only the situations where you
| win doesn't change the odds of other people winning, it
| simply adds a 100% chance of you winning. So it has all
| the same combination of winners, plus you.
|
| I don't have time right now to type out a more full
| explanation, but I hope this somewhat makes sense given
| my previous comment.
| kgwgk wrote:
| > So it has all the same combination of winners, plus
| you.
|
| And the same is true when you condition on having at
| least one winner. One winner doesn't change the odds of
| other people winning.
|
| [edit: this may not be correct, never mind "In your
| example it doesn't matter whether you condition on A
| winning, on B winning or on at least one of A and B
| winning."]
| cortesoft wrote:
| Right, one winner doesn't change the odds... but we are
| choosing to throw out all the scenarios where that winner
| doesn't win, which DOES change the overall odds
| distribution. We are changing our selection criteria.
| kgwgk wrote:
| I think my previous comment was wrong. Anyway, the point
| is that the original claim
|
| "if you win the lottery jackpot, then you win less than
| the average lottery winner"
|
| seems wrong unless the winnings of "the average lottery
| winner" are defined in a quite unnatural way.
|
| In your example the average lottery winner wins 3/4 of
| the jackpot. Half the winners take it all, the other half
| have to split it with someone else.
| mitthrowaway2 wrote:
| You're both right! This is where the subjective Bayesian
| framework helps clarify things. The passive-voice term
| "expected winners" leaves ambiguous a key idea: Expected by
| whom?
|
| The number of winners you expect depends on what information
| you have, namely, whether or not you know that you are
| holding a winning lottery ticket or not!
| mecsred wrote:
| > Your winning ticket doesn't affect the average number of
| winners.
|
| I think this is a good hint that the conclusion isn't true.
| Just think about what it would mean if this were true for a
| sample of lotto winners. For a winner, if _they_ win, their
| average number of winners is higher than the global average.
| Repeat this logic for each individual winner... And every
| winner wins with a higher number of winners than the average.
| Which is clearly impossible.
|
| It would be true if you were guaranteed to win, since that's
| the assumption you have conditioned the probability on, but
| that's not a lottery then. If you want to get the actual
| expected value across all samples you need to take a weighted
| sum including the expected value when you don't win.
| xnorswap wrote:
| > Which is clearly impossible.
|
| It's just like the average pupil being in a larger than
| average class size, it's not impossible!
|
| Take a situation where you have 499 lotteries with zero
| winners, and 1 lottery with 1000 winners.
|
| There are on average 2 winners per lottery.
|
| From the perspective of all the winners, there was an average
| of 1000 winners.
|
| That's the very basis of the paradox in the article.
|
| Now, in that case, the lottery would be investigated for
| fraud. But the paradox plays out in a much gentler sense.
| mecsred wrote:
| Well, I simulated it and the numbers seem to agree with
| you. The example is interesting. I still have trouble
| seeing why my original reasoning doesn't hold though. I'll
| give an example, if anyone can clear up the issue that
| would be appreciated.
|
| 1/10 odds, 10 entrants, one winner expected on average.
|
| Given a particular winner: Expect: 0.9 + 1 winners
|
| Given the same particular loser: Expect: 0.9 winners
|
| Over all cases we see: 0.1(1.9) + 0.9(0.9) = 1 winners
|
| Checks out, but if the numbers are correct then any winner
| should be able to calculate the higher average _and be
| right_ knowing only that there is at least one winner. So
| in cases where there is at least one winner: P(winners
| >=1)=1-(9/10)^10=~65% The expectation should work out to
| 1.9. The rest of the time we expect zero winners. However
| if I use those numbers I get an overall expected number of
| winners as 1.237, which has increased the overall number of
| winners _across all cases_. In order for that number to
| work out to one, the expected winners when there is at
| least one winner would have to be ~1.535. Which suggests
| that the expected outcome is different depending on if you
| check your own ticket, or someone else 's, even if you see
| the same thing?
|
| Am I just not on for math today? I thought the solution to
| the paradox would be that the higher expectation discounts
| outcomes with zero winners.
| kgwgk wrote:
| > Average Jackpot prize is JackpotPool/Average winners.
|
| > Average Jackpot prize given you win is JackpotPool/(1+Average
| winners).
|
| That doesn't make a lot of sense.
|
| Maybe you mean that most winners get less than the average
| prize.
|
| Let's say that there is $1m jackpot and there could be one,
| two, three or four winners (with equal probability).
|
| To simplify the calculation, let's say that each outcome
| happens once.
|
| The average prize is $400k (4 x $1m / (1+2+3+4)).
|
| A winner has 40% probability of getting just $250k and 30%
| probability of getting $333k.
|
| ----
|
| Edit: Or maybe you tried to say something like the following
| but didn't get it right because "average winners" means
| different things when you win and when you don't.
|
| > Average Jackpot prize is JackpotPool/Average winners when
| there are one or more winners
|
| > Average Jackpot prize given you win is JackpotPool/(1+Average
| winners when there are zero or more winners).
| xnorswap wrote:
| The key here is that you don't care what happens when you
| don't win, you don't care how much other people win.
|
| What you care about, is the expected amount you win, given
| that you have a winning ticket.
|
| Let's say there are N players, and let's say anyone has a 1
| in X independent chance to win.
|
| If you don't buy a ticket, there are N/X expected winners.
|
| If you do buy a ticket, it doesn't affect whether other
| people win or not.
|
| There are still N/X expected other winners.
|
| Your participation doesn't reduce the expected number of
| people, who are not yourself, that will win.
|
| This isn't a Monty hall problem, because Monty Hall
| introduced new information.
|
| Buying a ticket doesn't introduce new information.
|
| With Prob of (X-1)/X, you lose, and go home unhappy.
|
| With Prob of 1/X, you win. And now there are 1 + N winners.
|
| Your buying a ticket therefore increased the overall expected
| number of winners by 1/X. That is correct.
|
| Conditioned on you winning, there are 1+N expected winners.
|
| Conditioned on you losing, there are N expected winners.
| kgwgk wrote:
| Conditioned on you winning, there are 1+N expected winners.
| The number of winners is always larger than zero [edit: the
| following is not correct "and the average prize is
| calculated diving the jackpot by the 1+N expected
| winners"].
|
| Conditioned on you losing, there are N expected winners.
| The number of winners can be zero and the average prize
| cannot be calculated dividing the jackpot by the N expected
| winners [edit: not that you could before...]. [edit: the
| following is not correct "You have to divide the jackpot by
| a higher number: the expected winners conditional on having
| at least one."] No winner, no prize.
|
| ---
|
| Let's say there are 2 people playing and the probability of
| winning is 50%. The number of expected winners is 1. If the
| jackpot is $1000 the "average lottery winner" doesn't get
| $1000.
|
| Three outcomes are possible, with the following
| probabilities: 1/4 zero winners 1/2
| one winner gets $1000 1/4 two winners get $500 each
|
| The "average lottery winner" gets less than $1000. The
| "average lottery winner" gets $750. (Imagine that a lot of
| draws have happened: for each split jackpot there were two
| jackpots going to a single winnner. All in all, half the
| winners got $1000 and the other half got $500.)
|
| Consider now that you are one of the two players and you
| win. The other person will either win (you get $500) or not
| (you get $1000) with the same probability. Your expected
| prize? $750
|
| What a coincidence!
| GuB-42 wrote:
| That's true if you are cheating, for example by knowing the
| numbers in advance, guaranteeing a win. The cheater is the "+1"
| in your argument, an extra player with a 100% win rate.
|
| But if you are not, and pick a random time where you win, on
| average, you will win as much as the average lottery winner.
|
| For the classroom paradox to work, you have to take the average
| prize per draw after splitting, not the average prize per
| winner.
|
| For example, if there are 9 winners in the first draw and 1 in
| the second, then there are 5 winners on average, so the average
| prize is 1/5. If you are one of the winners, there is 9/10
| chance you are among the 9 and only win 1/9, which is less than
| average, but there is also 1/10 change of winning full prize,
| which is much better than average. If you take a weighed
| average of these (9/10*1/9+1/10*1) you get 1/5, back to the
| average prize. The average individual prize per draw is
| (1/9+1)/2=5/9, but it is kind of a meaningless number.
|
| Another way to see it is that most of the times, you will win
| less than average, but the few times you win more, then you
| will win big. But isn't it what lotteries are all about?
| nonameiguess wrote:
| This is (technically) wrong, but not for the reasons I've seen
| others give so far. Your reasoning is basically fine, but your
| definition of an average jackpot prize is not. If we have k
| lottery winners and we denote each individual prize as n_i,
| then the average prize is sum(n_1 ... n_k) / k. It's pretty
| easy to see that number cannot possibly be larger than all
| individual n_i and thus it cannot be the case that "you" won
| less than the average prize for all possible yous. Some winners
| win less than average and some win more, or they all win
| exactly the same amount.
|
| On the other hand, your analytically computed expected winning
| is indeed less than an analytically computed expected average
| prize, when conditioned on the fact that you won, because you
| are more likely than not to be in a lottery that has more
| winners than the average lottery. This is mathematically the
| same phenomenon as the thing where the perceived average class
| size if you sample random students is greater than the actual
| average class size, because more students will be in the larger
| classes. This doesn't mean _every_ class is larger than the
| average class, which is not possible. It just means that if you
| randomly select a student, you have a better than 50 /50 chance
| of selecting someone in a larger than average class.
| FabHK wrote:
| Related: Suppose Bitcoin's difficulty is tuned correctly to the
| target block time of 10 mins/block. Then, if you pick a block
| uniformly from the list of blocks, its expected length is 10
| minutes. However, if you pick a point in time uniformly, the
| expected length of the block it's in is 20 minutes.
| laweijfmvo wrote:
| my take away is that if you're lucky enough to live in a place
| that has such a bus schedule, you can just ignore the schedule
| and show up whenever you want and only wait 10 minutes. sounds
| lovely!
| i80and wrote:
| Tell me about it. Reliable 45 minute bus headways would be a
| dream where I live
| bluGill wrote:
| 30 minutes is the worst I will accept. I have better things
| to do than sit outside a locked door for an hour waiting for
| the person with the key to arrive. I want every 5 mintes but
| I will be able to deal with up to half hour. More than that
| and I guess I must drive.
| dekhn wrote:
| I got asked a variation on this in an interview several decades
| ago. "What is the expected waiting time for a bus that arrives on
| average every ten minutes and you show up at a random time". I
| was sure it was 5 but they actually wanted me to do the math from
| the article, in my head, in 30 minutes. I did not pass that
| interview and did not get the job (which was a good thing long
| term).
|
| I really enjoy having 10-20 lines that produces the expectation
| value directly by simulation; that's a fast way for me to
| understand the underlying values.
| memming wrote:
| Renewal theory! https://en.wikipedia.org/wiki/Renewal_theory
| kqr wrote:
| This is one of my favourite queueing theory-adjacent
| consequences.
|
| As the article notes, it's the same reason the average coin in a
| sequence of tosses will be in a longer run than the average run
| length.
| ChrisArchitect wrote:
| (2018)
|
| Some discussion then:
| https://news.ycombinator.com/item?id=18321062
| c_moscardi wrote:
| Related reading; explains the same concept quite well IMO with
| NYC subway data. This is where I learned about this concept.
|
| [1] https://erikbern.com/2016/04/04/nyc-subway-math
|
| [2] https://erikbern.com/2016/07/09/waiting-time-math.html
| stonemetal12 wrote:
| >when the average span between arrivals is N minutes, the average
| span experienced by riders is 2N minutes.
|
| Who is arriving in the first part of the sentence? At first I
| thought he meant the bus arrival, thus N = 10, and 2N would be
| 20. But then he says
|
| >The average wait time is also close to 10 minutes, just as the
| waiting time paradox predicted.
|
| 10 isn't 20 so ???
| outop wrote:
| The average time between two buses (based on the Poisson model
| used in TFA) is N minutes. But you are more likely to arrive in
| a long interval than a short one. So if you turn up to the
| station at a random time, the average time between the last bus
| that departed before you got there and the next departure, is
| 2N minutes.
| taeric wrote:
| This seems more to say that the average time of all passengers
| waiting will be close to the interval, but that the average time
| for any individual in a given stop will be closer to half?
| (Similarly, if you are discussing the longest time you will wait
| throughout the day and you have multiple stops you have to wait
| at, it will drift up to the the interval time.)
|
| That is, they sound like similar questions, but they are not. How
| long can one random person expect to wait at a stop is different
| from how long a population will wait at a given spot. In large
| because a person can only arrive at a single time in the waiting
| interval, but more passengers become less likely the closer to
| departure time.
|
| (I realize I didn't word all of this as a question, but I am not
| asserting I'm correct here. Genuinely curious if I understand
| correctly.)
| maeil wrote:
| It's not about population vs. individual. The underlying
| principle is the assumption that we (the people taking the bus)
| arrive at a random time. And we're more likely to arrive in a
| shit interval (because they're longer) than in a lucky interval
| (because they're shorter).
|
| Here's a trivial example.
|
| Buses are supposed to arrive at a 10 minute interval: 12:00,
| 12:10 and 12:20. But today the second bus arrives a bit early,
| at 12:07. So they arrive at 12:00, 12:07 and 12:20. We arrive
| at the bus stop at a random moment >12:00 and <= 12:20.
|
| If we arrive in the interval 12:00-12:07, our average waiting
| time will be 3.5 minutes. What's the chance that we do arrive
| in this interval? 7 mins/20 mins.
|
| If we arrive in the interval 12:07-12:20, our average waiting
| time will be 6.5 minutes. What's the chance that we do arrive
| in this interval? 13 mins/20 mins.
|
| So our expected waiting time is not 5 minutes but 3.5 * 7/20 +
| 6.5 * 13/20 = 5.45.
|
| Basically "the shit intervals are longer so we're more likely
| to arrive in them. the lucky intervals are shorter so we're
| less likely to arrive in them.". If we arrive at a random time,
| which is the core assumption here.
|
| Now you might say "but 5.45 doesn't feel close to 2N". And
| that's where the other assumption that probably does not
| reflect reality comes in - the bus arrival times are simulated
| as uniform random numbers. I mean, it depends on where you
| live, haha. But it's pretty much a worst case scenario, so in
| reality it's not as bad. Which the writer shows using the real-
| world data.
|
| Nevertheless, unless it's the Japanese subway which always
| arrives exactly on time, it's always going to be bigger than
| 2N.
|
| And what if we don't arrive at a random time, but arrive
| according to some pattern guided by the bus schedule? That
| change everything.
|
| Still, it's actually pretty common to arrive at a random time,
| and buses (and some subways, or other things in life) do tend
| to arrive not exactly on time, in which case it holds. To some
| extent.
| taeric wrote:
| This seems to be attacking from a different perspective,
| though? You are requiring the change from a bus that is not
| to schedule. This article pointed out that that was not
| necessary. And, indeed, you can presume perfectly scheduled
| busses and still see a distribution quirk where the average
| wait time of the population is at the interval level. Right?
| marcosdumay wrote:
| If the buses are perfectly at schedule and people arrive at
| random (uniform), the mean (and the median) waiting time
| will be half the scheduled interval.
|
| If both are completely uniformly random, the mean waiting
| time will be the mean interval between buses. (In fact the
| distribution of the passenger arrival doesn't matter
| anymore.)
|
| The real world is somewhere between those two.
| taeric wrote:
| Isn't that at odds with the article? Quoting, "The reason
| is that there are (of course) more students in the larger
| classes, and so you oversample large classes when
| computing the average experience of students." This leans
| on the experiences of the students, which necessarily
| leans on the population. (Granted, this is more clearly a
| different question/scenario.)
|
| I'll try and play with the simulation some. And to be
| clear, I don't disagree with your statements. I just feel
| these are still different questions/statements. How long
| I expect to wait at a given trip/stop is not the same as
| how long I expect I have waited at that stop over the
| days.
| marcosdumay wrote:
| My comment paraphrases what the article says.
|
| You seem to be expecting something different from the
| inspection paradox, but all it says is that the waiting
| time will be higher than half of the interval between
| buses. And it only applies when the time between buses is
| random.
| taeric wrote:
| One of the things I've found far more often than makes
| sense, is that many paraphrases also change the statement
| they are paraphrasing.
|
| The article goes out of its way to call out that sampling
| the average experience of students. This was obviously
| different in class sizes. Since there are more students
| than there are classes, it makes sense that the average
| size of classes that a student attends is different than
| the average size of classes offered. It isn't that people
| are giving you two different answers, they are answering
| two different questions.
|
| Also, the article specifically says the waiting time
| paradox makes a stronger claim that the average will tend
| specifically to 2N. "But the waiting time paradox makes a
| stronger claim than this: when the average span between
| arrivals is N minutes, the average span experienced by
| riders is 2N minutes. Could this possibly be true?" I'm
| trying to explore/understand how that works out.
| marcosdumay wrote:
| Oh, right. I was focused on the progression, I didn't
| notice you were talking about a factor of 2 that I forgot
| there.
| maeil wrote:
| The article says the following:
|
| > If buses arrive exactly every ten minutes, it's true that
| your average wait time will be half that interval: 5
| minutes.
|
| Which means that "not arriving exactly on schedule" is
| indeed a requirement.
| taeric wrote:
| Ah, I clearly misread that spot. I don't think this
| changes too much of my questioning here. Will definitely
| be playing with this more.
| Projectiboga wrote:
| In combinatorics we calculated that the typical wait time is very
| close to the actual planned interval.
| rjmunro wrote:
| There's another thing that happens with busses that makes it
| worse.
|
| The further behind the previous bus a bus is, the more people
| will arrive at the bus stop. The more people there are at the
| stop, the longer the bus has to spend picking them all up and
| selling them tickets etc. Therefore the delayed bus will tend to
| experience more delay. The bus behind them will have less people
| to pick up, so it will spend a shorter time at stops and tend to
| catch up with the first bus, so the two busses are dragged
| towards each other.
| jjbinx007 wrote:
| Also buses are more likely to let other buses out in traffic so
| that's another reason why you get clumps of buses arriving
| rather than regularly spaced ones
| ajuc wrote:
| It's a law here in Poland that everybody has to let the buses
| leaving a bus stop to enter the lane before them.
|
| I think most people complaining about buses in this thread
| just live in a city where public transport isn't a priority
| so it barely works :/
|
| The city buses I've seen in USA have 1 or 2 doors. It's
| already wrong - it makes the boarding time unnecessarily
| long. Then there's the tickets - drivers shouldn't be selling
| or checking the tickets. You should buy tickets in a ticket
| machine or on your smartphone. And they shouldn't be checked
| every time - it takes too long. Have a group of people who
| board random buses and check the tickets there while the bus
| is driving so as not to waste anybody's time.
|
| Bus schedules and routes should be designed with randomness
| in mind. There should be a small buffer (1 minute is enough
| if boarding is quick) to zero the randomness on each bus
| stop. Most bus stops should be mandatory so that 3
| consecutive bus stops without passangers don't wreck the
| whole schedule (and then it spreads to other buses because
| you have to wait for 5 minutes at a bus stop for your
| departure time and you block entrance for other buses'
| passangers which makes boarding longer).
|
| If you just put an intercity bus (that can work with 1 door
| and driver selling the tickets) and use it as a city bus that
| stops every 1-5 minutes - it won't work.
|
| City buses should be optimized for latency not throughput.
| Ylpertnodi wrote:
| >the longer the bus has to spend picking them all up and
| selling them tickets etc.
|
| In my country, apart from an app/ online, you can buy a ticket
| pretty much anywhere. I guess someone worked out that bus
| drivers with money are a potential theft risk, and also that
| selling tickets on the bus takes time and makes busses late(r
| than they would be).
| matrix2003 wrote:
| As a rider, I also just find it more convenient to buy
| tickets in an app.
|
| I can link my payment method, and purchase tickets in seconds
| whenever I'm ready.
| bluGill wrote:
| If you rarely ride though cash is easier. I won't use the app
| again so I don't want it. Fortunately in the us multiples of
| $1 are good price points so exact change put it in the safe
| works well.
| jerlam wrote:
| The slickest process I've seen is to just swipe your credit
| card, without any setup whatsoever.
| jmm5 wrote:
| tap
| SoftTalker wrote:
| Often the most expensive though. You're paying the highest
| individual fare rate, possibly plus card processing fees.
|
| If you buy a transit pass or use their app you can get
| significant discounts.
| ajuc wrote:
| In my city the buses have ticket machines inside them,
| there's also ticket machines at the bus stops, and you can
| buy tickets on your smartphone. Or at small street shops but
| it's last resort.
|
| Most people that drive often just have monthly tickets so
| they don't have to do anything - just get in/out of the bus.
|
| Drivers are banned from selling tickets - they only do the
| driving. And nobody checks if you bought a ticket on every
| ride - there's a random check every now and then and if
| you're caught you pay a high fine. But you have maybe 1%
| chance of being checked at any given ride.
| mitthrowaway2 wrote:
| That bus with more riders on board also has a higher
| probability of needing to stop to let people off at each
| location as well, slowing it down even further!
| ajuc wrote:
| This is part of a good route design - most bus stops should
| be "mandatory" - which means the bus stops there no matter
| what. Some bus stops are "optional" - driver only stops there
| if there's somebody waiting or if somebody in the bus presses
| the "STOP" button near the doors. It's marked on the
| timetable which bus stop is optional.
|
| It's not worth it to make every stop optional because then
| the routes become too unpredictable and scheduling is hard.
| Usually there's like 5-10% of optional bus stops on each
| route - only in the places where very few people get in/out.
| leereeves wrote:
| OTOH, it's extremely annoying to sit on a stopped bus when
| no one is boarding or leaving. That discourages use of mass
| transit.
| ajuc wrote:
| It takes like 10 seconds. And you have to keep the
| schedule anyway - if you skip this bus stop you'll be
| waiting at the next one longer.
| mitthrowaway2 wrote:
| For express or intercity busses, that makes sense, but for
| high-frequency regular bus routes, I can't imagine that
| working. It means thar bus stops would have to be extremely
| sparse, or else the bus trips would need to be extremely
| slow.
| ajuc wrote:
| Exactly the opposite. It sucks for intercity buses, cause
| there's no point. Bus stops are rare and buses don't
| "bunch up". It's essential for city buses.
|
| This is how it works in every big city in Poland, it's
| working great. More cities started to use this system
| over time, because it improves the scheduling so much.
|
| The point of city buses is that they drive in traffic
| anyway - they rarely drive over 50 km/h and they stop
| every 5 minutes. How regular they are is MUCH more
| important than how fast they drive.
|
| If you skip 3 stops because nobody waited there - you get
| to the 4th bus stop 5 minutes too early and wait for 5
| minutes there - potentially blocking the bus stop for
| others and wrecking havoc with the scheduling. Much
| better to split these 5 minutes between the bus stops
| where nobody is blocked.
|
| It's like in gamedev - you don't want to optimize happy
| case cause you're making the situation WORSE. If your
| fastest frame takes 5 ms instead of 10 ms it changes
| nothing at best (and makes for more jerky movement at
| worst). If your longest frame takes 15 ms instead of 18
| ms - it means you can keep consistent 60 FPS now - and
| that's a HUGE win.
| SoftTalker wrote:
| City buses stop much more often than every 5 minutes in
| my experience. It's more like every couple of blocks,
| sometimes every block, at least in the densely populated
| areas.
| mitthrowaway2 wrote:
| For intercity busses, keeping an accurate schedule is
| essential. If you miss your bus because it ran ahead of
| schedule, it's not a five-minute wait for the next one;
| you'll possibly even be booking a hotel for the night.
|
| For express busses, stops are far enough in between and
| all major locations, so you may as well stop at all of
| them.
|
| For milkrun busses, where the frequency is so high,
| scheduling errors are only really a problem if the busses
| bunch up and create excessive gaps.
|
| If a bus trip takes 45 minutes when a car takes 15, more
| people drive and then traffic gets bad. But busses with
| dedicated lanes and coordinated light-timing can go much
| faster than traffic, when they aren't stopping for
| passengers!
|
| I think you and I must live in cities with very
| differently-run transit companies!
| supertrope wrote:
| >bus stops would have to be extremely sparse, or else the
| bus trips would need to be extremely slow.
|
| Way too many transit operators choose extremely slow.
| Having bus stops every 100m is popular because it offers
| almost door to door service. But when every single person
| separately boards it results in the vehicle being stopped
| 1/3 of its running time! People generally prefer faster
| bus routes (average 20 MPH) even if it requires them to
| walk a block to the stop versus a service that stops
| every block but averages 6 MPH (bicycle speed).
|
| https://humantransit.org/2011/04/basics-walking-distance-
| to-...
| SoftTalker wrote:
| You can do a study of the actual number of people who get
| on/off at each stop and then determine which ones should be
| optional. And at off-peak hours, almost all the stops are
| optional at least from what I've seen in Chicago.
| ajuc wrote:
| > And at off-peak hours, almost all the stops are
| optional at least from what I've seen in Chicago.
|
| Do you not have schedules at bus stops? If you skip
| almost all the bus stops you'll be like 10 minute early
| at the first non-empty bus stop, so you'll have to wait
| for these 10 minutes there (or you depart early which
| makes people miss their bus).
|
| Potentially you'll be blocking the bus stop for these 10
| minutes for other buses.
|
| Why not split these 10 minutes between the empty bus
| stops instead?
| xigoi wrote:
| My city has actually recently switched to making all stops
| optional, claiming that it improves efficiency. Let's see
| how that will go.
| Gravityloss wrote:
| Robotic buses could be made smaller than driver buses since
| the cost of driver doesn't need to be amortized as many
| passengers as possible. Then you could implement optional
| stop skipping. At the end of the spectrum you have Uber X ie
| taxi with ride sharing.
| stouset wrote:
| Buses already do this.
|
| If nobody is waiting and nobody asks to get off they don't
| stop. If nobody asks to get off and there's a second bus
| right behind, drivers skip the stop.
| bluGill wrote:
| This is why good back office daspatch is needed. If the bus is
| late slow the following but and/or add another.
| ajuc wrote:
| That's why city buses have 3 or 4 double doors and there's
| ticket machines inside (and drivers don't sell tickets). The
| time to board rarely goes over 15 seconds.
|
| Compare:
|
| https://www.lubus.info/images/stories/taborbus/5122-57.jpg vs
| https://www.chicagobus.org/system/photos/250/large/DSC00925....
|
| That's double the boarding time at every stop right there.
|
| The schedule is also designed in such a way that the bus is
| usually ~1 minute ahead of time and can wait for the proper
| time to depart from each bus stop - zeroing the randomness on
| each stop. If it gets too delayed on one part of the route it
| can catch up on next few bus stops.
|
| On intercity routes there's fewer bus stops so usually there's
| just 1 door and the driver sells the tickets.
| bhuber wrote:
| This phenomenon consistently happened to my college bus system,
| but on an even worse scale. The main bus line did a loop around
| campus, which took ~20 min to complete and buses scheduled
| every 5 minutes. In reality, you got a caravan of 4 busses
| arriving every 20 minutes, with the first one totally full and
| the last practically empty.
| theluketaylor wrote:
| When I was a teen in Calgary the transit agency was really
| good at dealing with issues like this during peak periods.
| They would pair or triple busses together and alternate
| stops. If someone requested the stop the drivers would radio
| to coordinate. Sometimes both buses would have a requested
| stop, but they would work together so only one bus allowed
| new riders on. The non-loading bus would quickly drop off
| passengers and leave while the other stayed behind to handle
| new riders. Nearly all the stops had dedicated out of traffic
| space for the bus, so the leap-frog maneuver was really
| simple. A small amount of low cost infrastructure and some
| operational cooperation enabled much better service.
| a_e_k wrote:
| Another simple strategy that I've seen is simply for the
| loaded bus to allow the empty bus to overtake it and go on
| ahead (and just stay ahead).
| pc86 wrote:
| That sounds identical to what the Calgary busses do?
| You'd still need coordination between the busses to know
| when the loaded bus "wants" the empty one to overtake it.
| hobo_in_library wrote:
| The driver in the front sticks his hand out the window
| and waves to the one in the back
| a_e_k wrote:
| The difference is that it was a one-and-done thing rather
| than leapfrogging back and forth as it sounds like
| `theluketaylor` was describing.
|
| And yes, the drivers would coordinate. (I've sometimes
| seen it done with a brief honk for attention followed by
| a hand wave.)
| eichin wrote:
| That's why "dispatcher" is an actual job.
| slater wrote:
| Isn't that when the second bus just sits idling at one stop for
| 5-10 mins? That's what they do here in SF -\\_(tsu)_/-
| amiga386 wrote:
| This is https://en.wikipedia.org/wiki/Bus_bunching
| soperj wrote:
| If you track the busses, this should be as easy as changing one
| bus to "bus full" and have the emptier bus behind it picking up
| the passengers for a while. That will speed up the fuller bus
| and slow down the bus behind it.
| tunesmith wrote:
| Some bus systems handle this (partially) by only allowing
| passengers to disembark from the lead bus. Stop, open the back
| door, don't open the front door, take off. I don't know either
| way, but the belief is that it helps smooth it out over time.
| whiterock wrote:
| There are still buses that sell tickets :O May I ask where?
| This has been shut down years ago where I live for the time it
| takes as you say.
| maeil wrote:
| This was easily the most memorable thing I learned during my
| statistics degree! Nothing else has stuck with me this well.
| mass_and_energy wrote:
| Does this relate in any way to the phenomenon of "lighting a
| smoke to make the bus come?" you see, you're waiting for the bus
| and after a few minutes you realize "man, I could have had a
| smoke by now" so you light a smoke, but sure enough the bus will
| come before you can finish your cigarette. This seems to happen
| every time you light the cigarette waiting for the bus. So this
| time you get to the stop and light your cigarette right away so
| that the bus comes, to no avail. What gives?
| drexlspivey wrote:
| Same thing is true for Bitcoin block times (also a Poisson
| process), a block is expected to arrive every 10 minutes on
| average but if 10 minutes (or 15 or 20) have passed since the
| last block the expected time for the next block is still 10
| minutes.
| kwhitefoot wrote:
| I haven't read the article but just to answer the question in the
| title: Buses must always be late because a bus that leaves early
| is even more useless.
| asdff wrote:
| Well, they leave early all the time too.
___________________________________________________________________
(page generated 2024-08-20 23:00 UTC)