# Can we say that 2 random variables $(X, Y)$ are independent if $P(X \mid Y=y)$ is a function without $y$

Discrete Case:

Random variable $X, Y$ are independent if $P(X \mid Y=y)$ is a function (which can be deemed as pmf for random variable $X \mid Y$) without $y$.

Continuous Case:

Random variable $X, Y$ are independent if $f(X \mid Y=y)$ is a function (which can be deemed as pdf for random variable $X \mid Y$) without $y$.

It seems to be true and I came across the use of that in many context. However, I cannot find any reference of the formalized theorem about it?

Could anyone direct me any reliable reference?

Update: Are there any non-Measure reference on such topic?

-
what is $P(X|Y=y)$, a probability? density function? – Sasha Feb 22 '13 at 13:17
I guess, a random variable, and perhaps its meant that their density functions altogether are independent from $y$. – Berci Feb 22 '13 at 13:56
@Sasha Hopefully I made it clearer after edit. – colinfang Feb 22 '13 at 14:57

I suppose you mean the following: Let $(\Omega, \Sigma, P)$ be a probability space and for simplicity assume that $X,Y$ take their values in $(\mathbb{R},\mathcal{B}(\mathbb{R}))$ (any other measurable spaces, even different ones for each variable would be fine). Let $P(\cdot | Y=-):\: \Sigma \times \mathbb{R} \rightarrow [0,1]$ be a measurable function for fixed first variable such that $P(\cdot | Y=-) \circ (\mathrm{id_\Sigma},Y):\: \Sigma \times \Omega \rightarrow [0,1]$ is a regular conditional probability given $Y$. Then $P(X \in \cdot | Y=-):\: \mathcal{B}(\mathbb{R}) \times \mathbb{R} \rightarrow [0,1], P(X \in A | Y=y) := P(\{X \in A\} | Y=y)$ defines the conditional distribution of $X$ given $Y=-$. And your claim is that $X,Y$ are independent iff this map is constant in the second variable.
If $X,Y$ are independent, then $$\int_{\{Y \in B\}} {P(X \in A)} \mathrm{d}P =P(X \in A) P(Y \in B) = P(X \in A, Y \in B) = \int_{\{Y \in B\}} {P(\{X \in A\} | \sigma(Y)) \mathrm{d}P}$$ for all $A,B \in \mathcal{B}(\mathbb{R})$, so by definition of the conditional probability, we have for all $A \in \mathcal{B}(\mathbb{R})$: $P(\{X \in A\} | \sigma(Y)) = P(X \in A)$ P-a.s. But then $P(\{X \in A\}|Y=-)$ can be chosen to be constant $=P(X \in A)$.
If $P(X \in \cdot | Y=-)$ is constant for fixed first variable, we must have $$P(X \in A | Y=y_0) \cdot P(Y \in B) = \int_B {P(X \in A | Y =y)} \mathrm{d}P_Y(y) = \int_{\{Y \in B\}} {P(X \in A | \sigma(Y))} \mathrm{d}P = P(X\in A, Y \in B)$$ for all $y_0 \in \mathbb{R}$, $A,B \in \mathcal{B}(\mathbb{R})$. But then choosing $B=\mathbb{R}$, we see that $P(X \in A | Y=y_0) = P(X \in A)$, and the independence follows.