Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

Conditional probability

New information changes the odds. The probability that it rained, given that the ground is wet, is very different from the probability that it rained out of the blue. Conditional probability captures exactly this: the chance of one event once you know another has happened.

The notation

We write the probability of A given B as P(A|B), read "the probability of A, given B." Knowing B narrows the world: you no longer consider the whole sample space, only the part where B is true, and you ask how much of that part also has A. Formally,

P(A|B)=P(A and B)P(B).

An example

Draw a card and suppose you are told it is a face card. What is the chance it is a king? Without the tip, a king has probability 452. But "face card" cuts the world down to 12 cards, of which 4 are kings, so P(king|face)=412=13. The extra knowledge changed the odds.

Independence

Sometimes knowing B tells you nothing about A, then the events are independent, and P(A|B)=P(A). Two separate coin tosses are independent: the first landing heads does not touch the second. For independent events the multiplication rule is simply

P(A and B)=P(A)×P(B),

so two heads in a row have probability 12×12=14.

A common trap

The gambler's fallacy (believing a run of reds makes black "due") is a failure to see independence: the wheel has no memory. The opposite error is treating dependent events as independent, like assuming two components fail independently when a common cause can down both. Conditional probability is the tool that keeps these straight, and it leads directly to the most powerful idea in the subject: turning P(B|A) into P(A|B) with Bayes' theorem.