# Quod Erat Demonstrandum

## 2010/05/27

### just answer a textbook question from my student

Filed under: Additional / Applied Mathematics,HKALE — johnmayhk @ 12:45 下午
Tags: ,

To Lau (my student)

This is the question you’d asked

“A man lives at A and works at C, and is due at work at 8:30 a.m. He always catches the first train from A to B, which is scheduled to arrive at B at 8:15 a.m. Buses leaves B for C every 20 minutes, and the bus which leaves B at 8:20 a.m. is scheduled to arrive outside the factory at C at 8:27 a.m. The train is, on the average, one minute late and has a standard deviation of 4 minutes. The bus always leaves on time, but is, on the average, 1.5 minutes late with a standard deviation of 2 minutes. The man’s employer leaves home in his car at 8:15 a.m. and the time for his journey has mean value 13 minutes with a standard deviation of 3 minutes. Find the probability that the employer arrives before the employee."

OK, the distribution of the arrival times of the employee and the employer were not mentioned. Well, we may assume that they follow normal distribution (simply because the question is under the chapter -_-).

The employee takes the train to go to station B and takes a bus to go to the factory C.

Let T (in minutes) be the arrival time for the train to B.

The arrival time is scheduled at 8:15 a.m. but on the average, one minute late with s.d. of 4 minutes, we may write

T ~ N(8:16 a.m. , 4^2)

Then he takes the bus at B to C.

Let S (in minutes) be the arrival time for the bus to C.

The arrival time is scheduled at 8:27 a.m. but on the average, 1.5 minutes late with s.d. of 2 minutes, we may write

S ~ N(8:28.5 a.m. , 2^2)

Pay attention here. The S above is about the bus scheduled at 8:20 a.m., if the employee misses the bus, he may catch up the upcoming bus at 8:40 a.m. (scheduled every 20 minutes), then for the “8:40 a.m." bus, the distribution of S is no longer N(8:28.5 a.m. , 2^2), it may$^{[1]}$ be N(8:48.5 a.m. , 2^2); for “9:00 a.m." bus, it may be N(9:08.5 a.m. , 2^2) and so on.

Now consider the employer.

Let U (in minutes) be the arrival time of the employer.

With 13 minutes travelling time on the average and s.d. of 3 minutes,

U ~ N(8:28 a.m. , 3^2)

OK, for the employer arrives before the employee, it means S > U (so to speak).

But, as mentioned before, the distribution of S depends on the fact that which bus the employee takes. So, we need to divide cases.

Case 1: He can take “8:20 a.m." bus.
Case 2: He cannot take “8:20 a.m." bus.

P(Case 1)
= P(Arrival of the train is on or before 8:20)
= P(T < 8:20) [so to speak]
= $P(z < \frac{20 - 16}{4})$
= P(z < 1)
= 0.8413

P(Case 2)
= 1 – 0.8413
= 0.1587

You may wonder why we need only two cases, is it possible that the employee takes the "8:40 a.m." bus but still arrives at the factoy earlier than the employer? Well, it is nearly impossible. For example, the employee takes the "8:40 a.m." bus, the arrival time of the bus follows N(8:48.5 a.m. , 2^2), then

P(employee before employer)
= P(S < U)
= P(S – U < 0)
= $P(z < \frac{0 - (48.5 - 28)}{\sqrt{2^2 + 3^2}})$
= P(z < -5.685677011)

and this is almost zero, not to mention the cases for taking buses scheduled at 9:00 a.m., 9:20 a.m. and so on, surely that it is impossible that “employee arrives before employer". Thus, it suffices to consider the two cases.

Now,

under case 1,

P(employer before employee)
= P(S > U)
= P(S – U > 0)
= $P(z > \frac{0 - (28.5 - 28)}{\sqrt{2^2 + 3^2}})$
= P(z > -0.138675049)
= 0.5550999999999999

under case 2,

P(employer before employee)
= 1 (aprroximately)

[since P(employee before employer) is 0 as mentioned before]

Hence

P(employer before employee)
= P(case 1)P(employer before employee | case 1) + P(case 2)P(employer before employee | case 2)
= 0.8413*0.5550999999999999 + 0.1587*1
= 0.6257 (4 sig. fig.)

Hope you will understand.

… … … … … … … … … … …

$^{[1]}$ I used “may" instead of “should" because it is not sure that for the bus scheduled at 8:40 a.m., whether the scheduled arrival time at C is calculated simply by adding 20 minutes to that of the ‘previous’ bus, yielding 8:47 a.m..