Tutorials › Statistical Theory I - Probability and Distribution Theory › Polynomial Transformations and Root Summation

Many-to-One Transformations · Tutorial 425 of 994

Polynomial Transformations and Root Summation

Learn to compute polynomial transformation densities by locating all real roots and weighting each by the reciprocal derivative magnitude.

Intermediate 10 min read

What You'll Learn

  • Apply the root-summation density formula to a nonconstant polynomial.
  • Solve quadratic preimage equations and determine which roots lie in the support.
  • Count the real inverse branches of a cubic on its monotone intervals.
  • Calculate density contributions using the original density and polynomial derivative.
  • Check support, normalization, and common errors in many-to-one transformations.

Why polynomial transformations require all roots

A polynomial can send several distinct values of a continuous random variable to the same output. For example, the equation \(x^2+x=y\) can have two real solutions. The output density at \(y\) must account for probability arriving from both solutions, with each contribution adjusted for how quickly the polynomial changes near that input.

The basic procedure is to solve \(P(x)=y\) for every real \(x\), retain the roots relevant to the distribution of \(X\), and sum their density contributions. The derivative determines the adjustment: a branch that changes slowly spreads probability over a smaller range of output values and contributes more density.

Definition: Let \(X\) be a continuous random variable with density \(f\), and let \(P\) be a nonconstant real polynomial. The transformed random variable is \(Y=P(X)\). A real preimage of \(y\) is a real solution \(x\) of \(P(x)=y\). A value \(y\) is a regular value of \(P\) if every real preimage satisfies \(P'(x)\ne 0\).

A degree-\(d\) polynomial has at most \(d\) real preimages for any \(y\), so the root sum is finite. Not every algebraic root necessarily matters: roots outside the support of \(X\) contribute zero because the density there is zero. In calculations, first find the roots, then check their locations and the value of \(f\) at each root.

The root-summation formula

Theorem: Suppose \(X\) has a density \(f\) on \(\mathbb{R}\), and \(P\) is a nonconstant polynomial. At every regular value \(y\), the density of \(Y=P(X)\), wherever the density formula is evaluated, is $$ f_Y(y)=\sum_{\substack{x\in\mathbb{R}: P(x)=y}}\frac{f(x)}{|P'(x)|}. $$ The formula specifies a density almost everywhere. At the finitely many nonregular values, its value can be chosen arbitrarily without changing the distribution.

The derivative is evaluated at each preimage separately. The absolute value is essential: a branch on which \(P\) decreases still contributes nonnegative density. If \(y\) has no real preimages, the sum is empty and equals zero.

Here is a proof that also explains why the formula covers every branch. Since \(P'\) is a nonzero polynomial, it has finitely many real zeros. These zeros partition the real line into finitely many open intervals. On each interval \(I_j\), \(P'\) has constant nonzero sign, so \(P\) is strictly monotone there and has a differentiable inverse \(g_j\) on the interval \(P(I_j)\).

The probability that \(X\) equals one of the finitely many partition points is zero, because \(X\) has a density. For any Borel set \(A\), split the event \(P(X)\in A\) over these intervals. On \(I_j\), the one-to-one change-of-variables formula gives

$$ \int_{I_j} \mathbf{1}_{\{P(x)\in A\}}f(x)\,dx = \int_{P(I_j)} \mathbf{1}_{\{y\in A\}} \frac{f(g_j(y))}{|P'(g_j(y))|}\,dy. $$

Summing over the intervals gives \(P(Y\in A)\) as the integral over \(A\) of the sum of the branch contributions. Each real preimage of a regular \(y\) lies in exactly one of these intervals, so this sum is precisely the stated root sum. The nonregular values are among the images of the finitely many zeros of \(P'\), hence form a finite set. Also, any individual output value has probability zero: its preimages form a finite set, which \(X\) hits with probability zero. Thus choices of density values at those exceptional outputs do not affect the distribution. \(\square\)

Quadratic polynomials: roots and support

For \(P(x)=ax^2+bx+c\), where \(a\ne0\), the equation \(P(x)=y\) has discriminant

$$ \Delta(y)=b^2-4a(c-y). $$

If \(\Delta(y)>0\), its two roots are \(x_+(y)=\frac{-b+\sqrt{\Delta(y)}}{2a}\) and \(x_-(y)=\frac{-b-\sqrt{\Delta(y)}}{2a}\). Differentiation gives \(P'(x)=2ax+b\). Substitution of either root yields \(P'(x_+)=\sqrt{\Delta(y)}\) and \(P'(x_-)=-\sqrt{\Delta(y)}\). Therefore, at such regular values,

$$ f_Y(y)= \frac{f(x_+(y))}{\sqrt{\Delta(y)}}+ \frac{f(x_-(y))}{\sqrt{\Delta(y)}}. $$

Each term is included only when its root is in the region where \(X\) can occur; equivalently, a density \(f\) that is zero off the support automatically removes irrelevant roots. If \(\Delta(y)<0\), there are no real roots and the density is zero. The case \(\Delta(y)=0\) is a critical value and is not covered by this pointwise formula.

Worked Example: A Quadratic With Two Supported Roots

Let \(X\) have density \(f(x)=1/2\) on \((-2,-1)\cup(0,1)\), and zero elsewhere. Find the density of \(Y=X^2+X\).

Step 1: Find the output range and roots. On \((-2,-1)\), \(P'(x)=2x+1<0\), so \(P\) decreases from 2 to 0. On \((0,1)\), \(P'(x)=2x+1>0\), so \(P\) increases from 0 to 2. For each \(0<y<2\), both intervals contain one preimage. Solving \(x^2+x-y=0\) gives

$$ x_-(y)=\frac{-1-\sqrt{1+4y}}{2}\in(-2,-1), \qquad x_+(y)=\frac{-1+\sqrt{1+4y}}{2}\in(0,1). $$

Step 2: Calculate both contributions. At these roots, \(2x_-(y)+1=-\sqrt{1+4y}\) and \(2x_+(y)+1=\sqrt{1+4y}\). Thus each contribution is \((1/2)/\sqrt{1+4y}\), and

$$ f_Y(y)=\frac{1}{\sqrt{1+4y}},\quad 0<y<2; \qquad f_Y(y)=0\quad\text{outside }[0,2]. $$

As a normalization check,

$$ \int_0^2\frac{1}{\sqrt{1+4y}}\,dy =\left[\frac{\sqrt{1+4y}}{2}\right]_0^2 =\frac{3-1}{2}=1. $$

The two roots contribute equally here because the input density is the same on both intervals and the derivative magnitudes match. In another model, the contributions need not be equal.

Cubic polynomials: count the branches before summing

A cubic can have one or three distinct real preimages, depending on the output value. To count them reliably, find the real zeros of \(P'\). They divide the input line into intervals on which \(P\) is monotone. The range of each interval tells whether it contains a root of \(P(x)=y\). Once all roots have been found, use the root-summation formula; do not assume that every output has the same number of preimages.

Worked Example: Three Contributions for a Cubic

Let \(X\sim \operatorname{Uniform}(-2,2)\), so \(f(x)=1/4\) on \((-2,2)\), and set \(Y=X^3-3X\). Find the density at \(y=0\), and describe the root-sum formula on the interior of the output range.

Step 1: Identify the branches. Here \(P'(x)=3x^2-3\), which is zero at \(-1\) and \(1\). The polynomial increases on \((-2,-1)\), decreases on \((-1,1)\), and increases on \((1,2)\). Its endpoint and turning-point values are \(P(-2)=-2\), \(P(-1)=2\), \(P(1)=-2\), and \(P(2)=2\). Consequently every \(y\in(-2,2)\) has one preimage on each of the three intervals.

Step 2: Write the density at a regular interior value. If those three roots are \(x_1(y),x_2(y),x_3(y)\), then

$$ f_Y(y)=\frac14\left( \frac{1}{|3x_1(y)^2-3|} +\frac{1}{|3x_2(y)^2-3|} +\frac{1}{|3x_3(y)^2-3|} \right),\quad -2<y<2, $$

where each \(x_i(y)\) solves \(x^3-3x=y\). Outside \([-2,2]\) there are no supported preimages, so the density is zero.

Step 3: Evaluate at zero. Factoring \(x^3-3x=x(x^2-3)\) gives the three roots \(0,\sqrt{3},-\sqrt{3}\). The absolute derivative is 3 at zero and 6 at each of the other roots. Therefore

$$ f_Y(0)=\frac14\left(\frac13+\frac16+\frac16\right) =\frac14\cdot\frac23=\frac16. $$

All three roots lie in the support, so omitting either outer root would give an incorrect density.

Worked Example: Unequal Contributions Under a Normal Input

Let \(X\sim N(0,1)\), with density \(\phi(x)=(2\pi)^{-1/2}e^{-x^2/2}\), and let \(Y=X^3-X\). Find \(f_Y(0)\).

The equation \(x^3-x=0\) factors as \(x(x-1)(x+1)=0\), so its real roots are \(-1,0,1\). The derivative is \(P'(x)=3x^2-1\), whose absolute values at those roots are 2, 1, and 2, respectively. The root sum is

$$ \begin{aligned} f_Y(0) &=\frac{\phi(-1)}{2}+\frac{\phi(0)}{1}+\frac{\phi(1)}{2}\\ &=\phi(0)+\phi(1)\\ &=\frac{1+e^{-1/2}}{\sqrt{2\pi}}. \end{aligned} $$

The contributions are not equal: the central root has both a different derivative magnitude and a different input density. This example shows why counting roots alone is not enough; each root must be weighted using both \(f(x)\) and \(|P'(x)|\).

Practical checks and a common mistake

For a polynomial transformation, a reliable calculation follows a short sequence: find the real roots of \(P(x)=y\), check which roots can occur under the distribution of \(X\), evaluate the original density at each, divide each value by the corresponding absolute derivative, and add. The support of \(Y\) is determined by the image under \(P\) of the support of \(X\); it is not automatically the entire range of the polynomial on the real line.

1
Find all real preimages.
Solve \(P(x)=y\), not just one inverse equation or one preferred branch.
2
Check the input support.
Discard roots outside the region where \(X\) can occur, or retain them with \(f(x)=0\).
3
Weight and sum.
For every retained root, calculate \(f(x)/|P'(x)|\), then add the contributions.
4
Check the result.
Confirm that the density vanishes outside the transformed support and that its integral is one.

Common mistake: using a signed derivative or keeping only one root. If a decreasing branch has \(P'(x)<0\), treating \(1/P'(x)\) as a density contribution would produce a negative value, which is impossible. The change of variables uses \(1/|P'(x)|\). A separate error is to solve \(P(x)=y\) and select only one of several real roots. Probability from every supported branch reaches the same output, so every such root must appear in the sum.

The root-summation method makes polynomial transformations systematic even when a global inverse does not exist. It also provides a useful check on calculations: a proposed density must account for every inverse branch, respect the transformed support, and assign nonnegative contributions. At outputs where \(P'\) vanishes, the regular-value formula does not apply pointwise; those values require separate attention rather than substitution into a denominator of zero.

Check Your Understanding

Use the root-summation method to answer each question.

  1. For \(P(x)=x^2-4\), how many real preimages does a value \(y>-4\) have? What happens when \(y<-4\)?
  2. Suppose \(X\) has density \(f\) and \(P(x)=x^2+x\). State the contribution from each real root of \(P(x)=y\), when the roots are distinct.
  3. For \(P(x)=x^3-3x\), identify the intervals on which the polynomial is monotone and the number of preimages for \(y\in(-2,2)\).
  4. Why must the derivative magnitude, rather than the signed derivative, appear in a density contribution?
  5. If a polynomial equation has three real roots but only two lie in the support of \(X\), how should the density sum be formed?