Quick Check on Bayes Rule in Terms of Sets Recently, I took a quiz with a question asking me to find the conditional probability of X given Y in terms of sets.
I solved the question as:
$$Pr(X|Y) = \frac{Pr(Y|X)Pr(X)}{Pr(Y)}$$
$$Pr(X|Y) = \frac{Pr(X \cap Y)}{Pr(Y)}$$
The answer was revealed to be &quot;the probability of the intersection of X and Y, divided by the probability of X.&quot; Have I made a mistake somewhere? Any way I think about it, $Pr(Y)$ should be the denominator.
Let's take definition of conditional probability  of X given Y, when $P(Y) \gt 0$
$$P(X|Y)=\frac{P(X \cap Y)}{P(Y)}\quad (1)$$
Obviously, when $P(X) \gt 0$ we have
$$P(Y|X)=\frac{P(Y \cap X)}{P(X)}\quad (2)$$
Now solving $P(Y \cap X)$ from second $P(Y \cap X) =P(Y|X) \cdot P(X)$ and putting it in (1), using $Y \cap X = X \cap Y$, gives
$$P(X|Y)=\frac{P(X \cap Y)}{P(Y)}=\frac{P(Y|X) \cdot P(X)}{P(Y)}\quad (3)$$
As to the your last question in comments, then generally, when $P(X) \ne P(Y)$ and $P(X \cap Y) \ne 0$, then of course $P(X|Y) \ne P(Y|X)$.
Let's take definition of conditional probability  of X given Y, when $P(Y) \gt 0$
$$P(X|Y)=\frac{P(X \cap Y)}{P(Y)}\quad (1)$$
Obviously, when $P(X) \gt 0$ we have
$$P(Y|X)=\frac{P(Y \cap X)}{P(X)}\quad (2)$$
Now solving $P(Y \cap X)$ from second $P(Y \cap X) =P(Y|X) \cdot P(X)$ and putting it in (1), using $Y \cap X = X \cap Y$, gives
$$P(X|Y)=\frac{P(X \cap Y)}{P(Y)}=\frac{P(Y|X) \cdot P(X)}{P(Y)}\quad (3)$$
As to the your last question in comments, then generally, when $P(X) \ne P(Y)$ and $P(X \cap Y) \ne 0$, then of course $P(X|Y) \ne P(Y|X)$.