<p>I wouldn't say they are completely &quot;wrong&quot; 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 <span class="math-container">$f(x)$</span> is not a bijection, then there is no way to jump &quot;back&quot;, only forward.</p>
<p>This is also true for your example. Say you have two values, -x and x, then indeed, taking the absolute value of both, you can never be sure if the original value was -x or +x.</p>

CC BY-SA 4.0
2024-07-06T15:21:06.877Z
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.
lightxbulb
CC BY-SA 4.0
2024-07-05T22:55:35.543Z
2024-07-05T22:55:35.543Z
Matthias K.
<p>In the 4th edition of &quot;Physically Based Rendering&quot; here:</p>
<p><a href="https://www.pbr-book.org/4ed/Monte_Carlo_Integration/Transforming_between_Distributions" rel="nofollow noreferrer">pbrt book 4th ed Section 2.4</a></p>
<p>in Section 2.4 &quot;Transforming between Distributions&quot;, it is said &quot;Suppose we are given a random variable <span class="math-container">$X$</span> drawn from some PDF <span class="math-container">$p(x)$</span> with CDF <span class="math-container">$P(x)$</span>. Given a function <span class="math-container">$f(x)$</span> with <span class="math-container">$y=f(x)$</span>, if we compute <span class="math-container">$Y=f(X)$</span>, we would like to find the distribution of the new random variable <span class="math-container">$Y$</span>. In this case, the function <span class="math-container">$f(x)$</span> must be a one-to-one transformation; if multiple values of <span class="math-container">$x$</span> mapped to the same <span class="math-container">$y$</span> value, then it would be impossible to unambiguously describe the probability density of a particular <span class="math-container">$y$</span> value.&quot;</p>
<p>Have I misunderstood, or is this incorrect ? For example, if <span class="math-container">$X\sim U([-1,1])$</span> is uniformly distributed on <span class="math-container">$[-1,1]$</span> and <span class="math-container">$f(x) = |x|$</span>, then <span class="math-container">$Y=f(X)$</span> is uniformly distributed on <span class="math-container">$[0,1]$</span>, isn't it ? If so, then ought the book instead to say something to the effect that <span class="math-container">$f$</span> being one-to-one is &quot;a useful hypothesis for some of the results that will follow&quot; ?</p>

CC BY-SA 4.0
2024-07-02T15:07:06.350Z
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.
lightxbulb
CC BY-SA 4.0
2024-07-02T15:32:21.383Z
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.
Simon
<mathematics><pbrt><distribution>
PBRT - Transforming between Distributions (Section 2.4)
Simon
# PBRT - Transforming between Distributions (Section 2.4)

(Asked by: username_0 on 2024-07-02)

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

[pbrt book 4th ed Section 2.4](https://www.pbr-book.org/4ed/Monte_Carlo_Integration/Transforming_between_Distributions)

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" ?

**Tags:** mathematics, pbrt, distribution

> **Comments:**
> **username_1**: 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.  
> **username_0**: Thank you, @username_1. 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.  

---

## 1 answers

### Answer by username_2 on 2024-07-05. Score: 0

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.

This is also true for your example. Say you have two values, -x and x, then indeed, taking the absolute value of both, you can never be sure if the original value was -x or +x.

> **Comments:**
> **username_1**: 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.  

---

