In these lecture notes I found this statement
This maximal risk for the Bayes classifier occurs precisely when $Y$ “contains no information” about the feature variable $X$.
How do I prove it? If I understand this right, then it occurs when $Y$ and $X$ are independent. So $P(Y=1|X=x)$ must be the max when variables are independent but I can't find any statement that proves it.