# PBRT - Transforming between Distributions (Section 2.4)

In the 4th edition of "Physically Based Rendering" here:

pbrt book 4th ed Section 2.4

in Section 2.4 "Transforming between Distributions", it is said "Suppose we are given a random variable $$X$$ drawn from some PDF $$p(x)$$ with CDF $$P(x)$$. Given a function $$f(x)$$ with $$y=f(x)$$, if we compute $$Y=f(X)$$, we would like to find the distribution of the new random variable $$Y$$. In this case, the function $$f(x)$$ must be a one-to-one transformation; if multiple values of $$x$$ mapped to the same $$y$$ value, then it would be impossible to unambiguously describe the probability density of a particular $$y$$ value."

Have I misunderstood, or is this incorrect ? For example, if $$X\sim U([-1,1])$$ is uniformly distributed on $$[-1,1]$$ and $$f(x) = |x|$$, then $$Y=f(X)$$ is uniformly distributed on $$[0,1]$$, isn't it ? If so, then ought the book instead to say something to the effect that $$f$$ being one-to-one is "a useful hypothesis for some of the results that will follow" ?

• Yes, they are wrong. Generally the book is not very good when it comes to mathematics. You would have to look elsewhere if you want to find a mathematically rigorous exposition. From my experience the book is mainly useful as a companion to the code in pbrt. Commented Jul 2 at 15:07
• Thank you, @lightxbulb. I am finding the book very useful in lots of ways, and I'm grateful that the authors have made it available free of charge. Your comment encourages me to find the mathematical rigour elsewhere. So far Veach's thesis seems like a good starting point for that. Commented Jul 2 at 15:32

I wouldn't say they are completely "wrong" here. Yes, PBRT in general is quite blunt about mathematical details, but their mathematics are sound (otherwise, the results of PBRT would most likely not even be correct in the first place). However, as you said, in the case of rendering, it is often quite useful to jump back and forth between distributions. The only remark this explanation makes is that if $$f(x)$$ is not a bijection, then there is no way to jump "back", only forward.
• They are completely wrong: "if multiple values of $x$ mapped to the same $y$ value, then it would be impossible to unambiguously describe the probability density of a particular $y$ value." Not only is this statement wrong, but it is misleadingly suggesting that somehow densities from non-injective functions are ill-defined. It's a wrong statement plus a wrong explanation. Commented Jul 6 at 15:21