Definition
The conditional probability of an event $B$ given event $A$ is given by \(P(B|A) = \frac{P(B \cap A)}{P(A)}.\) Conditional probability refers to the probability of one event occurring while knowing that a separate event has occurred. An example of a question asking for a conditional probability could be, given that I have already eaten a cupcake, what is the probability that I will eat a 2nd cupcake (good odds there)?
Intuition
The formula above gives us the conditional probability, but why?
In the numerator, we have $P(B \cap A)$, which is the intersection of the events $A$ and $B$, i.e., the event where both $A$ and $B$ occur. What may not be immediately obvious is why, to get the conditional probability of $B$ given $A$, we then divide the intersection by $P(A)$.
In the diagram above, we have the [sample space] $S$ with two events $A$ and $B$ that intersect. When we want to figure $P(B \vert A)$, we already know that $A$ has occurred, so our sample space effectively shrinks down to the circle representing event $A$. The formula is the proportion of event $A$ that is also event $B$. If we didn’t divide by $P(A)$, then we would fail to exclude outcomes that are only in $B$ and not in $A$, which would be wrong because $A$ has already happened.
Examples
Example 1
Suppose $P(A) = 0.7$ and $P(A \cap B) = 0.1$. Then
\[P(B|A) = \frac{P(A \cap B)}{P(A)} = \frac{0.1}{0.7} = 1/7.\]