St · Statistics & Probability

Find the Density of Y = 1/X When X Is Uniform on [0,1]

Published By the 9to5Science editorial team

At a glance

  1. 1. Find the support

    Since 0 < X ≤ 1 almost surely, Y = 1/X is at least 1.

  2. 2. Invert the transformation

    For y ≥ 1, the event Y ≤ y is equivalent to X ≥ 1/y.

  3. 3. Differentiate the CDF

    The resulting CDF is 1 − 1/y for y ≥ 1; differentiating gives the density.

  4. 4. Check the density

    Integrate 1/y² over [1, ∞) to verify that the total probability is 1.

If XX is uniform on [0,1][0,1] and Y=1/XY=1/X, the reciprocal transformation sends values of XX near 1 to values of YY near 1, and values of XX near 0 to large values of YY. The density is therefore supported on [1,∞)[1,\infty) and decreases as yy grows.

The density is

fY(y)={1y2,y≥1,0,y<1.f_Y(y)=\begin{cases} \dfrac{1}{y^2}, & y\ge 1,\\ 0, & y<1. \end{cases}

Find the support

A uniform random variable on [0,1][0,1] satisfies 0<X≤10<X\le 1 with probability 1. Taking reciprocals gives Y=1/X≥1Y=1/X\ge 1. There are no values below 1, while arbitrarily large values are possible when XX is close to 0.

Strictly speaking, 1/X1/X is undefined at X=0X=0. But a continuous uniform random variable equals any particular point with probability zero, including 0. You can define YY to be any value at X=0X=0 without changing its probability distribution.

Derive the density from the CDF

For y<1y<1, the event Y≤yY\le y is impossible, so FY(y)=0F_Y(y)=0. For y≥1y\ge 1, use the fact that XX is positive almost surely:

FY(y)=Pr⁡(Y≤y)=Pr⁡(1X≤y)=Pr⁡(X≥1y)=1−1y.\begin{aligned} F_Y(y) &=\Pr(Y\le y)\\ &=\Pr\left(\frac{1}{X}\le y\right)\\ &=\Pr\left(X\ge \frac{1}{y}\right)\\ &=1-\frac{1}{y}. \end{aligned}

The last equality uses the uniform distribution: for 0≤a≤10\le a\le1, Pr⁡(X≥a)=1−a\Pr(X\ge a)=1-a. Thus the full CDF is

FY(y)={0,y<1,1−1y,y≥1.F_Y(y)=\begin{cases} 0, & y<1,\\ 1-\dfrac{1}{y}, & y\ge1. \end{cases}

Differentiating wherever the CDF changes gives

fY(y)=FY′(y)=1y2,y>1.f_Y(y)=F_Y'(y)=\frac{1}{y^2},\qquad y>1.

At the boundary y=1y=1, the density can be assigned the value 11 according to the displayed formula; changing a density at a single point does not change any probabilities.

Check with the change-of-variables formula

The inverse transformation is x=1/yx=1/y, and its derivative is dx/dy=−1/y2dx/dy=-1/y^2. Since fX(x)=1f_X(x)=1 on 0≤x≤10\le x\le1, the one-to-one change-of-variables formula gives

fY(y)=fX(1/y)∣ddy1y∣=1⋅1y2,y≥1.f_Y(y)=f_X(1/y)\left|\frac{d}{dy}\frac{1}{y}\right|=1\cdot\frac{1}{y^2},\qquad y\ge1.

The absolute value matters: a density cannot be negative, even though the inverse function has a negative derivative. This method agrees with the CDF derivation.

Worked probability example

To find the probability that YY lies between 2 and 4, integrate the density:

Pr⁡(2<Y<4)=∫241y2 dy=[−1y]24=12−14=14.\begin{aligned} \Pr(2<Y<4) &=\int_2^4\frac{1}{y^2}\,dy\\ &=\left[-\frac{1}{y}\right]_2^4\\ &=\frac{1}{2}-\frac{1}{4}\\ &=\frac{1}{4}. \end{aligned}

You can check this directly using Y=1/XY=1/X: the event 2<Y<42<Y<4 is equivalent to 1/4<X<1/21/4<X<1/2. A uniform variable on an interval of length 1 falls in that interval with probability 1/2−1/4=1/41/2-1/4=1/4.

The CDF also makes tail probabilities quick to calculate. For a≥1a\ge1,

Pr⁡(Y>a)=1−FY(a)=1a.\Pr(Y>a)=1-F_Y(a)=\frac{1}{a}.

For example, Pr⁡(Y>10)=0.1\Pr(Y>10)=0.1. The tail decays slowly enough that the mean is infinite:

E[Y]=∫1∞y1y2 dy=∫1∞1y dy=∞.\mathbb{E}[Y]=\int_1^\infty y\frac{1}{y^2}\,dy =\int_1^\infty\frac{1}{y}\,dy=\infty.

Common mistakes

  • Using the wrong support: YY cannot be less than 1, because X≤1X\le1. The reciprocal becomes large, not small, near X=0X=0.
  • Forgetting the Jacobian: Substituting x=1/yx=1/y into the original density alone is not enough. The derivative factor ∣dx/dy∣=1/y2|dx/dy|=1/y^2 is required.
  • Reversing an inequality incorrectly: From 1/X≤y1/X\le y, with X>0X>0 and y>0y>0, you get X≥1/yX\ge1/y. The direction changes when taking reciprocals.
  • Treating X=0X=0 as a problem for the distribution: The expression is undefined at exactly 0, but that event has probability zero. It does not add a point mass to the distribution of YY.
  • Confusing the density with a probability: fY(y)f_Y(y) is not the probability that YY equals exactly yy. For a continuous random variable, that probability is zero; probabilities come from integrating the density over intervals.

References

  1. A First Course in Probability, Sheldon Ross

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.