Do these two texts contradict each other?
Or does it mean that not all cases where E[Y | X] = E[Y] are independent, but if X and Y are independent, then E[Y | X] = E[Y] ?
No, they do not
Unless we know that X and Y are independent, E[Y | X] = E[Y] doesn't prove they are independent. E[Y | X] = E[Y] could be just a coincidence.Or does it mean that not all cases where E[Y | X] = E[Y] are independent,
Yes, if X and Y are independent, X doesn't effect Y, and vice versa. Thefore E[Y | X] = E[Y]but if X and Y are independent, then E[Y | X] = E[Y] ?