Skip to content

Machine Learning & Data Science Probability Conditional Probability

github-actions[bot] edited this page Nov 22, 2025 · 1 revision

Conditional probability is a measure of the likelihood of an event occurring, given that another event has already occurred. If you have two events, $A$ and $B$ , the conditional probability of $A$ given $B$ is written as $P(A|B)$ : $$ P(A|B) = \frac{P(A\cap B)}{P(B)} $$ Where $P(A\cap B )$ is the probability of both $A$ and $B$ occurring.

Conversely, the probability of $B$ given $A$ is: $$ P(B|A) = \frac{P(A\cap B)}{P(A)} $$ If event $A$ is independent of event $B$ , then $P(B|A)$ is equal to $P(B)$.

Clone this wiki locally