8
$\begingroup$

3 trams are coming to the stop every 10, 15 and 15 minutes.
On average, how long do I have to wait for any tram to come?

It's a practical problem, not some kind of a riddle for which I have a surprising magic trick or an answer. I really don't know. I was waiting for a tram when this question come to my mind. So, if you ask me for example "how the trams are driving?" my answer will be I don't know, I have the same (or lesser) tram knowledge as you. Assume some accurate (probably probabilistic;) model and present the answer, for example "5 minutes" + showing how you obtain this result. Perfect answer will generalize the problem, answering how long do we have to wait when the trams come every $x_1, x_2, x_3...$ minutes. But even the basic problem is not as easy as it is looking, so feel warned.

$\endgroup$
2
  • $\begingroup$ 10, 15 and 15? Do you know when the trams depart, or how far apart they are? $\endgroup$
    – qwr
    Jan 28, 2014 at 18:57
  • $\begingroup$ @qwr According to the schedule, first tram "should" (in theory) appear every 10 min, second every 15 min and third also every 15 min. But of course practice is very far from theory! :) $\endgroup$ Jan 28, 2014 at 19:01

8 Answers 8

6
$\begingroup$

There are (at least) three reasonable probability models for this problem: (a) the Poisson process model (see heropup's answer), (b) the assumption that the trams arrive on time according to a scheme known to the user (for examples see PhiNotPi's and user1008646's answers), and (c) the assumption that the trams arrive on time with unknown but equidistributed phases. In the following I shall treat model (c).

Model (c) is equivalent to the following: A random point $P=(X,Y,Z)$ is chosen in the block $$B:=\{(x,y,z)\>|\>0\leq x\leq15,\ 0\leq y\leq 15,\ 0\leq z\leq 10\}\ .$$ The waiting time $T$ is then given by $T=\min\{X,Y,Z\}$. The points $P$ with waiting time between $t$ and $t+dt$ are lying in the union of three rectangular panels of thickness $dt$ and having a distance $t$ from the planes $x=0$, $y=0$, and $z=0$ respectively. The area of the two vertical panels is $(10-t)(15-t)$, and the area of the horizontal one is $(15-t)(15-t)$. It follows that the probability distribution function $f_T$ of the waiting time is given by $$f_T(t)={1\over2250}(525-80t+3t^2)\qquad(0\leq t\leq10)\ .$$ From this we obtain the expected waiting time as $$E(T)=\int_0^{10} t\>f_T(t)\ dt={85\over27}\ .$$

$\endgroup$
1
  • 1
    $\begingroup$ I think this answer makes the most sense! $\endgroup$
    – Tunococ
    Jan 29, 2014 at 13:20
3
$\begingroup$

EDIT: When in doubt, simulate!

I wrote the following Mathematica program (it gets the job done, but I'm somewhat a Mathematica novice).

a = {};
Do[b = RandomReal[]*15; c = RandomReal[]*15; 
 a = Append[a, 
   ContraharmonicMean[
    Differences[Sort[{0, 10, 20, 30, b, b + 15, c, c + 15}]]/
     2]], {100000}]
Print[Mean[a]]
Print[StandardDeviation[a]]

Basically, it creates a random offset for the two 15-minute trams, calculates the length of the intervals and wait time, and finds the weighted average. It then repeats this $100000$ times.

The results were $3.147327637397844$ for the mean and $0.33480521158615867$ for the standard deviation. The $95\%$ confidence interval is (if I did by math correctly) about $3.145,3.149$. (Note that this was the average wait time, so the average interval is twice this.)

EDIT: An attempt to simulate to find the minimum average resulted in $2.66667$. This agrees perfectly with user1008646's answer, which I believe gives one type of ideal schedule.


Original answer:

I'm making the assumption that the trams all start together, like so:

1: @.........@.........@.........@.........@.........@.........@
2: @..............@..............@..............@..............@
3: @..............@..............@..............@..............@
   time->

From this, we can see that there is a repeating pattern composed of two 10-minute gaps and two 5-minute gaps.

The 10-minute gaps give an average wait time of 5 minutes, while the 5-minute gaps give an average wait time of 2.5 minutes. You are twice as likely to be stuck in a 10-minute gap than in a 5-minute gap, so the weighted average is:

$$5 \times \frac{2}3 + 2.5 \times \frac{1}3 = \frac{25}6$$

So the average wait time is about 4 minutes 10 seconds.

If the trams have a staggered start, then the average wait would be shorter.

$\endgroup$
14
  • $\begingroup$ So, there is no benefit from the 3rd 15-min tram? :) I think (I hope;) our communication have better design :) More seriously: it's rather impossible that trams in the reality will follow exactly that pattern, they even cannot physically appear at exactly same time on the stop (trams have some length). $\endgroup$ Jan 28, 2014 at 19:27
  • $\begingroup$ If the trams follow a rigid schedule, then there might not be a benefit in terms of wait time (the benefit would be in larger passenger capacity). I don't know the type of tram schedule. $\endgroup$
    – PhiNotPi
    Jan 28, 2014 at 19:31
  • $\begingroup$ @AdamStelmaszczyk Now you're just adding variables in. If you want an answer you need details :P $\endgroup$
    – qwr
    Jan 28, 2014 at 19:54
  • $\begingroup$ @qwr It's not me, it's the world who have so many variables ;) You can get as many details as you want (but not too much, to not complicate the model) by observation/experience/sane assumptions :) $\endgroup$ Jan 28, 2014 at 20:02
  • 1
    $\begingroup$ I'm interested now in the starting configuration of these trains which produces the smallest maximum wait. $\endgroup$
    – ZKe
    Jan 28, 2014 at 22:13
2
$\begingroup$

A statistical method is to model the random arrival time of the trains as three Poisson processes. Thus, the interarrival times of each train are IID exponential random variables $X_1$, $X_2$, $X_3$ with means $\mu_1$, $\mu_2$, $\mu_3$. The random waiting time until the first train's arrival is the minimum (first) order statistic $X_{(1)}$. We see that this has probability distribution $$F_{X_{(1)}}(x) = \Pr[X_{(1)} \le x] = 1 - \prod_{i=1}^3 \Pr[X_i > x] = 1 - e^{-Kx},$$ where $K = \mu_1^{-1} + \mu_2^{-1} + \mu_3^{-1}.$ Thus the minimum order statistic is also exponential with mean $1/K$, hence the mean arrival time of the first train is $1/(\mu_1^{-1} + \mu_2^{-1} + \mu_3^{-1})$. For $\mu_1 = 10$, $\mu_2 = 15$, $\mu_3 = 15$, we immediately get ${\rm E}[X_{(1)}] = \frac{30}{7}$.

Moreover, we can see that the sum of $n$ independent (homogeneous) Poisson processes with rates $\lambda_1, \lambda_2, \ldots, \lambda_n$ is itself a Poisson process with rate equal to the sum of the individual rates. So, the mean waiting time for the next event is $\left( \sum_{i=1}^n \lambda_i \right)^{\!\!-1}.$

$\endgroup$
4
  • 1
    $\begingroup$ I suggest replacing "the statistical method" by "a statistical method", since the Poisson model is not implied in the question. :) $\endgroup$
    – JiK
    Jan 28, 2014 at 19:30
  • $\begingroup$ This agrees with my answer $60/14$ for the average interval length, but you made the same mistake I did: the OP asked about the average $wait$, which is $1/2$ of the average interval length, therefore $15/7$. $\endgroup$
    – Michael
    Jan 28, 2014 at 19:32
  • 2
    $\begingroup$ In a Poisson process, the average wait is equal to the average interval length. $\endgroup$
    – JiK
    Jan 28, 2014 at 19:41
  • $\begingroup$ @JiK. Indeed. I have edited my response accordingly. $\endgroup$
    – heropup
    Jan 28, 2014 at 19:48
2
$\begingroup$

It depends on their offset from the top of the hour. As PhiNotPi stated, if all three arrive at the top of the hour, then during a period of 30 minutes, trains will arrive at times 10,15,20,30. If you arrive at a random time during that 30 minutes your average wait will be 25/6 minutes.

If the first tram arrives at the top of the hour, the second at 2 minutes after the hour, and the third at 8 minutes after the hour, the times will be:

2,8,10,17,20,23,30

resulting in a much shorter average wait of 16/6 minutes.

$\endgroup$
2
$\begingroup$

I believe that the current four answers are all wrong - @Michael's and @user121049's are mathematically wrong, and @PhiNoPi's and @heropup's because they make wrong assumptions. To see how to calculate this rigorously using what I think is the correct model, we should build up from one bus to three.

EDIT: The answer I think does a reasonable job of justifying the model I chose. However the calculations, after first being completely wrong, are now correct, but left only to show my original, tortuously convoluted way of finding the answer. The correct waiting time of $\frac{85}{27}$ or $3.148148\ldots$ minutes or about 3 minutes and 9 seconds was first given by @ChristianBlatter, who used a much better method. It was also estimated very closely by @PhiNotPi, who used a simulation to find an approximate value using the same model.

1 bus

There are two reasonable models for a single bus, let us say with a frequency of 15 minutes. Either the bus arrives periodically every 15 minutes, or the long-term frequency of buses is 1 per 15 minutes, but completely independently - the probability that a bus will arrive in the next short time period is not affected by how long it has been since the last bus. The first is the model that the bus company would like us to believe in, and the latter is the model that most people with experience of buses do believe in. We shall call these the 'periodic model' and the 'Poisson model'.

The periodic model is easy. We are going to arrive at some point in a 15-minute interval between the previous bus and the one we catch. Our arrival is distributed uniformly over this interval, or from our point of view, the arrival of the first bus is distributed uniformly over the 15 minutes after we get to the bus stop. So our average wait is 15/2 = 7.5 minutes.

We should say something about the Poisson model. A Poisson process has a single parameter, the rate. At (limiting) large scales this is the average number of buses divided by the length of time. At (limiting) small scales it represents a probability - the probability that one bus will arrive in a small time period is the rate multiplied by the length of the period. Since each of these small periods is independent, the system has no memory, If a bus just left there is still the same chance that one might arrive in the next instant, and conversely, no matter how long you have waited, the probability that a bus will arrive in the next moment is still the same.

Which bus model would you prefer, if you had to wait for a bus? Most people would say the uniform model, where their waiting time is random but bounded. They are right, and we can show this mathematically. Suppose that $n$ buses arrive at various time during an hour, and that we get to the bus stop at some time during that hour. The hour is divided up into intervals between buses, and unless the periodic model holds they have different lengths. We are more likely to arrive at the bus stop during a longer interval than a shorter interval. So our waiting time is not simply given by (half of) the average interval. It is determined by the weighted average, where the weightings are proportional to the lengths. For simplicity let's measure the lengths of the intervals in hours, say they are $l_1, l_2\ldots$. Then the lengths sum to $1$, and the probability of hitting a given interval is the same as its length. The length of a randomly chosen interval is $L$. We can write the weighted average as: $$ \sum_i l_i P(L = l_i) = \sum_i l_i l_i = \sum_i l_i^2 $$ Now $E(L) = \sum_i \frac{1}{n} l_i = \frac{1}{n}$. Remembering that $Var(L) = E(L^2) - E(L)^2$, we can work out that the weighted average (or twice the average waiting time) is $\frac{1}{n} + Var(L)$. So the waiting time goes up with the variance of the interval size, and in the uniform case the variance is 0 and we get the case we know - that the waiting time is half the time between buses.

In the Poisson case, the arrival time of a bus is given by the exponential distribution with parameter $\lambda$ given by the reciprocal of the bus frequency. This has mean $\lambda$ and variance $\lambda$. Therefore the average interval between buses is $2\lambda$ and the average waiting time is $\lambda$. In the case of a bus every 15 minutes, the waiting time is 15 minutes, twice that in the uniform case. I have heard this discrepancy, and the difference between the average length of an interval, when all the intervals are equally likely, and the average when the chance of choosing an interval is proportional to its length, referred to as the bus stop paradox.

2 buses

Now suppose there are two buses, and to keep things simple they have the same frequency, one every 15 minutes. Each model can be extended in a natural way.

The Poisson model is easy to extend. The only important detail is the rate at which buses arrive, and this is simply the sum of the two rates. In other words, since the arrival of buses doesn't depend on when the last one was, there is no difference between two bus routes, each with a bus every 15 minutes, and one route with a bus every 7.5 minutes (or any other combination of frequencies which gives the same long-term rate). So the waiting time is now 3.75 minutes.

The uniform model is now the more flexible and trickier one. The are two periodic processes of a bus every 15 minutes. As a couple of comments have pointed out, everything depends on the spacing of the two buses. If they arrive at the same time, the waiting time is the same as for one bus. If they are spaced as evenly as possible, with one always arriving exactly 7.5 minutes after the other, then the waiting time is halved. Anything in between gives something in between. We can work out what that is by using the $E(L) + Var(L)$ rule. If the second bus arrives $k$ minutes after the first, with $0 \leq k \leq 15$, then the two intervals are of length $k$ and $15-k$. The expectation is $\frac{15}{2}$ and the variance is $|k - \frac{15}{2}|$. This gives $\max(k, 15 - k)$, or the neat answer that the average waiting time is half the length of the longer of the two intervals between buses.

I think we should assume neither a benevolent bus company, nor a malicious one, but an indifferent one, which staggers the two buses by a random variable distributed uniformly on $[0, 15]$. We can take the expectation of the waiting time $\max(k, 15 - k)$ over this distribution to get an expected waiting time of $\frac{45}{8} = 5.625$. Note that we could do a similar, but more complicated calculation involving the discrete distribution of intervals, to work out the case of two buses which have different frequencies. Since we are going to do it for three buses, we will leave this as an exercise.

3 buses

Again, the generalization of the Poisson model says that we need only consider the total rate at which buses arrive. This is @heropup's answer. While the Poisson model is compelling for a single bus route, I don't think it answers the question well, because it doesn't give a different answer for all three buses arriving equally frequently as for different frequencies, provided that the rate is the same. This disregards valuable information, information that seems like it should increase our estimate. Since the nature of the bus passengers is that they are pessimistic, they gaze long and hard at the timetable to extract as much information as they can, and they have a long time to perform calculations, we should reject this.

Let us look instead at the 3-bus 'periodic' model. Two bus routes have buses every 15 minutes with first bus times distributed uniformly on $[0,15]$. The third has buses every 10 minutes, starting at a uniform random variable on $[0,10]$. Assume wlog that one of the 15 minutes buses, call it A, arrives at $t=0$. We can just look at the intervals over the first half hour since everything is repeated after that.

The 10 minute bus, $C$, must arrive before the second appearance of $A$. We call its first arrival time $m$, uniform on $[0,10]$. If it is less than 5, then C will arrive twice in the first 15 minutes, and once in the second 15 minutes. If it is more than 5, then the opposite will hold. Let's assume that it is less than 5, since we can swap the first 15 minutes with the second 15 minutes otherwise and the set of intervals will not be affected. We can also assume that $B$'s first arrival $k$ is in the first $7.5$ minutes, since the other case is symmetric with this one by reflecting each 15 minutes. - Suppose that $m < k$. The intervals are $m$, $k - m$, $10 + m - k$, $5 - m$, and either $m + 5$, $k - m - 5$ and $15 - k$ or $k$, $m + 5 - k$ and $10 - m$, depending on whether $k < m+5$ or not. - Suppose that $k < m$. The intervals are $k$, $m-k$, $10$, $5 - m$, followed by $k$, $5 + m - k$ and $10 - m$.

In all cases there are 7 intervals of total length 30 minutes, and so the average is $\frac{30}{7}$. To work out the variance we need to integrate the squares of all of these over the rectangle $k \in [0, 7.5]$, $m \in [0, 5]$, which breaks into 3 sections according to whether $k < m$ and/or $k < m + 5$. This is pretty complicated, and I don't see any more simplifying symmetries, but it can be done and it should give us the average length of a waiting interval, or twice the average wait.

Somewhat tedious calculations

Based on the three different possibilities for $k$ and $m$, I divided the domain of integration $\{ (m, k) : 0 \leq m \leq 5, 0 \leq k \leq \frac{15}{2} \}$ into three regions, $\alpha$, $\beta$, $\gamma$. Here $\alpha$ is where $k < m$, $\beta$ is where $m < k < m+5$, and $\gamma$ is where $m+5 < k$. I worked out that I needed to integrate $(3)$ and $(4)$ on $\alpha$, $(1)$ and $(3)$ on $\beta$ and $(1)$ and $(2)$ on $\gamma$, where

  1. is the sum of squares of $m$, $k-m$, $10 + m - k$, $5-m$, which comes to $4m^2 -4mk + 2k^2 + 10 m - 20k + 125$
  2. $m+5$, $k-m-5$, $15-k$: $2m^2 -2mk + 2k^2 + 20m - 40k + 275$
  3. $k$, $m+5-k$, $10-m$: $2m^2 - 2mk + 2k^2 - 10m - 10k + 125$
  4. $k$, $m-k$, $10$, $5-m$: $2m^2 -2mk + 2k^2 -10m + 125$

I further simplified to find that I was looking for the integral of $(1) + (3) = 6m^2 - 6mk + 4k^2 + 250 - 30k$ on the whole rectangle, on which I found the moments to be:

  • $\int_{\alpha \cup \beta \cup \gamma} 1 = \frac{75}{2} $
  • $\int_{\alpha \cup \beta \cup \gamma} m = \frac{375}{4}$
  • $\int_{\alpha \cup \beta \cup \gamma} k = \frac{1125}{8}$
  • $\int_{\alpha \cup \beta \cup \gamma} mk = \frac{5625}{16}$
  • $\int_{\alpha \cup \beta \cup \gamma} m^2 = \frac{625}{2}$
  • $\int_{\alpha \cup \beta \cup \gamma} k^2 = \frac{5625}{8}$

    plus the integral of $(2) - (3) = 30m- 30k + 150$ on $\gamma$, with

  • $\int_{\gamma} 1 = \frac{25}{8} $

  • $\int_{\gamma} m = \frac{125}{48}$
  • $\int_{\gamma} k = \frac{125}{6}$

plus the integral of $(4) - (1) = -2m^2 + 2mk - 20m + 20k$ on $\alpha$, with

  • $\int_{\alpha} k = \frac{125}{6}$
  • $\int_{\alpha} m = \frac{125}{3}$
  • $\int_{\alpha} mk = \frac{625}{8}$
  • $\int_{\alpha} m^2 = \frac{625}{4}$.

The three sums in the same order evaluated as $$ 6\frac{625}{2} - 6\frac{5625}{16} + 4\frac{5625}{8} + 250\frac{75}{2}-30\frac{1125}{8} = \frac{61875}{8} $$ $$ 30 \frac{125}{48} - 30\frac{125}{6} + 150\frac{25}{8} = -\frac{625}{8} $$ $$ -2\frac{625}{4} + 2\frac{625}{8} -20\frac{125}{3}+ 20\frac{125}{6} = -\frac{6875}{12}$$

Their sum is $\frac{21250}{3} = 7083.33\ldots$. Dividing first by the domain of integration $5 \times 7.5$, then by $30$, the sum of the lengths, since we evaluated the sum of squared lengths rather than lengths times their probabilities. $$ \frac{21250}{3} \times \frac{1}{30} \times \frac{1}{5} \times \frac{2}{15} = \frac{170}{27} $$ So the length of the average interval is $170/27 = 6.2963\ldots$ minutes, and the average wait is half this, $3.1481481...\ldots$ minutes or 3 minutes and 8.888 seconds.

NB: I previously posted the result of 5 minutes for the average interval. This seems to have arisen by complete coincidence from a combination of small calculation errors. The current figure is equal to theat found by a much shorter and more sensible method by @ChristianBlatter

Open questions

  1. Is there some clever argument which gives you the exact result under this model without having to go through all the pen and paper work? Answer: yes, see @ChristianBlatter's answer,
  2. As @Zackkenyon asked in a comment on another answer, what is the configuration which provides the shortest average waiting time? Clearly this can be found using the same polynomials I give above, but minimising over the $m,k$ space instead of integrating.
  3. I had originally hoped to find some nice formula which works for any three bus frequencies. Now it is clear to me that this method would take a long time even for three frequencies which are all rational multiples of one another, although it does seem that it is a coherent approach which always works in this case. My question is about 3 frequencies which are all irrational multiples of one another - what is the distribution of intervals in this case, (note that it is bounded, unlike the Poisson case) and what is the waiting time? Answer: again, @ChristianBlatter's answer, I believe, gives you this without too much work, which underlines how much sillier the above approach is. Based on his method the results should be continuous rather than sensitive to the denominator size or continued fraction expansions of the ratios between the frequencies.
$\endgroup$
5
  • $\begingroup$ In the most recent version of my answer, I attempted to simulate the uniform model with a random staggered start time. I had a result of about $3.15$ minutes as the average wait time (or $6.30$ as the average interval). $\endgroup$
    – PhiNotPi
    Jan 29, 2014 at 0:50
  • $\begingroup$ @PhiNotPi I have updated too, to give an exact result of 5 minutes. This is probably deeply wrong, but I don't have the energy tonight either to recheck my work or to check your answer. $\endgroup$
    – jwg
    Jan 29, 2014 at 1:08
  • $\begingroup$ I disagree that the 3-bus Poisson model discards valuable information. Rather, it says: some information that you thought would be valuable actually might not be. Of course, if you had empirical evidence that different tram schedules with the same total rate led to substantially different waiting times, that would be a reason to reject the Poisson model (possibly in favor of the uniform model, possibly in favor of something even more complicated). But I'm not seeing any such evidence... $\endgroup$
    – Micah
    Jan 29, 2014 at 20:25
  • $\begingroup$ @Micah both the Poisson model and the periodic model are idealizations. It is clear that neither is strictly true. However I think the periodic question is more interesting, and also possibly closer to the truth. $\endgroup$
    – jwg
    Jan 30, 2014 at 9:37
  • $\begingroup$ There is a typo in the Poisson 2-bus model: average waiting time should be 7.5 rather than 3.75 min there, for the same reason that it's 15 rather than 7.5 min in the 1-bus model. $\endgroup$
    – Michael
    Feb 4, 2014 at 1:38
1
$\begingroup$

I guess my idea is similar to Christian Blatter above. I did a R simulation with the assumptions that buses arrive promptly every 10 and 15 minutes, respectively. However, the interval time among buses is fixed with uniformly distributed starting times. I simulate buses between [0,10000] minutes and the guy arriving at the bus stop at time t in [50,9950] and check the minimum time to next bus (which arrives first out of 3).

Most of the time I get a minimum average waiting time in the of range of [3.11,3.16] minutes which covers Blatters value of 85/27 ~ 3.15.

upperbound <- 10000
waitVector <- vector()
nbRuns <- 10000
for(counter in 1:nbRuns) {
    seq1 <- 10*runif(1) + seq(from=0,to=upperbound,by=10)
    seq2a <- 15*runif(1) + seq(from=0,to=upperbound,by=15) # uniformly distributed, but fixed distance among buses
    seq2b <- 15*runif(1) + seq(from=0,to=upperbound,by=15) # uniformly distributed, but fixed distance among buses
    seq3 <- sort(c(seq1,seq2a,seq2b))
    arrivalTime <- runif(n=1,min=50,max=(upperbound-50))
    minSeq <- seq3 - arrivalTime
    minSeq <- minSeq[minSeq > 0] # cant catch bus who left before I arrived
    minTime <- min(minSeq)
    waitVector <- c(waitVector,minTime)     
}
minAvgWaitTime <- mean(waitVector)
print(range(waitVector))
print(paste("Minimum avg wait time base on ",nbRuns," simulations is: ",minAvgWaitTime,sep=""))
$\endgroup$
0
$\begingroup$

Call them tram 1 tram 2 and tram 3. There is a 10/40 chance you will catch tram 1 and on average you will have to wait 5 min. There is a 15/40 chance you will catch tram 2 and on average will wait 7.5 min. ditto tram 3. I make that 6.875 min.

$\endgroup$
6
  • 1
    $\begingroup$ Pardon, how did you obtain 6.875? $\endgroup$ Jan 28, 2014 at 19:04
  • $\begingroup$ (10/40)* 5 + (15/40)*7.5 + (15/40)*7.5 $\endgroup$
    – user121049
    Jan 28, 2014 at 19:07
  • $\begingroup$ Based on the OP's comment, it appears the trams do not arrive sequentially but randomly with the given rates each. $\endgroup$ Jan 28, 2014 at 19:09
  • 2
    $\begingroup$ This is incorrect: you cannot make an assumption how much you'd wait for a particular train. Consider, for example, only 2 trains with 1 hour intervals, the 1st one arriving on the hour (12:00, 1:00, etc), and the other arriving 10 min after the hour (12:10, 1:10, etc). Although the trains have the same intervals between arrivals you are 5 times more likely to catch the 1st one than the 2nd one. $\endgroup$
    – Michael
    Jan 28, 2014 at 19:10
  • 1
    $\begingroup$ This is wrong. Suppose that you arrive, and make a random choice as to which bus you take, with probabilities given by their frequencies as in the answer. Then you wait for that particular bus number, ignoring all others. Then you will wait the time given. However the OP is going to get on the first bus that comes. He can't wait any longer than you, but he might certainly wait less time. $\endgroup$
    – jwg
    Jan 28, 2014 at 20:41
-2
$\begingroup$

Suppose that none of the trains come simultaneously. Wait significant amount of time, say $N >> 1$ hours. Then the interval of $N$ hours will be punctured by $6N$ arrivals of the 10-min train, $4N$ arrivals of the 1st 15-min train, and $4N$ arrivals of the 2nd 15-min train. This breaks the $N$-hour interval into $14N$ waits between arrivals. Therefore the average wait is $60/14$ minutes.

EDIT: as pointed out in the comment, $60/14$ is the average interval length between the trains; however, the average wait should be $1/2$ of the interval length. Therefore the correct answer for the wait is $60/28$.

EDIT 2: as pointed out by the commenter, the answer is, generally speaking, incorrect. On the, eh, 3rd thought I realized the cause of my error: the average wait is not proportional to the average size of the interval; it's proportional to the 2nd moment of the interval.

Let me elaborate on the above a bit: suppose that the interval lengths are $X_i,1\le i \le n$. Let $\Sigma_{i=1}^n X_i=1$ for simplicity. The probability of landing in the interval $X_i$ is $X_i$. The average wait on the assumption that you landed in $X_i$, is $X_i/2$. Therefore the average wait among all intervals is $\Sigma_{i=1}^n X_i\cdot X_i/2=1/2\cdot M_2$, where $M_2$ is the 2nd moment of the distribution $X_i$. The prior computations applied to the 1st moment $M_1$, also known as average.

So the correct answer should make further assumption on the distribution of the intervals.

$\endgroup$
5
  • $\begingroup$ @RossMillikan: you are right of course, correcting. $\endgroup$
    – Michael
    Jan 28, 2014 at 19:12
  • 3
    $\begingroup$ What is the reasoning of "This breaks the N-hour interval into 14N waits between arrivals. Therefore the average wait is 60/14 minutes." Forgetting about the actual tram intervals, if one interval is 59.986 minutes and the others are 0.001 minutes, the average wait is close to 30 minutes, because it is very improbable that arrive at the stop during a 0.001 minute interval. I don't directly see how the fact that the intervals of a single tram are known results in the average wait being 60/28 minutes. $\endgroup$
    – JiK
    Jan 28, 2014 at 19:28
  • $\begingroup$ I agree with @JiK in that larger intervals should receive more weight in the calculation, since the probability of arriving within a specific interval is proportional to the size of the interval. Rather than the typical arithmetic mean, I think that the contraharmonic mean should be used. $\endgroup$
    – PhiNotPi
    Jan 28, 2014 at 19:38
  • $\begingroup$ This argument is not true. The answer depends on the start time of the trams. For example, if all the trams had a length of 15 mins, then the 'interval' would be 15 minutes if they start at the same time, or it could be as low as 5 minutes if they had a different start time. $\endgroup$
    – Calvin Lin
    Jan 28, 2014 at 19:42
  • $\begingroup$ @JiK: I made a silly mistake here. Editing the post again. $\endgroup$
    – Michael
    Jan 28, 2014 at 21:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .