A box holds red and blue buttons. Someone tells you that a hidden button is red. Now you only need to think about the red buttons. The clue changes the group you count. Working out a chance using a known clue is called conditional probability.
Conditional probability is a chance worked out using information we already know. Imagine six cards. Three are red. Two of those red cards have a star. A card is chosen fairly, and you are told it is red.
How likely is it to have a star? Count only the three red cards. Two have a star, so the chance is two out of three. We do not divide by all six cards, because the clue has ruled out the blue cards.
A clue can change a probability without causing anything to happen. Learning the card's colour did not put a star on it.
Conditional probability restricts a probability calculation to outcomes that satisfy a known condition. The word “given” names that condition. The probability of a star given a red card means we count within the red-card group.
Suppose ten equally likely cards include six red cards and four blue cards. Three red cards have a star. Before learning the colour, the probability of drawing a red starred card is 3/10. Given that the drawn card is red, the probability of a star is 3/6, or 1/2. The denominator changed because the relevant group changed.
Order matters in the wording. The chance of a star given red need not equal the chance of red given a star. To calculate the second chance, we would need to know how many starred cards there are altogether.
Sometimes a condition makes no difference. For a fair die, knowing that an earlier independent coin toss was heads does not change the chance of rolling a six. Independence is a property of the probability model; it is not the same as saying two events cannot happen together.
For events A and B, conditional probability is written P(A|B), read “the probability of A given B”. When P(B) is positive, the formula is P(A|B) = P(A and B)/P(B). It measures the fraction of the probability assigned to B that also belongs to A.
For example, roll a fair six-sided die. Let A mean the result is greater than 3, and B mean the result is even. The even outcomes are 2, 4 and 6. Two of these, 4 and 6, exceed 3. Therefore P(A|B) = 2/3. In the full sample space, P(A) = 3/6 = 1/2. The condition has changed the answer.
Now reverse the condition. Given A, the available outcomes are 4, 5 and 6. Two are even, so P(B|A) is also 2/3 in this particular example. Equal answers here are a consequence of the counts, not a rule that conditional probabilities can always be reversed.
The distinction becomes clear with cards. Suppose a pack has eight cards: four red and four blue. All four red cards have stars, and one blue card has a star. Then P(star|red) = 1, but P(red|star) = 4/5. Both calculations are correct because they use different conditioning groups.
Finally, conditional probability describes relationships within a stated model. It does not by itself establish causation. A useful first step is to write down exactly what is known and which outcomes remain possible.
Conditioning reallocates attention to a specified part of a probability space. For P(B) > 0, the ordinary event-based definition is P(A|B) = P(A ∩ B)/P(B). The numerator is a joint probability; the denominator normalizes the remaining probability mass so that the conditioning event B has probability 1 within the restricted calculation.
Consider two fair six-sided dice. Let B mean their sum is at most 5, and A mean the first die shows 2. The ten ordered outcomes in B are (1,1), (1,2), (1,3), (1,4), (2,1), (2,2), (2,3), (3,1), (3,2) and (4,1). Exactly three satisfy A. Thus P(A|B) = 3/10. The pairs are ordered: (1,2) and (2,1) are distinct outcomes. Forgetting this changes the weighting.
Reversal requires additional information. For the quotient-based derivation, assume both P(A) > 0 and P(B) > 0. Bayes' theorem follows by expressing the same joint probability in two ways: P(A|B)P(B) = P(B|A)P(A). Dividing by P(B) gives P(A|B) = P(B|A)P(A)/P(B). The prior probability P(A) cannot be discarded merely because P(B|A) is large. A table of counts often makes this easier to see than an unsupported percentage example.
Independence is also precise. If A and B are independent and P(B) > 0, then P(A|B) = P(A). Mutually exclusive positive-probability events are different: knowing B rules out A, making P(A|B) zero. They therefore are not independent.
The quotient definition is unavailable when P(B) = 0. More advanced conditional distributions handle some zero-probability conditions using additional mathematical structure; one should not simply divide by zero or assume a limit is unique.
In practice, trustworthy reasoning requires a defined sample space, justified probabilities and an unambiguous condition. Conditioning can improve a calculation under a good model, but it does not guarantee a correct prediction when the model or data are wrong.
Connect this idea
Read an explanation, try a Science activity, or use a related Maths skill.
Samples and possible outcomes
🖼️ Images & Media (4)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
Sources for this explanation
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.