For a basic intuition of the conditional probability formula, I always like using a two way table. Let's say there are 150 students in a yeargroup, of whom 80 are female and 70 male, each of whom must study exactly one language course. The two-way table of students taking different courses is:
| French German Italian | Total
-------- --------------------------- -------
Male | 30 20 20 | 70
Female | 25 15 40 | 80
-------- --------------------------- -------
Total | 55 35 60 | 150
Given that a student takes the Italian course, what is the probability they are female? Well the Italian course has 60 students, of whom 40 are females studying Italian, so the probability must be:
P(F|Italian)=n(F∩Italian)n(Italian)=4060=23
where n(A) is the cardinality of the set A, i.e. the number of items it contains. Note that we needed to use n(F∩Italian) in the numerator and not just n(F), because the latter would have included all 80 females, including the other 40 who do not study Italian.
But if the question were flipped around, what is the probability that a student takes the Italian course, given that they are female? Then 40 of the 80 female students take the Italian course, so we have:
P(Italian|F)=n(Italian∩F)n(F)=4080=12
I hope this provides intuition for why
P(A|B)=n(A∩B)n(B)
Understanding why the fraction can be written with probabilities instead of cardinalities is a matter of equivalent fractions. For example, let us return to the probability a student is female given that they are studying Italian. There are 150 students in total, so the probability that a student is female and studies Italian is 40/150 (this is a "joint" probability) and the probability a student studies Italian is 60/150 (this is a "marginal" probability). Note that dividing the joint probability by the marginal probability gives:
P(F∩Italian)P(Italian)=40/15060/150=4060=n(F∩Italian)n(Italian)=P(F|Italian)
(To see that the fractions are equivalent, multiplying numerator and denominator by 150 removes the "/150" in each.)
Ωn(Ω)
P(A|B)=n(A∩B)n(B)=n(A∩B)/n(Ω)n(B)/n(Ω)=P(A∩B)P(B)