Class 12 Maths, Worked in Full Past papersGet updates
Chapter 13 · Probability

Example 20: Doctor arrives late: did he come by train? P=12P = \frac12

ExamplesBayes' theorem · Section 13.5
The question

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 310\frac{3}{10}⁠, 15\frac15⁠, 110\frac{1}{10} and 25\frac25⁠. The probabilities that he will be late are 14\frac14⁠, 13\frac13⁠, and 112\frac{1}{12}⁠, 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?

Exam answer

Let T1T_1⁠, T2T_2⁠, T3T_3⁠, T4T_4⁠: the doctor comes by train, bus, scooter, other means of transport, respectively, and EE⁠: the doctor arrives late.

T1T_1⁠, T2T_2⁠, T3T_3 and T4T_4 form a partition of the sample space (he comes by exactly one of these).

P(T1)=310P(T_1) = \frac{3}{10}⁠, P(T2)=15P(T_2) = \frac15⁠, P(T3)=110P(T_3) = \frac{1}{10}⁠, P(T4)=25P(T_4) = \frac25

P(E∣T1)=14P(E|T_1) = \frac14⁠, P(E∣T2)=13P(E|T_2) = \frac13⁠, P(E∣T3)=112P(E|T_3) = \frac{1}{12}⁠, and P(E∣T4)=0P(E|T_4) = 0 (he is not late by other means).

By the theorem of total probability,

P(E)=P(T1)P(E∣T1)+P(T2)P(E∣T2)+P(T3)P(E∣T3)+P(T4)P(E∣T4)=310⋅14+15⋅13+110⋅112+25⋅0=340+115+1120=9+8+1120=18120\begin{aligned} P(E) &= P(T_1)P(E|T_1) \\ &\quad + P(T_2)P(E|T_2) \\ &\quad + P(T_3)P(E|T_3) \\ &\quad + P(T_4)P(E|T_4) \\ &= \frac{3}{10}\cdot\frac14 + \frac15\cdot\frac13 \\ &\quad + \frac{1}{10}\cdot\frac{1}{12} + \frac25\cdot 0 \\ &= \frac{3}{40} + \frac{1}{15} + \frac{1}{120} \\ &= \frac{9 + 8 + 1}{120} = \frac{18}{120} \end{aligned}

By Bayes' theorem,

P(T1∣E)=P(T1)P(E∣T1)P(E)=9120÷18120=918\begin{aligned} P(T_1|E) &= \frac{P(T_1)P(E|T_1)}{P(E)} \\ &= \frac{9}{120} \div \frac{18}{120} \\ &= \frac{9}{18} \end{aligned}

∴\therefore The probability that the doctor came by train, given that he is late, is 12\dfrac12⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

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 (310⋅14=9120\frac{3}{10} \cdot \frac14 = \frac{9}{120}⁠), and it turns out to be exactly half of all late arrivals.

Given, to find, and the plan
Given
P(train, bus, scooter, other) =310,15,110,25= \frac{3}{10}, \frac15, \frac{1}{10}, \frac25⁠. P(late) given train, bus, scooter =14,13,112= \frac14, \frac13, \frac{1}{12}⁠; never late by other means. He is late.
To find
The probability that he came by train, given that he is late: P(T1∣E)P(T_1|E)⁠.
Plan
(1) Name the events; check the partition. (2) List P(Ti)P(T_i) and P(E∣Ti)P(E|T_i)⁠. (3) Total probability for P(E)P(E)⁠. (4) Bayes' theorem.

Basics you need

1Reading "if he comes by ..." as a condition

"The probability that he will be late is 14\frac14 if he comes by train" is P(late∣train)P(\text{late} \mid \text{train})⁠. Lesson: conditional probability

2Adding fractions

The lowest common denominator of 40, 15 and 120 is 120. Basics: working with fractions

3Theorem of total probability (Section 13.5.2)

P(E)=∑P(Ti)P(E∣Ti)P(E) = \sum P(T_i)P(E|T_i) over a partition. Lesson: total probability and Bayes' theorem

4Bayes' theorem (Section 13.5)

P(T1∣E)=P(T1)P(E∣T1)P(E)P(T_1|E) = \frac{P(T_1)P(E|T_1)}{P(E)}⁠. Lesson: Bayes' theorem

Solution

  1. Name the events

    Let EE⁠: the doctor arrives late, and let T1T_1⁠, T2T_2⁠, T3T_3⁠, T4T_4⁠: he comes by train, bus, scooter and other means of transport, respectively.

    T1T_1⁠, T2T_2⁠, T3T_3⁠, T4T_4 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 310+15+110+25=3+2+1+410=1\frac{3}{10} + \frac15 + \frac{1}{10} + \frac25 = \frac{3 + 2 + 1 + 4}{10} = 1 add to 1, which confirms that nothing is missing.
    A partition: pairwise disjoint, exhaustive, nonzero probabilities. Lesson: Bayes' theorem
  2. The probabilities

    P(T1)=310,P(T2)=15,P(T3)=110,P(T4)=25,P(E∣T1)=14,P(E∣T2)=13,P(E∣T3)=112,P(E∣T4)=0.\begin{aligned} P(T_1) &= \frac{3}{10}, \quad P(T_2) = \frac15, \\ P(T_3) &= \frac{1}{10}, \quad P(T_4) = \frac25, \\ P(E|T_1) &= \frac14, \quad P(E|T_2) = \frac13, \\ P(E|T_3) &= \frac{1}{12}, \quad P(E|T_4) = 0. \end{aligned}
    The first four are given directly. "The probabilities that he will be late are 14\frac14⁠, 13\frac13⁠, and 112\frac{1}{12}⁠, if he comes by train, bus and scooter" are conditional on the way of travel, so they are P(E∣T1)P(E|T_1)⁠, P(E∣T2)P(E|T_2)⁠, P(E∣T3)P(E|T_3)⁠. "By other means ... he will not be late" means P(E∣T4)=0P(E|T_4) = 0⁠. (The book describes P(E∣T1)P(E|T_1) in words as "Probability that the doctor arriving late comes by train", which is a description of P(T1∣E)P(T_1|E)⁠; the value 14\frac14 it uses is the chance of being late when he comes by train, P(E∣T1)P(E|T_1)⁠.)
    P(E∣T)P(E|T)⁠: the chance of EE when TT is known to happen. Lesson: conditional probability
  3. The chance of being late: total probability

    By the theorem of total probability,

    P(E)=P(T1)P(E∣T1)+P(T2)P(E∣T2)+P(T3)P(E∣T3)+P(T4)P(E∣T4)=310⋅14+15⋅13+110⋅112+25⋅0=340+115+1120+0=9120+8120+1120=18120.\begin{aligned} P(E) &= P(T_1)P(E|T_1) \\ &\quad + P(T_2)P(E|T_2) \\ &\quad + P(T_3)P(E|T_3) \\ &\quad + P(T_4)P(E|T_4) \\ &= \frac{3}{10}\cdot\frac14 + \frac15\cdot\frac13 \\ &\quad + \frac{1}{10}\cdot\frac{1}{12} + \frac25\cdot 0 \\ &= \frac{3}{40} + \frac{1}{15} + \frac{1}{120} + 0 \\ &= \frac{9}{120} + \frac{8}{120} + \frac{1}{120} \\ &= \frac{18}{120}. \end{aligned}
    start transport arrival multiply along the path trip T₁: train E: late 3/10 × 1/4 = 3/40 E′: on time 3/10 × 3/4 T₂: bus E: late 1/5 × 1/3 = 1/15 E′: on time 1/5 × 2/3 T₃: scooter E: late 1/10 × 1/12 = 1/120 E′: on time 1/10 × 11/12 T₄: other E: late 2/5 × 0 = 0 E′: on time 2/5 × 1 3/10 1/4 3/4 1/5 1/3 2/3 1/10 1/12 11/12 2/5 0 1
    The tree for Example 20. The late paths have products 340\frac{3}{40} (train, rose), 115\frac{1}{15} (bus), 1120\frac{1}{120} (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: 340=9120\frac{3}{40} = \frac{9}{120}⁠, 115=8120\frac{1}{15} = \frac{8}{120}⁠. The term 25⋅0=0\frac25 \cdot 0 = 0 is written to show that the whole partition is used.
    Multiply along a path, add the paths. Basics: tree diagrams
  4. By train, given late: Bayes' theorem

    By Bayes' theorem,

    P(T1∣E)=P(T1)P(E∣T1)P(E)=9120÷18120=918=12.\begin{aligned} P(T_1|E) &= \frac{P(T_1)P(E|T_1)}{P(E)} \\ &= \frac{9}{120} \div \frac{18}{120} = \frac{9}{18} = \frac12. \end{aligned}
    The top is the train path, 310⋅14=340=9120\frac{3}{10} \cdot \frac14 = \frac{3}{40} = \frac{9}{120}⁠; the bottom is all late arrivals, 18120\frac{18}{120}⁠. The 120 cancels. The book writes this as 340×12018=12\frac{3}{40} \times \frac{120}{18} = \frac12⁠.
    Dividing by a fraction is multiplying by its flip. Basics: working with fractions
  5. What the answer means

    Before he arrived, the train had probability 310\frac{3}{10}⁠. Knowing he is late raises it to 12\frac12⁠. The other ways get P(T2∣E)=818=49P(T_2|E) = \frac{8}{18} = \frac49⁠, P(T3∣E)=118P(T_3|E) = \frac{1}{18} and P(T4∣E)=0P(T_4|E) = 0⁠; and 9+8+1+018=1\frac{9 + 8 + 1 + 0}{18} = 1⁠.

    "Other means" was the most likely way to travel (25\frac25⁠), 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 (13\frac13⁠), so its share grows the most, from 15\frac15 to 49\frac49⁠, more than double.
    For a partition, the P(Ti∣E)P(T_i|E) add to 1. Lesson: Bayes' theorem
Result

The probability that the doctor came by train, given that he is late, is 12\frac12⁠.

(Textbook answer: 12\frac{1}{2}⁠.)

Check it with numbers

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 14\frac14 of the train visits (9), 13\frac13 of the bus visits (8), 112\frac{1}{12} of the scooter visits (1) and never otherwise. So he is late 9+8+1=189 + 8 + 1 = 18 times, and 9 of those were by train: 918=0.5\frac{9}{18} = 0.5⁠.

Common mistakes
  1. Answering 14\frac14⁠. That is P(E∣T1)P(E|T_1)⁠, the chance of being late when he takes the train. The question is the reverse, P(T1∣E)P(T_1|E)⁠.
  2. Answering 310\frac{3}{10}⁠. That ignores the information that he is late; Bayes' theorem updates the 310\frac{3}{10}⁠.
  3. Leaving out "other means". It is part of the partition: without it the prior probabilities add to only 35\frac35⁠. Its term in P(E)P(E) is 25⋅0=0\frac25 \cdot 0 = 0⁠, so it does not change the total, but it belongs in the sum.
What to take away
  1. A cause that can never produce the effect gets posterior probability 0, however likely it was before.
  2. 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.
  3. Four causes in a table: Example 22 and Miscellaneous Exercise, Question 6.

Every fact used, and where it comes from

FactUsed inSource
Partition of the sample spaceStep 1Section 13.5.1 (Lesson: Bayes' theorem)
Conditional probability P(E∣Ti)P(E|T_i)Step 2Section 13.2 (Lesson: conditional probability)
Theorem of total probabilityStep 3Section 13.5.2 (Lesson: total probability)
Bayes' theoremSteps 4, 5Section 13.5 (Examples 15 to 21)
Common denominators, dividing fractionsSteps 3, 4Arithmetic (Basics: working with fractions)
Found an error, or want more?

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 →