Example 20: Doctor arrives late: did he come by train?
A doctor is to visit a patient. From the past experience, it is known that the probabilities that he will come by train, bus, scooter or by other means of transport are respectively , , and . The probabilities that he will be late are , , and , if he comes by train, bus and scooter respectively, but if he comes by other means of transport, then he will not be late. When he arrives, he is late. What is the probability that he comes by train?
Let , , , : the doctor comes by train, bus, scooter, other means of transport, respectively, and : the doctor arrives late.
, , and form a partition of the sample space (he comes by exactly one of these).
, , ,
, , , and (he is not late by other means).
By the theorem of total probability,
By Bayes' theorem,
The probability that the doctor came by train, given that he is late, is .
Want the reason behind every step, the basics and the checks?
Being late is evidence about how he travelled. Each way of travelling contributes "(chance of that way) × (chance of being late that way)" to the total chance of being late. The train's share of that total is the answer. The train is the most likely way to be late (), and it turns out to be exactly half of all late arrivals.
- Given
- P(train, bus, scooter, other) . P(late) given train, bus, scooter ; never late by other means. He is late.
- To find
- The probability that he came by train, given that he is late: .
- Plan
- (1) Name the events; check the partition. (2) List and . (3) Total probability for . (4) Bayes' theorem.
Basics you need
"The probability that he will be late is if he comes by train" is . Lesson: conditional probability
The lowest common denominator of 40, 15 and 120 is 120. Basics: working with fractions
over a partition. Lesson: total probability and Bayes' theorem
Solution
Name the events
Let : the doctor arrives late, and let , , , : he comes by train, bus, scooter and other means of transport, respectively.
, , , form a partition of the sample space: on any visit he uses exactly one of them, and each has nonzero probability.
The four ways of travelling are the causes; being late is the observed effect. The four probabilities add to 1, which confirms that nothing is missing.A partition: pairwise disjoint, exhaustive, nonzero probabilities. Lesson: Bayes' theoremThe probabilities
The first four are given directly. "The probabilities that he will be late are , , and , if he comes by train, bus and scooter" are conditional on the way of travel, so they are , , . "By other means ... he will not be late" means . (The book describes in words as "Probability that the doctor arriving late comes by train", which is a description of ; the value it uses is the chance of being late when he comes by train, .)The chance of being late: total probability
By the theorem of total probability,
The tree for Example 20. The late paths have products (train, rose), (bus), (scooter) and 0 (other means). In 120ths they are 9, 8, 1 and 0. He is late by exactly one way of travelling, so the four path probabilities add. With the common denominator 120: , . The term is written to show that the whole partition is used.Multiply along a path, add the paths. Basics: tree diagramsBy train, given late: Bayes' theorem
By Bayes' theorem,
The top is the train path, ; the bottom is all late arrivals, . The 120 cancels. The book writes this as .Dividing by a fraction is multiplying by its flip. Basics: working with fractionsWhat the answer means
Before he arrived, the train had probability . Knowing he is late raises it to . The other ways get , and ; and .
"Other means" was the most likely way to travel (), but it can never make him late, so once he is late it is ruled out completely. The train ends up the most likely way (9 of the 18 late arrivals) because it is both fairly likely and fairly often late. The bus is late most often (), so its share grows the most, from to , more than double.For a partition, the add to 1. Lesson: Bayes' theorem
The probability that the doctor came by train, given that he is late, is .
(Textbook answer: .)
Picture 120 visits. He comes by train 36 times, by bus 24 times, by scooter 12 times and by other means 48 times. He is late on of the train visits (9), of the bus visits (8), of the scooter visits (1) and never otherwise. So he is late times, and 9 of those were by train: .
- Answering . That is , the chance of being late when he takes the train. The question is the reverse, .
- Answering . That ignores the information that he is late; Bayes' theorem updates the .
- Leaving out "other means". It is part of the partition: without it the prior probabilities add to only . Its term in is , so it does not change the total, but it belongs in the sum.
- A cause that can never produce the effect gets posterior probability 0, however likely it was before.
- Write all the path products over one common denominator (here 120); the Bayes ratio is then a ratio of whole numbers, 9 out of 18.
- Four causes in a table: Example 22 and Miscellaneous Exercise, Question 6.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Partition of the sample space | Step 1 | Section 13.5.1 (Lesson: Bayes' theorem) |
| Conditional probability | Step 2 | Section 13.2 (Lesson: conditional probability) |
| Theorem of total probability | Step 3 | Section 13.5.2 (Lesson: total probability) |
| Bayes' theorem | Steps 4, 5 | Section 13.5 (Examples 15 to 21) |
| Common denominators, dividing fractions | Steps 3, 4 | Arithmetic (Basics: working with fractions) |
Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →