Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calculating probability

  1. Dec 6, 2005 #1

    how do I calculate the following probability:

    A train leave station A three times every hourm but the times inbetween differ. When arriving at that station at any given time how long would I have to wait on average?

    Would it be more than, less then or precisely 10 minutes?
    Thinking about it I would say precisely 10 minutes when we're talking about on everage as the train could arrive earlier or later, but that's probably to easy thinking.

    Thanks for your help, guys.

  2. jcsd
  3. Dec 6, 2005 #2

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    There is not enough information given regarding the train departure probability distribution to properly compute the expected wait time. Different assumptions regarding train departures lead to different answers. This looks like homework, so I won't tell you why I think a good answer is 15 minutes. Some points to consider:
    • The passenger is going to take the first train that comes along. Look at the complementary problem -- answer the question, "what is the probability no train will have left before t minutes have passed?"
    • Make a reasonable stab at train departure probability distribution. Don't discount the possibility of all three trains leaving simulataneously one hour after the passenger arrives at the station.
    Last edited: Dec 6, 2005
  4. Dec 6, 2005 #3
    True but you don't need to compute the expected wait time to answer the question.

    The question states, "A train leave station A three times every hour".

    This means that exactly one hour after each train departure there is another, because if the first mentioned train departs at time [tex]t[/tex] and if the first train departing at or after [tex]t+1[/tex] (units in hours) departed at time [tex]t+1+\delta[/tex], with [tex]\delta>0[/tex], then any interval [tex][t+\epsilon,t+1+\epsilon)[/tex] with [tex]0<\epsilon<\delta[/tex] would contain at least one train departure less than the interval [tex][t,t+1)[/tex], violating the requirement that any interval [tex][x,x+1)[/tex] contains exactly three train departures. So [tex]\delta=0[/tex].

    The trains therefore run to a regular hourly schedule and it is sufficient to consider an interval of an hour immediately following the departure of a train.

    Let the intervals between the start of the hour and the departures in the hour be [tex]a, b\ and\ c[/tex].
    and the expected wait time is:
    and the expected wait time is

    But the question also states, "... but the times inbetween differ.", so not all of [tex]\alpha, \beta\ and\ \gamma[/tex] are zero.

    [tex]expected\ wait\ time>\frac{1}{2}.\frac{1}{3}=\frac{1}{6}[/tex]
    i.e. more than ten minutes.
    Last edited: Dec 6, 2005
  5. Dec 6, 2005 #4

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    I agree so far: exactly three trains will depart during any simple open-closed (or closed-open) interval of width one hour, including the one hour that starts when the passenger in question arrives at the station.

    I disagree with this statement:

    There is no reason that [itex]a+b+c = 1[/itex]. Consider the near-extremes where the passenger arrives at 12:00 and (a) the next three trains are scheduled to depart at 12:01, 12:02, and 12:03 versus (b) the next three trains are scheduled to depart at 12:58, 12:59, and 13:00. The correct interpretation is that [itex] a+b+c \in (0,3) [/itex].
  6. Dec 6, 2005 #5
    But I did say the hour I was considering started just after the departure of a train not just after the arrival of the passenger.

    In your first example, if we consider the interval (12:01,13:01] the times would be [tex]\frac{1}{60},\frac{1}{60},\frac{58}{60}[/tex] and

    In your second example, if we consider the interval (12:58,13:58] the times would be the same.

    In either of the cases, since all hour intervals displaced from the interval considered by an integral number of hours will both be identical and cover the time line it should be sufficient to consider just the expectation in one interval.
    Last edited: Dec 6, 2005
  7. Dec 6, 2005 #6

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    These are quite a different beasts. Denoting the intervals [itex]a, b, c[/itex] as the time between passenger arrival and departure of trains [itex]A, B, C[/itex] helps answer the question. Looking at the times between successive departures does not, because the only departure we are concerned with is the first, and that is the one item that the new definitions of [itex]a, b, c[/itex] do not measure.
    t_0 & = \;\text{time of passenger arrival} \\
    t_i &= \;\text{time of departure of $i^{th}$ train, $i\in(1,2,3)$}
    with the trains departing such that [itex]t_1 < t_2 < t_3< 1[/itex]. The OP asked for [itex]\operatorname{E} (t_1 - t_0)[/itex]
    Your new definitions are equivalent to [itex]\Delta t_i = t_{i+1} - t_i[/itex] where [itex]t_{i+3} = t_i + 1[/itex] by definition of the probem. With this definition, I agree that [itex]\Delta t_1 + \Delta t_2 + \Delta t_3 = 1[/itex]. However,
    • The only item of concern here is [itex]t_1[/itex]. The passenger will take the first train to depart. That exactly two more depart within one hour after the passenger's arrival is irrelevant to the problem at hand.
    • The new definitions of a, b, and c span more than one hour after the passenger arrives. This interval covers four departures: trains A, B, C, and (A+1). That four trains depart in the closed interval [itex]\begin{bmatrix}t_1, t_1+1\end{bmatrix}[/itex] is irrelevant to the problem at hand.
    Back to your first post,
    Many things are wrong here. This is not the expected wait time for the passenger. It is the root mean square inter-train departure time. It has nothing to do with the wait time, which cannot be expressed in terms of your variables a, b, and c.
    Last edited: Dec 6, 2005
  8. Dec 6, 2005 #7
    I agree they are quite different beasts.

    I haven't redefined a,b and c. My original post explicitly stated that these were the times within a fixed hour starting immediately after the departure of a train.

    It is the train schedule that is fixed and the arrival time of the passenger that is random, not vice versa. I could have used a "calender" hour instead of one starting immediately after a train departure, which would give the same result at the expense of more algebra. In fact any fixed starting point for the hour would do, but not one that depends on the arrival time of the passenger.

    The crux of the argument is that the average wait time is the same in consecutive hours, because the departure times within those hours is the same. Therefore the average wait time is the same as the average wait time given that the passenger arrives in some fixed period of an hour.

    Using the hour I originally suggested (which gives three intervals instead of the more general four) this is

    [tex]p_1.w_1+p2.w2+p3.w3\ \ldots(1)[/tex]

    where [tex]p_i[/tex] is the probability the passenger arrives in the [tex]i^{th}[/tex] interval, and [tex]w_i[/tex] is the average wait time given that he arrives in the [tex]i^{th}[/tex] interval.

    So [tex]p_1=a,p_2=b,p_3=c[/tex] (since the units are hours) and the average wait time for each interval is half the interval, i.e.

    Inserting these values into (1) gives the formula I used.
    Last edited: Dec 6, 2005
  9. Dec 6, 2005 #8

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    When someone completely misinterprets my technical writing the error is often mine, not the reader's. In this case,
    clearly did NOT mean the inter-train departure intervals to me. I took that statement as meaning [itex]t_i - t_0[/itex], where [itex]t_0[/itex] is the passenger's arrival time and [itex][t_i[/itex] is the [itex]i^{th}[/itex] train's departure.

    Now that I know what you are talking about, I agree. The expected wait time is at least 10 minutes, and is 10 minutes only if the trains leave exactly 20 minutes apart.

    Have you every used Amtrak? Taken the Washington DC subway? My arrival time is a whole lot less random than the trains departure times. Train schedules are fiction.
    Last edited: Dec 6, 2005
  10. Dec 6, 2005 #9
    Yes - I did think of adding an explicit calculation based on a purely random arrival rate with a probability density of three per hour to account for that sort of thing, but then I would have had to redo it for two per hour to accomodate Virgin trains in England.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook