Error propagation (II): Changing variables

7.2. Error propagation (II): Changing variables#

Let us consider a single variable \(X\) and a function \(Y=f(X)\) that offers a unique mapping between \(X\) and \(Y\). Assume that we know \(X\) via a PDF \(\pdf{x}{I}\). What is the relation between \(\pdf{x}{I}\) and \(\pdf{y}{I}\)? In this scenario the extraction of \(\pdf{y}{I}\) turns out to be an exercise in transformation of variables.

Consider a point \(x^*\) and a small interval \(\delta x\) around it. The probability that \(X\) lies within that interval can be written

(7.11)#\[\begin{equation} \pdf{x^* - \frac{\delta x}{2} \le x < x^* + \frac{\delta x}{2}}{I} \approx \pdf{x=x^*}{I} \delta x. \end{equation}\]

Assume now, as stated above, that the function \(f\) maps the point \(x=x^*\) uniquely onto \(y=y^*=f(x^*)\). Then there must be an interval \(\delta y\) around \(y^*\) so that the probability is conserved

(7.12)#\[\begin{equation} \pdf{x=x^*}{I} \delta x = \pdf{y=y^*}{I} \delta y. \end{equation}\]

In the limit of infinitesimally small intervals, and with the realization that this should be true for any point \(x\), we obtain the relationship

(7.13)#\[ \pdf{x}{I} = p(y=y(x)|I) \left| \frac{dy}{dx} \right|, \]

where the term on the far right is called the Jacobian. We also note that we can inverse the transformation

(7.14)#\[ \pdf{y}{I} = \pdf{x(y)}{I} \left| \frac{dx}{dy} \right|, \]

The generalization to several variables, relating the PDF for \(M\) variables \(\{ Xx_j \}\) in terms of the same number of quantities \(\{ y_j \}\) related to them, is

(7.15)#\[ p(\{x_j\}|I) = p(\{y_j\}|I) \left| \frac{\partial (y_1, y_2, \ldots, y_M)}{\partial (x_1, x_2, \ldots, x_M)} \right|, \]

where the multivariate Jacobian is given by the determinant of the \(M \times M\) matrix of partial derivatives \(\partial y_i / \partial x_j\).

Exercise 7.4 (The standard random variable)

Find \(\pdf{z}{I}\) when \(Z = (X-\mu)/\sigma\) and \(\pdf{x}{I} = \frac{1}{\sqrt{2\pi}\sigma} \exp \left( -\frac{(x-\mu)^2}{2\sigma^2} \right)\).

Exercise 7.5 (The square root of a number)

Find an expression for \(\pdf{z}{I}\) when \(Z = \sqrt{X}\) and \(\pdf{x}{I} = \frac{1}{x_{\max} - x_{\min}}\) for \(x_{\min} \leq x \leq x_{\max}\) and 0 elsewhere. Verify that \(\pdf{z}{I}\) is properly normalized.

Summary

We have now seen the basic ingredients required for the propagation of errors: it either involves a transformation in the sense of Eq. (7.15) or an integration as in Eq. (7.4).