Conditional probability

Roll a die and ask "what's the chance of getting a number greater than 3?" — the answer is 12\tfrac12. Now add one clue: "the number is even." Suddenly the sample space shrinks to {2,4,6}\{2,4,6\}, and the chance changes to 23\tfrac23. That is conditional probability — the probability of an event once we already know another event has occurred. It sounds like a small tweak, but it is the hinge on which the rest of the Class 12 Probability chapter turns: the multiplication theorem, independence, total probability, and Bayes' theorem are all built directly on the definition below. This article gives the formal definition, shows why it is really just "counting inside a smaller box," and works through the standard exam patterns — including the classic student trap of dividing by the wrong probability.

The core insight

Given that event BB has occurred, the conditional probability of AA is the fraction of BB's probability that also lies in AA, written P(A∣B)=P(A∩B)P(B)P(A\mid B) = \dfrac{P(A\cap B)}{P(B)} for P(B)≠0P(B)\neq 0.

The core idea

The definition. If AA and BB are events of a sample space SS with P(B)≠0P(B) \neq 0, the conditional probability of AA given BB is

P(A∣B)=P(A∩B)P(B),P(B)≠0.P(A\mid B) = \frac{P(A\cap B)}{P(B)}, \qquad P(B) \neq 0.

where: P(A∩B)P(A\cap B) is the probability that both AA and BB happen, and P(B)P(B) is the probability of the conditioning event — the one we are told has already occurred.

Why the formula looks like that. Once we are told BB has occurred, the "universe" of possible outcomes shrinks from all of SS down to just the outcomes inside BB. Inside that reduced universe, the only way AA can still happen is through the outcomes it shares with BB, namely A∩BA \cap B. So P(A∣B)P(A\mid B) is simply "how much of BB is also AA," expressed as a fraction of P(B)P(B) rather than of the whole of P(S)=1P(S) = 1.

Order matters. Swapping the roles gives a different quantity: P(B∣A)=P(A∩B)P(A)P(B\mid A) = \dfrac{P(A\cap B)}{P(A)} for P(A)≠0P(A) \neq 0. In general P(A∣B)≠P(B∣A)P(A\mid B) \neq P(B\mid A) — they have different denominators and answer different questions. Mixing these up is the single most common error in this topic.

Two quick consequences, both provable directly from the definition: P(S∣B)=P(B∣B)=1P(S\mid B) = P(B\mid B) = 1 (something in the reduced space is certain to be in the reduced space), and if A,BA, B are mutually exclusive with P(B)≠0P(B)\neq 0 then A∩B=∅A \cap B = \varnothing, so P(A∣B)=0P(A\mid B) = 0.

Where it sits in the chapter. This definition is not an isolated fact — it is the seed for everything that follows in Class 12 Probability. Rearranging P(A∣B)=P(A∩B)/P(B)P(A\mid B) = P(A\cap B)/P(B) gives P(A∩B)=P(A∣B) P(B)P(A\cap B) = P(A\mid B)\,P(B), the multiplication theorem. Setting P(A∣B)=P(A)P(A\mid B) = P(A) (knowing BB tells you nothing new about AA) defines independence. Averaging P(A∣Bi)P(A\mid B_i) over a partition of BiB_i's gives total probability, and inverting the relationship gives Bayes' theorem. None of those later results can be trusted unless this single formula, and the sign of which event is the "given" one, is solid first.

Figure
A Venn diagram showing sample space S with events A and B overlapping, the overlap region A intersect B shaded, illustrating that conditioning on B restricts attention to the smaller circle
Conditioning on B shrinks the sample space S (whole sample space) A B A ∩ B Given B has occurred, only the red circle matters — P(A given B) is the purple sliver as a fraction of all of B
Derivation AThe restricted-sample-space shortcut

Show that when the underlying sample space consists of finitely many equally likely outcomes, the formula P(A∣B)=P(A∩B)/P(B)P(A\mid B) = P(A\cap B)/P(B) reduces to simply counting favourable outcomes inside BB, so that in practice a student can skip the formula and reason directly on a smaller, restricted sample space rather than computing every probability explicitly.

Step 1. Suppose SS has NN equally likely outcomes in total. Then every single outcome has probability 1/N1/N, so for any event E⊆SE \subseteq S with n(E)n(E) outcomes, P(E)=n(E)/NP(E) = n(E)/N.

Step 2. Apply this to both pieces of the definition. P(A∩B)=n(A∩B)/NP(A\cap B) = n(A\cap B)/N, and P(B)=n(B)/NP(B) = n(B)/N, where n(A∩B)n(A\cap B) counts outcomes common to both AA and BB, and n(B)n(B) counts outcomes in BB alone.

Step 3. Substitute into P(A∣B)=P(A∩B)/P(B)P(A\mid B) = P(A\cap B)/P(B):

P(A∣B)=n(A∩B)/Nn(B)/N=n(A∩B)N×Nn(B)=n(A∩B)n(B).P(A\mid B) = \frac{n(A\cap B)/N}{n(B)/N} = \frac{n(A\cap B)}{N} \times \frac{N}{n(B)} = \frac{n(A\cap B)}{n(B)}.

The factor of NN in the numerator and denominator cancels completely, leaving a pure count.

Step 4. Interpret the result. P(A∣B)=n(A∩B)n(B)P(A\mid B) = \dfrac{n(A\cap B)}{n(B)} says: once you know BB has occurred, treat BB itself as the new, smaller sample space (with n(B)n(B) equally likely outcomes), and just ask what fraction of those outcomes also belong to AA. This is exactly the "restrict the sample space" method used below, and it is often faster than writing out probabilities explicitly, especially when outcomes are naturally listed (dice, cards, coins).

Worked example

A fair die is rolled once. Let AA = "the number obtained is greater than 3" and BB = "the number obtained is even." Find P(A∣B)P(A\mid B), and then find P(B∣A)P(B\mid A) to see that it is different.

Step 1. List the sample space and the two events. S={1,2,3,4,5,6}S = \{1,2,3,4,5,6\}, so each outcome has probability 16\tfrac16. A={4,5,6}A = \{4,5,6\} gives P(A)=36P(A) = \tfrac{3}{6}, and B={2,4,6}B = \{2,4,6\} gives P(B)=36P(B) = \tfrac{3}{6}.

Step 2. Find the intersection. A∩B={4,6}A \cap B = \{4,6\}, so P(A∩B)=26=13P(A\cap B) = \tfrac{2}{6} = \tfrac13.

Step 3. Apply the formula. P(A∣B)=P(A∩B)P(B)=2/63/6=23P(A\mid B) = \dfrac{P(A\cap B)}{P(B)} = \dfrac{2/6}{3/6} = \dfrac{2}{3}.

Step 4. Check by restricting the sample space directly (the shortcut from the derivation above). Given the outcome is even, the reduced space is {2,4,6}\{2,4,6\} — 3 equally likely outcomes. Of these, 44 and 66 are greater than 3, so P(A∣B)=23P(A\mid B) = \tfrac23, matching Step 3.

Step 5. Now find the reverse quantity, P(B∣A)=P(A∩B)P(A)=2/63/6=23P(B\mid A) = \dfrac{P(A\cap B)}{P(A)} = \dfrac{2/6}{3/6} = \dfrac23. Here it happens to come out equal to P(A∣B)P(A\mid B) only because P(A)=P(B)P(A) = P(B) in this particular problem — that is a coincidence of this example, not a general rule. In general P(A∣B)≠P(B∣A)P(A\mid B) \neq P(B\mid A), so the final answer is P(A∣B)=23P(A\mid B) = \mathbf{\tfrac23}, obtained two independent ways.

Competitive stretch

In a class, 40% of students study Mathematics, 25% study Biology, and 15% study both. A student known to study Mathematics is picked; find the probability they also study Biology, and compare with the reverse conditional. With P(M)=0.40P(M) = 0.40, P(B)=0.25P(B) = 0.25, P(M∩B)=0.15P(M\cap B) = 0.15: P(B∣M)=0.15/0.40=0.375P(B\mid M) = 0.15/0.40 = 0.375, but P(M∣B)=0.15/0.25=0.6P(M\mid B) = 0.15/0.25 = 0.6 — two clearly different numbers from the same data, confirming why the denominator choice cannot be guessed.

Common traps

  • Confusing P(A∣B)P(A\mid B) with P(B∣A)P(B\mid A). Different denominators, generally different answers — identify which event is "given" before writing anything down.
  • Dividing by P(A)P(A) instead of P(B)P(B). The event named after "given that" always goes in the denominator.
  • Forgetting P(B)≠0P(B) \neq 0. Conditional probability is undefined if the conditioning event has zero probability.
  • Treating AA as redefined. P(A∣B)P(A\mid B) is a probability on a restricted sample space; it does not mean AA and BB occur together with certainty.

Ask the tutor: Still unsure which event goes in the denominator, or want more restricted-sample-space practice before moving to the multiplication theorem? Ask the AI tutor to walk through a few more conditional probability problems step by step.

Why does the formula divide by P(B) and not by P(S) equals 1?

Because once we are told B has happened, B itself becomes the new sample space, not the original S. All probabilities computed after that point should be fractions of B's own probability, not of the whole original space. Dividing by P(B) is exactly what rescales things so that P(B given B) comes out to 1, as it must — B is certain to have occurred given B has occurred. It is also why the formula is simply undefined when P(B) is zero: rescaling by nothing has no meaning.

Is P(A given B) always different from P(B given A)?

Not always — they can coincide by coincidence, as when P(A) happens to equal P(B), or when A and B are independent with P(A) equal to P(B) as well, as in the die example above. But there is no general reason for them to be equal, since they have different denominators, P(B) versus P(A). In word problems always re-read the sentence to see which event is stated as already known — that event's probability is the denominator, and getting this backwards is the single most common mark lost on this topic.

Can I always just restrict the sample space instead of using the formula?

Yes, whenever the outcomes are finite and equally likely, such as with dice, coins, or cards — this is exactly what the derivation above proves, since the N cancels and you are left with counting outcomes inside B. But when probabilities are given directly as percentages or from a table, as in the class-survey example, there is no simple list of equally likely outcomes to restrict, so you must use the formula P(A given B) equals P(A intersect B) over P(B) directly, plugging in the given percentages.

Before this

Where this leads