freeCodeCamp/guide/english/mathematics/conditional-probability/index.md

1.0 KiB

title
Conditional Probability

Conditional Probability

A conditional probability is the probability of an event, given some other event has already occurred. So, for example, the conditional probability of an event A is the probability that the event will occur given that an event B has already occurred. This probability is denoted as P(A|B).

The conditional probability of an event A given that an event B has occurred is written as follows:

conditional probability formula as long as P(B) > 0

NOTE - In the case where events A and B are independent (where event B has no effect on the probability of event A), the conditional probability of event A given event B is simply the probability of event A, i.e. P(A).

Resources