ExamSaathi learning library · Government exams · SSC CGL quantitative foundations; published syllabus labelled 2024 · Quantitative aptitude
Conditional probability and Bayes' theorem: updating with new facts
Find the chance of one event once another is known to have happened: read conditional probabilities from a two-way table, multiply along draws without replacement, test for independence, and use total probability and Bayes' theorem to trace a result back to its source.
Status: original pilot lesson. Teacher review is pending. It is not a complete course or official exam material.
You will learn to
- Read a conditional probability P(A given B) from a two-way table by counting only inside the known group B.
- Use the multiplication rule P(A and B) = P(A) x P(B given A) for two draws without replacement from a bag.
- Test whether two events are independent, and explain why independent events are not the same as mutually exclusive events.
- Apply the theorem of total probability when a result can come from two or three machines, factories or bags.
- Use Bayes' theorem to find the conditional probability that an observed result came from a particular source.
Before you start
This lesson assumes you can already find a simple probability by counting equally likely outcomes, and that you know every probability lies from 0 to 1. The new question is how a chance changes once we learn a fact. If a student picked at random from a college turns out to be a girl, the chance that the student studies science may differ from the chance for the college as a whole. P(A and B) means the chance that A and B both happen. P(A given B) means the chance of A when B is known to have happened; many books print it as P(A | B). Events are named with capital letters such as A, B and R, and the letter x is kept for multiplication. All the data in this lesson are invented for practice.
The conditional rule: count inside the known group
Once B is known to have happened, every outcome outside B is ruled out, so B becomes the new whole. That gives the rule P(A given B) = P(A and B) / P(B), which needs P(B) > 0. With a two-way table of counts it is even simpler: P(A given B) = (number in both A and B) / (number in B). Take a coaching batch of 50 learners: 30 boys, of whom 12 chose Hindi as an elective, and 20 girls, of whom 10 chose Hindi. For a learner picked at random, P(Hindi) = 22/50 = 0.44. Given that the learner is a girl, only the 20 girls count, so P(Hindi given girl) = 10/20 = 0.5. The formula agrees: (10/50) / (20/50) = 0.5. The order of the events matters. P(girl given Hindi) = 10/22, about 0.4545, a different number, because now the group we count inside is the 22 Hindi learners.
The multiplication rule and draws without replacement
Rearranging the conditional rule gives the multiplication rule: P(A and B) = P(A) x P(B given A). It suits events that happen one after the other. Suppose a tray holds 6 good eggs and 2 cracked eggs, and two eggs are lifted out one at a time without putting the first one back. P(first cracked) = 2/8 = 0.25. Once a cracked egg has gone, 7 eggs remain and only 1 of them is cracked, so P(second cracked given first cracked) = 1/7, about 0.1429. Hence P(both cracked) = 2/8 x 1/7 = 2/56 = 1/28, about 0.0357. Every later fraction is read from what is left on the tray, not from the starting tray. When a question asks for one of each kind in either order, work out each order on its own and add the results, because the two orders are separate routes to the same outcome.
Independent is not the same as mutually exclusive
Two events are independent when learning that one has happened leaves the chance of the other unchanged, that is, P(A given B) = P(A). The multiplication rule then shortens to P(A and B) = P(A) x P(B). To test a pair, compare P(A and B) with P(A) x P(B): if they are equal, the events are independent. Draws made with replacement are independent; draws made without replacement are not, because the first draw changes what is left. Mutually exclusive is a different idea: the two events cannot happen together, so P(A and B) = 0. If A and B each have a chance above 0 and are mutually exclusive, they can never be independent, because learning that A happened drops the chance of B to 0. For example, if a bus to Hubballi is on time with probability 0.8 and, independently, a connecting train is on time with probability 0.9, both are on time with probability 0.8 x 0.9 = 0.72, and exactly one is on time with probability 0.8 x 0.1 + 0.2 x 0.9 = 0.26.
Several sources: total probability and Bayes' theorem
Sometimes a result R can arise from several sources, such as three machines in one factory or two bags of balls. Call the sources S1, S2 and S3, where every item comes from exactly one of them, so P(S1) + P(S2) + P(S3) = 1. The theorem of total probability builds the overall chance of R one source at a time: P(R) = P(S1) x P(R given S1) + P(S2) x P(R given S2) + P(S3) x P(R given S3). With only two sources, leave out the third product. Each product is the chance of reaching R through that source. Bayes' theorem runs the other way. Once R has been observed, the chance that it came through S1 is that route's share of the total: P(S1 given R) = P(S1) x P(R given S1) / P(R), and the same pattern works for every source. These updated chances add up to 1, which is a handy check. A source whose rate of R is above the overall P(R) gains weight once R is seen, and a source whose rate is below it loses weight, however much of the output it makes.
Common mistakes
Swapping the condition: P(A given B) and P(B given A) are usually different, so decide which event is already known before you divide. Dividing by the grand total of a two-way table instead of the total of the known row or column. Keeping the starting fractions on the second draw, which treats a draw without replacement as if the ball had been put back. Counting only one order when the question allows either order. Calling mutually exclusive events independent, or assuming independence without a reason; test it with P(A and B) = P(A) x P(B). In Bayes questions, reporting the rate P(R given S1) when the question asks for P(S1 given R), or forgetting to divide by the total P(R).
A routine for conditional and Bayes questions
1. Write in words which event is already known and which chance is wanted. 2. For a two-way table, find the row or column of the known event and divide inside it. 3. For events in sequence, multiply along the route, updating the counts after each draw, and add separate routes. 4. For independence, compare P(A and B) with P(A) x P(B). 5. For sources, list each source with its share and its rate, multiply each pair, and add the products to get the total probability. 6. For Bayes, divide the product for the wanted source by that total. 7. Check that each answer lies from 0 to 1 and that the updated chances for all the sources add to 1.
Worked examples
A college in Nagpur has 160 first-year students, counted by gender and stream. Science: 36 girls and 44 boys. Commerce: 30 girls and 20 boys. Arts: 24 girls and 6 boys. A student is picked at random. Find the probability that the student studies science, given that she is a girl. Also find the probability that the student is a girl, given that the student studies science.
- Totals: girls = 36 + 30 + 24 = 90, boys = 44 + 20 + 6 = 70, science students = 36 + 44 = 80, and the grand total is 160.
- Given 'girl', only the 90 girls count. Of them, 36 study science, so P(science given girl) = 36/90 = 0.4.
- Formula check: P(girl and science) = 36/160 = 0.225 and P(girl) = 90/160 = 0.5625, so P(science given girl) = 0.225 / 0.5625 = 0.4.
- Given 'science', only the 80 science students count, so P(girl given science) = 36/80 = 0.45.
Answer: P(science given girl) = 36/90 = 0.4, and P(girl given science) = 36/80 = 0.45.
A bag at a school fair in Mysuru holds 5 red balls and 3 green balls. Two balls are drawn one after the other without replacement. Find the probability that both are red, and the probability that one is red and the other is green.
- P(first red) = 5/8. With one red ball gone, 7 balls are left and 4 of them are red, so P(second red given first red) = 4/7.
- P(both red) = 5/8 x 4/7 = 20/56 = 5/14, about 0.3571.
- Red then green: 5/8 x 3/7 = 15/56, about 0.2679. Green then red: 3/8 x 5/7 = 15/56 as well.
- P(one of each colour) = 15/56 + 15/56 = 30/56 = 15/28, about 0.5357.
- Check: P(both green) = 3/8 x 2/7 = 6/56, about 0.1071, and 20/56 + 30/56 + 6/56 = 56/56 = 1.
Answer: P(both red) = 5/14, about 0.3571, and P(one red and one green) = 15/28, about 0.5357.
A company makes mobile chargers at three plants. The Noida plant makes 50 percent of them, the Chennai plant 30 percent and the Hosur plant 20 percent. Of the chargers from these plants, 2 percent, 3 percent and 4 percent respectively are faulty. A charger picked at random from the company's stock turns out to be faulty. Find the probability that it was made at Hosur.
- Shares: P(Noida) = 0.5, P(Chennai) = 0.3 and P(Hosur) = 0.2. Rates: P(faulty given Noida) = 0.02, P(faulty given Chennai) = 0.03 and P(faulty given Hosur) = 0.04.
- Routes to a faulty charger: Noida 0.5 x 0.02 = 0.010; Chennai 0.3 x 0.03 = 0.009; Hosur 0.2 x 0.04 = 0.008.
- Total probability: P(faulty) = 0.010 + 0.009 + 0.008 = 0.027, so 2.7 percent of all the chargers are faulty.
- Bayes' theorem: P(Hosur given faulty) = 0.008 / 0.027 = 8/27, about 0.2963.
- Check: P(Noida given faulty) = 10/27, about 0.3704, and P(Chennai given faulty) = 9/27, about 0.3333, and 10/27 + 9/27 + 8/27 = 1. Hosur makes only 20 percent of the chargers but supplies about 30 percent of the faulty ones, because its rate is above the overall 2.7 percent.
Answer: P(faulty) = 0.027, and P(Hosur given faulty) = 8/27, about 0.2963.
Practice checks
- A survey of 200 shoppers at a mall in Lucknow found that, of the 120 shoppers under 30, 90 paid by UPI, and of the 80 shoppers aged 30 or more, 40 paid by UPI. A shopper picked at random paid by UPI. What is the probability that this shopper is under 30?
- A drawer in an office in Kanpur holds 4 blue pens and 6 black pens. Two pens are taken out one after the other without replacement. What is the probability that the first is blue and the second is black?
- In a housing colony in Bhopal, 50 percent of the families own a two-wheeler (event A), 40 percent own a computer (event B), and 20 percent own both. For a family picked at random, what is P(A given B), and what does it show?
- Bag 1 holds 3 white and 2 black balls, and bag 2 holds 1 white and 4 black balls. Asha picks bag 1 with probability 0.6 and bag 2 with probability 0.4, then draws one ball from the bag she picked. What is the probability that the ball is white?
- At a packing unit in Ratnagiri, 10 percent of the mangoes are spoilt. A sorting machine flags 90 percent of the spoilt mangoes, and it also flags 5 percent of the good mangoes by mistake. A mango is flagged. What is the probability that it is really spoilt?
Sources checked
- SSC CGL Scheme and Syllabus, labelled 2024 — Tier-II Paper-II Statistics (probability theory: conditional probability, compound probability, independent events, Bayes' theorem); not verified as the full 2026-cycle syllabus
- NCERT, Mathematics Part II, Textbook for Class XII — Chapter 13, Probability: conditional probability, the multiplication theorem, independent events, the theorem of total probability and Bayes' theorem; mathematical relationships only