1. Change of Variable Theorem
Setup. Assume we have input with distribution , a function , output , and has distribution .
Example (Linear transformation of a uniform variable).
Given that
we have
2. General Derivation
- Given point from distribution , point from distribution , and known transformation .
- Take a small volume around to get , and accordingly .
- Since and are small, we can assume is uniformly distributed, and so is .
- Moreover, since is transformed from , the probability mass of the small volume should be preserved:
Thus,
As long as is given, is fixed, so we can get from .
3. Multidimensional Formula
Theorem (Change of variables formula).
3.1 More Mathematical Form
Assume that we have a mapping rule over random variables and . It can be proved that
Note: Intuition
Personally I would say that although the random variable has been transformed from one to another, in a grand view of an event happening, the shift in space would not affect the probabilities. Thus this equation holds. Li Hongyi’s explanation is that if we scale down to a very small area and , then both approximately follow a uniform distribution, with the same total probability mass.
Thus we get the change of variables formula:
where is required to be invertible and differentiable.