The conditional probability formula is P(A | B) = P(A and B) ÷ P(B), the chance that A happens once you know B has happened, provided P(B) is not 0. Read the bar as "given". Knowing B shrinks the sample space to B alone, and you then ask what fraction of B also lies in A.
From this one formula come the multiplication theorem, the test for independent events, the theorem of total probability and Bayes' theorem. Each is shown below with a worked example in numbers you can check.

At a glance
Formula
P(A | B) = P(A ∩ B) ÷ P(B)Read as
Probability of A given BMultiplication rule
P(A ∩ B) = P(B) P(A | B)Independent if
P(A ∩ B) = P(A) P(B)Bayes' theorem
Reverses the conditionClass 12 chapter
13, Probability
What is conditional probability
Conditional probability answers questions of the form "if this is known, how likely is that?" Suppose a friend rolls a die out of your sight and tells you only that the score is even. The possible scores are now 2, 4 and 6, not all six faces. The chance that the score is 6 has risen from 1/6 to 1/3. Nothing about the die changed; your information did.
That is the whole idea. The given event becomes the new, smaller sample space, and every probability is measured inside it.
The conditional probability formula and how to use it
- Name the events. Decide which is known (B) and which you want (A).
- Find P(B) and P(A ∩ B), the chance that both happen.
- Divide the joint chance by the chance of the given event.
Example 1. Roll one die. Find the chance of a 6 given that the score is even.
- B = even = {2, 4, 6}, so P(B) = 3/6
- A ∩ B = {6}, so P(A ∩ B) = 1/6
- P(A | B) = (1/6) ÷ (3/6) = 1/3
Example 2. In a class of 40, 15 students play football and 8 of those also play cricket. A footballer is picked at random. Find the chance that this student plays cricket.
- Given: plays football. P(F) = 15/40
- Both: P(C ∩ F) = 8/40
- P(C | F) = (8/40) ÷ (15/40) = 8/15
When counts are given, you can skip the 40s: inside the 15 footballers, 8 play cricket, so the answer is 8/15.
Note that P(A | B) and P(B | A) are usually different. In Example 1, the chance the score is even given that it is 6 is 1, not 1/3.
Multiplication theorem of probability
Rearranging the formula gives the multiplication theorem, used for events that happen one after another.
Example 3. Two cards are drawn from a full pack, one after the other, without putting the first back. Find the chance that both are aces.
- P(first ace) = 4/52
- After one ace is gone, 3 aces remain among 51 cards: P(second ace | first ace) = 3/51
- P(both aces) = 4/52 × 3/51 = 12/2652 = 1/221
With replacement, the second draw would again have chance 4/52, and the events would be independent. Without replacement, the second chance depends on the first card.
Independent events in probability
Events A and B are independent when knowing one leaves the chance of the other exactly where it was, that is P(A | B) = P(A). Put that into the multiplication rule and you get the working test:
Example 4. A die is rolled. A is "the score is even" and B is "the score is at most 4". Are A and B independent?
- A = {2, 4, 6}, P(A) = 1/2. B = {1, 2, 3, 4}, P(B) = 2/3
- A ∩ B = {2, 4}, P(A ∩ B) = 2/6 = 1/3
- P(A) × P(B) = 1/2 × 2/3 = 1/3. The two agree, so A and B are independent.
This surprises many students: both events come from the same single roll. Independence is a property of the numbers, not of separate objects.
Do not mix up independent with mutually exclusive. Mutually exclusive events never occur at the same time, so P(A ∩ B) = 0. Two such events with nonzero chances can never be independent.
Total probability theorem
Sometimes an event can arise in several ways. Split the sample space into cases E1, E2, ..., En that do not overlap and together cover everything. Then:
Example 5. Machine 1 makes 60% of a factory's bolts and 2% of its bolts are faulty. Machine 2 makes the other 40%, and 5% of its bolts are faulty. Find the chance that a bolt picked at random is faulty.
- From machine 1: 0.6 × 0.02 = 0.012
- From machine 2: 0.4 × 0.05 = 0.020
- P(faulty) = 0.012 + 0.020 = 0.032
A tree diagram helps: one branch for each machine, then faulty or fine on each. Multiply along branches and add the branches that end in "faulty".
Bayes theorem in probability: reversing the condition
Bayes' theorem turns the condition round. It tells you the chance of a cause once you have seen the effect.
Example 6. In the factory above, a bolt is found to be faulty. Find the probability that machine 2 made it.
- Top line: the machine 2 branch, 0.4 × 0.05 = 0.020
- Bottom line: P(faulty) = 0.032 from the total probability theorem
- P(machine 2 | faulty) = 0.020 ÷ 0.032 = 5/8 = 0.625
Example 7. A disease affects 1% of a town. A test detects it in 90% of people who have it, but also gives a positive result for 5% of healthy people. A person tests positive. Find the chance that they have the disease.
- Positive and ill: 0.01 × 0.90 = 0.009
- Positive and healthy: 0.99 × 0.05 = 0.0495
- P(positive) = 0.009 + 0.0495 = 0.0585
- P(ill | positive) = 0.009 ÷ 0.0585 = 2/13, about 0.154 (3 decimal places)
Only about 15% of positives are truly ill, because healthy people far outnumber ill ones. This is why doctors repeat a positive test.
Bayesian statistics in one paragraph
Bayesian statistics applies Bayes' theorem to learning from data. You start with a prior belief about how likely something is, collect evidence, and use the theorem to get an updated, posterior belief. Example 7 is a tiny case: the prior chance of illness was 0.01, and after a positive test the posterior chance was about 0.154. Spam filters, weather forecasts and medical screening all use this update step. For the wider subject, see probability and statistics.
Where conditional questions go wrong
- Dividing by the wrong event. The given event, after the bar, always goes in the denominator.
- Assuming P(A | B) = P(B | A). Example 7 shows how far apart they can be: 0.90 against 0.154.
- Multiplying probabilities of dependent events as if they were independent.
- Calling mutually exclusive events independent.
- In Bayes questions, forgetting a branch in the denominator.
For the class 12 chapter in full, see probability class 12, and for every chance topic, the probability hub.
Frequently asked questions
What is the conditional probability formula?
P(A | B) equals P(A ∩ B) divided by P(B), with P(B) greater than 0. It gives the chance of A when B is known to have happened.
What is the difference between conditional and joint probability?
Joint probability P(A ∩ B) is the chance that both events happen, measured in the whole sample space. Conditional probability P(A | B) measures that overlap inside B only, so it divides by P(B).
How do I check if two events are independent?
Compute the chance of both together, then the product of the two separate chances. If those match, the events are independent; if not, they are dependent.
When do we use Bayes' theorem?
Use it when you know the chance of an effect for each possible cause and want the chance of a particular cause after the effect has been seen, such as which machine made a faulty item.
What is the multiplication theorem of probability?
It says the chance of both equals the chance of the first times the conditional chance of the second given the first. With independent events, that conditional chance is just the plain chance of the second.
Is conditional probability in class 12?
Yes. It opens Chapter 13, Probability, in the class 12 book, after which come the product rule, independence and the Bayes result.