Let
$X,Y$ be random variables such that take values in $\mathbb R^n$ and $\{-1,1\}$ respectively.
$f_{X|Y}$ be the conditional probability density function.
$x \in \operatorname{supp}(X)$.
I'm trying to show the equivalence of Bayes optimal classifier here in the case we use $f_{X|Y}$ rather than $\mathbb P [ Y = 1 | X = x]$. As such, I would like to ask if the following holds
$$\mathbb P [ Y = 1 | X = x] \ge 1/2 \iff f_{X|Y} (x,1) \ge f_{X|Y} (x,-1)$$
Thank you so much for your help!
No. Suppose $X$ and $Y$ are independent and $0<\mathbb P(Y=1)<1/2$.
Then $f_{X\mid Y}(x,1)=f_{X\mid Y}(x,-1)$. But $\mathbb P(Y=1\mid X=x) = \mathbb P(Y=1)<1/2$.