Loading...
Loading...
Math for CS · Axiom Academy
Updating beliefs with evidence What is Conditional Probability? Conditional probability is the probability of an event occurring given that another event has already occurred. It answers: "What's the likelihood of A, given that we know B is true?" We can only compute this when P(B) > 0 (B is not impossible). Rearranging the conditional probability formula gives us: This is the multiplication rule: the probability of both A and B is the probability of B times the probability of A given B. General Multiplication Rule (Chain Rule) If events B₁, B₂, ..., Bₙ partition the sample space (they're disjoint and exhaustive), then: This "law of total probability" lets us compute P(A) by conditioning on all possible cases. Two events A and B are independent if knowing that B occurred doesn't change the probability of A: Equivalently (and often easier to check): Computing Conditional Probabilities Doctors use conditional probability to interpret test results. A positive test doesn't guarantee disease—we need P(disease | positive test). Spam filters compute P(spam | contains certain words). Email classification is conditional probability in action. In Las Vegas algorithms, we might condition on: "Given that we've checked the first k elements, what's the probability the algorithm terminates?" P(A) = Σ P(A|Bᵢ) × P(Bᵢ) (law of total probability) A and B independent: P(A ∩ B) = P(A) × P(B) Axiom Academy | Probability for Computer Science
This is the written version of the interactive lesson above. See the full Math for CS course.