# Probability of continious random variables that are deterministic functions of one another

$$X = \begin{cases} 1, & \text{if x \in [0,1]} \\ 0, & \text{if x \notin [0,1]} \end{cases} \\[3ex] y = g(x) = \frac{X}{2}$$

Could you please explain why $p_y(y)=p_x(2y) \neq 0, \,on\, [0, \frac{1}{2}]$ instead of [0, 1]?

From MIT press book "Ian Goodfellow and Yoshua Bengio and Aaron Courville", chapter 3 "probability and information theory", page 72:

• $X \in [0,1] \implies Y= X/2 \in [0,1/2],$ that's all. Loosely, the intuition that the authors are trying to develop is that under invertible maps, the probabilites are preserved, and not the density functions. Let $\delta x$ be very small. Note that $p(x) \delta x$ is roughly the probability that $X \in [x - \delta x, x+ \delta x]$, and so we should have $p(x) \delta x = p(g(x)) \delta g(x) \approx p(g(x)) g'(x) \delta x$ and not $p(g(x)) = p(x).$ This can be made more formal, of course. – stochasticboy321 Feb 23 '18 at 22:02

$$F_y(\chi)=P(y<\chi)=P\left(\frac x2<\chi\right)=P(x<2\chi)=F_x(2\chi).$$
$$f_y(\chi)=\frac{dF_y}{d\chi}=\frac{dF_x(2\chi)}{d\chi}=2f_x(2\chi).$$