24 min total

Probability

Conditional probability & Bayes

Conditional probability & Bayes

Conditioning changes the population we are considering. Once an event is known to have happened, outcomes outside that event no longer contribute.

Conditional probability and the chain rule

The chain rule works without independence, whenever the conditional probabilities are defined. It is the basis of a probability tree: multiply along a branch and add mutually exclusive branches.

Independence

Events and are independent when . When , this is equivalent to . Mutually exclusive events with positive probabilities are not independent: seeing one rules out the other.

Conditional independence given means . It neither follows from, nor generally implies, unconditional independence. For three or more events, pairwise independence is weaker than mutual independence.

Total probability

If the events partition the sample space, break into these non-overlapping cases. Omit zero-probability cases when writing conditional probabilities.

The same calculation works inside another event: replace each probability by a probability conditional on .

Bayes’ rule

The prior weights each possible explanation before the observation. The likelihood measures how compatible the observation is with that explanation. The denominator normalizes the resulting weights into posterior probabilities.

This odds form says that the likelihood ratio multiplies the prior odds. It assumes the denominators are nonzero.

Example: a quality-control flag

Suppose 2% of components are defective. A check flags 95% of defective components and 5% of good ones. Among 10,000 components, the expected counts are 190 flagged defective items and 490 flagged good items.

The 95% detection rate is not the probability that a flagged item is defective. The prior defect rate matters because good components are much more common.

Why aggregate comparisons can reverse

Task difficultyMethod AMethod B
Easy81 / 90 = 90%19 / 20 = 95%
Hard1 / 10 = 10%16 / 80 = 20%
Combined82 / 100 = 82%35 / 100 = 35%

Method B has a higher success rate within each difficulty group but a lower overall rate because it was used on many more hard tasks. This is Simpson’s paradox. Before interpreting an aggregate difference, inspect how the groups were mixed; the table alone does not establish a causal effect.