If we want to predict one variable $Y$ based on another $X$, the best predictor is apparently $\mathbb{E}[Y \mid X = x]$. However, this apparently assumes two things:
The distribution is symmetric.
Which distribution needs to be symmetric? I think it is the conditional one, that is, $P(Y \mid X=x)$, because the mean would be the best predictor only if the distribution is symmetric. If it wasn't symmetric, then maybe the median would be a better predictor.
We need to know the joint distribution of $Y$ and $X$, that is, we need to know $P(X=x, Y=y)$.
Why do we strictly need to know $P(X=x, Y=y)$? I understand that, if we have the joint distribution, e.g. a table of all combinations of values of $X$ and $Y$, we can filter out all $Y$ values where $X \neq x$ and get only those where $X = x$, then we take the mean of those. Anyway, this should be the idea, which is applied in practice. But $\mathbb{E}[Y \mid X = x]$ should still be the best predictor (assuming symmetry), either we have the joint distribution or not.