WishWasTraining Academy
NDA & Naval Academy entrance exam school
โ† home
Chapter M8-7 ยท 7 of 8 in Statistics and Probability ยท 12 min read

Conditional probability and Bayes' theorem

33 real NDA questions of this kind in the 19 papers of 2017 to 2026.

Try three questions free โ†“
This chapter has a video lessonWatch it, practise with a drill and keep your record, all with a free account. No fee, no card.

Why this chapter matters. This chapter drew 12 questions in the seven papers from NDA II 2023 to NDA II 2026. They are of three kinds. The first gives โ€‹P(A)โ€‹, โ€‹P(B)โ€‹ and one more number and asks for โ€‹P(A \mid B)โ€‹ or โ€‹P(B \mid A)โ€‹: one line with the formula. The second is a story with two or three causes and one result ("the building has collapsed; what is the probability that the design was faulty?"): Bayes' theorem. The third tells you that something has already happened and asks you to count inside a smaller sample space.

What you will be able to do

  • Find โ€‹P(A \mid B)โ€‹ from the formula, or by counting in the reduced sample space.
  • Use the multiplication theorem, for example for draws without replacement.
  • Find the total probability of a result that can come from several causes.
  • Use Bayes' theorem to find the probability of a cause when the result is known.

Before you start you should know: the addition theorem, "neither" and "only โ€‹Aโ€‹", and independent events (Chapter M8-6).

1. Conditional probability

Sometimes we are told that an event โ€‹Bโ€‹ has already occurred. This information changes the chances of other events. The probability of โ€‹Aโ€‹ when โ€‹Bโ€‹ is known to have occurred is the conditional probability of โ€‹Aโ€‹ given โ€‹Bโ€‹, written โ€‹P(A \mid B)โ€‹.

P(A \mid B) = \frac{P(A \cap B)}{P(B)}, \qquad P(B) \ne 0

The idea. Once โ€‹Bโ€‹ has occurred, the outcomes outside โ€‹Bโ€‹ are no longer possible. โ€‹Bโ€‹ becomes the new, smaller sample space, and โ€‹Aโ€‹ can occur only through the outcomes that are also in โ€‹Bโ€‹. With equally likely outcomes this gives a counting form:

P(A \mid B) = \frac{n(A \cap B)}{n(B)}

For example, a die is thrown and we are told the number is even. The sample space shrinks to โ€‹\{2, 4, 6\}โ€‹. The probability that the number is more than 3 is now โ€‹\dfrac{2}{3}โ€‹, because 4 and 6 are favourable.

The six faces of a die: 1, 3 and 5 are crossed out because the number is known to be even; of the remaining 2, 4, 6, the numbers 4 and 6 are more than 3

Note that โ€‹P(A \mid B)โ€‹ and โ€‹P(B \mid A)โ€‹ are different things. The event after the bar is the one that is known, and its probability goes in the denominator.

2. The multiplication theorem

Multiply the formula of section 1 across:

P(A \cap B) = P(B)\,P(A \mid B) = P(A)\,P(B \mid A)

In words: the probability that both occur is the probability of the first, times the probability of the second given the first. For three events, โ€‹P(A \cap B \cap C) = P(A)\,P(B \mid A)\,P(C \mid A \cap B)โ€‹.

This is the rule for draws without replacement. If two cards are drawn one after the other from a pack, โ€‹P(\text{both aces}) = \dfrac{4}{52} \times \dfrac{3}{51}โ€‹: after one ace is gone, 3 aces remain among 51 cards.

Independent events. โ€‹Aโ€‹ and โ€‹Bโ€‹ are independent exactly when knowing โ€‹Bโ€‹ does not change the chance of โ€‹Aโ€‹: โ€‹P(A \mid B) = P(A)โ€‹. Then the multiplication theorem becomes โ€‹P(A \cap B) = P(A)\,P(B)โ€‹, the rule of Chapter M8-6.

3. The theorem of total probability

Suppose a result โ€‹Aโ€‹ can come about through several causes โ€‹E_1, E_2, \ldots, E_nโ€‹, which are mutually exclusive and exhaustive (exactly one of them happens). Then

P(A) = P(E_1)\,P(A \mid E_1) + P(E_2)\,P(A \mid E_2) + \dots + P(E_n)\,P(A \mid E_n)

The tree picture. Draw one branch for each cause and write its probability on it. From the end of each branch draw a branch for the result โ€‹Aโ€‹ and write โ€‹P(A \mid E_i)โ€‹ on it. Multiply along each path. Add the paths that end in โ€‹Aโ€‹.

4. Bayes' theorem

Now turn the question round. The result โ€‹Aโ€‹ has been seen. What is the probability that it came from the cause โ€‹E_iโ€‹?

P(E_i \mid A) = \frac{P(E_i)\,P(A \mid E_i)}{P(E_1)\,P(A \mid E_1) + P(E_2)\,P(A \mid E_2) + \dots + P(E_n)\,P(A \mid E_n)}

The denominator is the total probability of โ€‹Aโ€‹. The numerator is one of its terms: the path through โ€‹E_iโ€‹. So

P(\text{cause} \mid \text{result}) = \frac{\text{the path through that cause}}{\text{the sum of all paths to the result}}

A table makes it safe. For each cause write three numbers: โ€‹P(E_i)โ€‹, โ€‹P(A \mid E_i)โ€‹ and their product. Add the products. Each product divided by the total is the answer for that cause. Example 5 shows the table.

5. Worked examples

Example 1. โ€‹P(A) = 0.6โ€‹, โ€‹P(B) = 0.5โ€‹ and โ€‹P(A \cap B) = 0.3โ€‹. Find โ€‹P(A \mid B)โ€‹, โ€‹P(B \mid A)โ€‹ and โ€‹P(A' \mid B')โ€‹.

โ€‹P(A \mid B) = \dfrac{0.3}{0.5} = 0.6โ€‹. โ€‹P(B \mid A) = \dfrac{0.3}{0.6} = 0.5โ€‹. For the third, โ€‹P(A \cup B) = 0.6 + 0.5 - 0.3 = 0.8โ€‹, so โ€‹P(A' \cap B') = 0.2โ€‹, and โ€‹P(B') = 0.5โ€‹. Hence โ€‹P(A' \mid B') = \dfrac{0.2}{0.5} = 0.4โ€‹.

(Here โ€‹P(A \mid B) = P(A)โ€‹, so โ€‹Aโ€‹ and โ€‹Bโ€‹ are independent.)

Example 2. Two dice are thrown and the sum is found to be at least 10. Find the probability that the two numbers are equal.

Reduced sample space: โ€‹(4, 6), (5, 5), (6, 4), (5, 6), (6, 5), (6, 6)โ€‹, 6 outcomes. Of these, โ€‹(5, 5)โ€‹ and โ€‹(6, 6)โ€‹ have equal numbers. Probability โ€‹= \dfrac{2}{6} = \dfrac{1}{3}โ€‹.

The 6 by 6 grid for two dice with the six outcomes of sum at least 10 coloured; two of them, (5,5) and (6,6), have equal numbers

Example 3. Two cards are drawn one after the other, without replacement, from a pack of 52. Find the probability that both are aces.

โ€‹P(\text{first ace}) = \dfrac{4}{52}โ€‹. โ€‹P(\text{second ace} \mid \text{first ace}) = \dfrac{3}{51}โ€‹. Product โ€‹= \dfrac{12}{2652} = \dfrac{1}{221}โ€‹.

Example 4. Bag I has 3 red and 2 black balls. Bag II has 2 red and 4 black balls. A bag is chosen at random and one ball is drawn from it. (i) Find the probability that the ball is red. (ii) If the ball is red, find the probability that it came from Bag I.

(i) Total probability: โ€‹P(\text{red}) = \dfrac{1}{2} \times \dfrac{3}{5} + \dfrac{1}{2} \times \dfrac{2}{6} = \dfrac{3}{10} + \dfrac{1}{6} = \dfrac{7}{15}โ€‹.

A tree: Bag I and Bag II each with probability one half; from Bag I red 3/5 and black 2/5; from Bag II red 2/6 and black 4/6; path products 3/10, 2/10, 1/6 and 2/6

(ii) Bayes' theorem: โ€‹P(\text{Bag I} \mid \text{red}) = \dfrac{3/10}{7/15} = \dfrac{3}{10} \times \dfrac{15}{7} = \dfrac{9}{14}โ€‹.

Example 5. In a factory, machine โ€‹Aโ€‹ makes 60% of the items and machine โ€‹Bโ€‹ makes 40%. Of the items made by โ€‹Aโ€‹, 2% are defective; of those made by โ€‹Bโ€‹, 5% are defective. An item picked at random is defective. Find the probability that it was made by โ€‹Bโ€‹.

Cause โ€‹P(\text{cause})โ€‹ โ€‹P(\text{defective} \mid \text{cause})โ€‹ Product
Machine โ€‹Aโ€‹ 0.6 0.02 0.012
Machine โ€‹Bโ€‹ 0.4 0.05 0.020
Total 0.032

โ€‹P(B \mid \text{defective}) = \dfrac{0.020}{0.032} = \dfrac{5}{8}โ€‹. Machine โ€‹Bโ€‹ makes fewer items but more than half of the defective ones.

6. From the real papers

Try each for 75 seconds before reading the solution.

NDA II 2023, Q110. Suppose that there is a chance for a newly constructed building to collapse, whether the design is faulty or not. The chance that the design is faulty is 10%. The chance that the building collapses is 95% if the design is faulty, otherwise it is 45%. If it is seen that the building has collapsed, then what is the probability that it is due to faulty design?

(a) 0.10โ€ƒโ€ƒ(b) 0.19โ€ƒโ€ƒ(c) 0.45โ€ƒโ€ƒ(d) 0.95

Solution. Paths to "collapse": faulty โ€‹0.1 \times 0.95 = 0.095โ€‹; not faulty โ€‹0.9 \times 0.45 = 0.405โ€‹. Total โ€‹= 0.5โ€‹. โ€‹P(\text{faulty} \mid \text{collapse}) = \dfrac{0.095}{0.5} = 0.19โ€‹. Answer (b).

The same answer with 1000 buildings: 100 are faulty and 95 of them collapse; 900 are not faulty and 405 of them collapse. Of the 500 collapsed buildings, 95 were faulty.

A flow chart: 1000 buildings split into 100 with faulty design, of which 95 collapse, and 900 not faulty, of which 405 collapse; of the 500 collapsed, 95 were faulty, which is 0.19

NDA I 2025, Q115. If โ€‹P(A) = 1/3โ€‹, โ€‹P(B) = 1/2โ€‹ and โ€‹P(A \cap B) = 1/4โ€‹, then what is the value of โ€‹P(B \mid A^c)โ€‹?

(a) 1/8โ€ƒโ€ƒ(b) 3/8โ€ƒโ€ƒ(c) 5/8โ€ƒโ€ƒ(d) 7/8

Solution. โ€‹P(B \cap A^c) = P(B) - P(A \cap B) = \dfrac{1}{2} - \dfrac{1}{4} = \dfrac{1}{4}โ€‹ and โ€‹P(A^c) = \dfrac{2}{3}โ€‹. So โ€‹P(B \mid A^c) = \dfrac{1/4}{2/3} = \dfrac{3}{8}โ€‹. Answer (b).

NDA II 2025, Q118. If โ€‹P(A) = 0.3โ€‹, โ€‹P(B) = 0.4โ€‹ and โ€‹P(A|B) = 0.5โ€‹, then what is the value of โ€‹P(B|A)โ€‹?

(a) 0.325โ€ƒโ€ƒ(b) 0.333โ€ƒโ€ƒ(c) 0.375โ€ƒโ€ƒ(d) 0.667

Solution. โ€‹P(A \cap B) = P(B)\,P(A \mid B) = 0.4 \times 0.5 = 0.2โ€‹. Then โ€‹P(B \mid A) = \dfrac{0.2}{0.3} = \dfrac{2}{3} \approx 0.667โ€‹. Answer (d).

NDA I 2026, Q113. In an entrance test there are multiple choice questions. There are four options for each question, of which only one is correct. The probability that a student knows the answer to a question is โ€‹90\%โ€‹. If he gets the correct answer to a question, then what is the probability that he was guessing?

(a) โ€‹\frac{37}{40}โ€‹โ€ƒโ€ƒ(b) โ€‹\frac{36}{37}โ€‹โ€ƒโ€ƒ(c) โ€‹\frac{1}{37}โ€‹โ€ƒโ€ƒ(d) โ€‹\frac{1}{40}โ€‹

Solution. Paths to "correct": knows โ€‹0.9 \times 1 = 0.9โ€‹; guesses โ€‹0.1 \times \dfrac{1}{4} = 0.025โ€‹. Total โ€‹= 0.925โ€‹. โ€‹P(\text{guessing} \mid \text{correct}) = \dfrac{0.025}{0.925} = \dfrac{1}{37}โ€‹. Answer (c).

NDA II 2026, Q109. In a class, the probability of passing students in Mathematics is โ€‹0\cdot7โ€‹ and the probability of passing both Mathematics and Statistics is โ€‹0\cdot5โ€‹. What is the probability that a student passes Statistics given that the student passed Mathematics?

(a) โ€‹5/7โ€‹โ€ƒโ€ƒ(b) โ€‹4/7โ€‹โ€ƒโ€ƒ(c) โ€‹3/7โ€‹โ€ƒโ€ƒ(d) โ€‹2/7โ€‹

Solution. โ€‹P(S \mid M) = \dfrac{P(S \cap M)}{P(M)} = \dfrac{0.5}{0.7} = \dfrac{5}{7}โ€‹. Answer (a).

NDA II 2026, Q114. The events โ€‹Aโ€‹ and โ€‹Bโ€‹ are independent among three events โ€‹Aโ€‹, โ€‹Bโ€‹ and โ€‹Dโ€‹. If โ€‹P(A \cap B \cap D) = 0\cdot04โ€‹, โ€‹P(D \mid A \cap B) = 0\cdot25โ€‹ and โ€‹P(B) = 4P(A)โ€‹, then what is the value of โ€‹P(A \cup B)โ€‹?

(a) โ€‹0\cdot88โ€‹โ€ƒโ€ƒ(b) โ€‹0\cdot84โ€‹โ€ƒโ€ƒ(c) โ€‹0\cdot28โ€‹โ€ƒโ€ƒ(d) โ€‹0\cdot16โ€‹

Solution. โ€‹P(D \mid A \cap B) = \dfrac{P(A \cap B \cap D)}{P(A \cap B)}โ€‹, so โ€‹P(A \cap B) = \dfrac{0.04}{0.25} = 0.16โ€‹. โ€‹Aโ€‹ and โ€‹Bโ€‹ are independent: โ€‹P(A) \times 4P(A) = 0.16โ€‹, so โ€‹P(A) = 0.2โ€‹ and โ€‹P(B) = 0.8โ€‹. Then โ€‹P(A \cup B) = 0.2 + 0.8 - 0.16 = 0.84โ€‹. Answer (b).

7. Mistakes that cost marks

  1. Reading โ€‹P(A \mid B)โ€‹ as โ€‹P(B \mid A)โ€‹. The event after the bar is the known one, and its probability is the denominator. In the building question the answer is not 0.95: that is โ€‹P(\text{collapse} \mid \text{faulty})โ€‹, and the question asks for โ€‹P(\text{faulty} \mid \text{collapse})โ€‹.
  2. Forgetting to multiply by the chance of the cause. In Bayes' theorem each path is โ€‹P(\text{cause}) \times P(\text{result} \mid \text{cause})โ€‹. Comparing 0.95 with 0.45 alone ignores that faulty designs are rare.
  3. Not changing the numbers after a draw. Without replacement, the second draw is from one object fewer, and from one favourable object fewer if the first was favourable.
  4. Using โ€‹P(A)P(B)โ€‹ for โ€‹P(A \cap B)โ€‹ when the events are not independent. In general โ€‹P(A \cap B) = P(A)\,P(B \mid A)โ€‹.

8. Quick check

Do these without help. Answers are at the end.

  1. โ€‹P(A) = 0.5โ€‹, โ€‹P(B) = 0.4โ€‹ and โ€‹P(A \cup B) = 0.7โ€‹. Find โ€‹P(A \mid B)โ€‹.
  2. A die is thrown and the number is known to be greater than 2. Find the probability that it is even.
  3. A bag has 5 red and 3 black balls. Two balls are drawn one after the other without replacement. Find the probability that both are red.
  4. Urn I has 2 white and 3 black balls. Urn II has 4 white and 1 black ball. An urn is chosen at random and a ball is drawn. Find the probability that it is white.
  5. In question 4, the ball drawn is white. Find the probability that it came from Urn II.

9. Read and watch more, free

What Where Language
Textbook NCERT Class 12 Mathematics, Chapter 13 Probability ยท Hindi edition English, Hindi
Self-study notes NIOS Mathematics, Lesson 19 Probability ยท Hindi edition English, Hindi
Video, the whole of Probability for NDA Chandigarh Career Group: NDA Maths one shots (the Probability class, about 8 hours 30 minutes) Hinglish
Video, topic by topic Mohit Tyagi: Probability (16 lessons) Hinglish
Video, short lessons Khan Academy: Probability playlist English

The videos were chosen from their titles, length and views; they have not yet been watched by a teacher.

Answers to the quick check

  1. โ€‹P(A \cap B) = 0.5 + 0.4 - 0.7 = 0.2โ€‹. โ€‹P(A \mid B) = \dfrac{0.2}{0.4} = 0.5โ€‹.
  2. Reduced sample space โ€‹\{3, 4, 5, 6\}โ€‹; even numbers 4 and 6. Probability โ€‹= \dfrac{2}{4} = \dfrac{1}{2}โ€‹.
  3. โ€‹\dfrac{5}{8} \times \dfrac{4}{7} = \dfrac{20}{56} = \dfrac{5}{14}โ€‹.
  4. โ€‹\dfrac{1}{2} \times \dfrac{2}{5} + \dfrac{1}{2} \times \dfrac{4}{5} = \dfrac{1}{5} + \dfrac{2}{5} = \dfrac{3}{5}โ€‹.
  5. โ€‹\dfrac{2/5}{3/5} = \dfrac{2}{3}โ€‹.

Next chapter: Random variables and the binomial distribution.

Free ยท no sign-up

Try three questions on this chapter

Exam-pattern questions from this chapter's drill. Pick an answer for each, then check.

  1. Question 1 of 3
    Two cards are drawn one after the other, without replacement, from a pack of 52 cards. If the first card is a king, what is the probability that the second card is also a king?
  2. Question 2 of 3
    Events โ€‹Aโ€‹ and โ€‹Bโ€‹ have non-zero probabilities. Consider the following statements: I. โ€‹P(A \mid B)โ€‹ can never be greater than โ€‹P(A)โ€‹. II. For any such events, โ€‹P(A \mid B) = \dfrac{P(A)\,P(B)}{P(B)}โ€‹. Which of the statements given above is/are correct?
  3. Question 3 of 3
    If โ€‹P(A) = \tfrac{1}{4}โ€‹, โ€‹P(B \mid A) = \tfrac{2}{3}โ€‹ and โ€‹P(B) = \tfrac{1}{2}โ€‹, what is โ€‹P(A \mid B)โ€‹?
Free sign-up

You have read the chapter. Now make it stick.

A free account adds the video lesson, a drill of ten questions on this chapter marked like the exam, the timed mock papers, a study plan to your exam date and your own record of what you have done. No fee, no card.

Past questions quoted are from the official UPSC paper named in the text; the explanations are WishWas's own and have been checked against the official key. The links under โ€œRead and watch moreโ€ go to free material on other sites; nothing is copied.