The Probability distribution of Random variable of Random variable In my understanding, random variable is a measurable function from a probability space to a measurable space. Suppose $X$ is a random variable from $(A, \sigma_{A},P_A)$ to $(B,\sigma_{B})$. And $Y$ is a random variable from $(B, \sigma_{B}, P_B)$ to $(C, \sigma_{C})$.
Then $Y(X)$ is a random variable from $A$ to $C$. The problem is here, in the space $B$, we can induce probability from $A$ by random variable $X$, s.t., $P_{B}'(I) = P_A(X^{-1}(I))$.
Also, random variable $Y$ use the probability measure $P_B$, then if we want to calculate the probability distribution of $Y(X)$, what probability should be used, $P_B'$ or $P_B$, or both?  
 A: $Y(X)$ doesn't mean anything. You can't define the composition of random variables. What you can do is compose a random variable $X$ by a measurable function $f$ (provided the $\sigma$ algebras are the same) : $f(X)$.
So in your example, there are two different objects, measurable functions and random variables :
-the measurable functions $f$ from $(A,\sigma_A)$ to $(B,\sigma_B)$ and $g$ from $(B,\sigma_B)$ to $(C,\sigma_C)$. Since B uses the same $\sigma$-algebra, the function $g \circ f$ is measurable from $(A,\sigma_A)$ to $(C,\sigma_C)$.
-the random variable when you add a probability distribution to the measurable spaces. So if you add $P_A$ to $(A,\sigma_A)$, the measurable function $f$ from $(A,\sigma_A)$ to $(B,\sigma_B)$ induces a random variable we can write $X$. Now since we also have a measurable function $g \circ f$ from $(A,\sigma_A)$ to $(C,\sigma_C)$, it also induces another random variable that we can write $X'$ or more usually $g(X)$. And if you add $P_B$ to $(B,\sigma_B)$, function $g$ induces a random variable we'll write $Y$.
But the composition $Y(X)$ doesn't makes any sense.
