# Thread: change of variable: divide by zero?

1. ## change of variable: divide by zero?

Say X is a uniform random var on [-1,1], so$\displaystyle f_X(x)=1/2$ on [-1,1]. I want to find the density of $\displaystyle Y=g(X)=X^3$ over [g(-1),g(1)]=[-1,1]. g is a monotonic function so everything should be kosher. I look up the change of variable formula on wikipedia:

$\displaystyle f_Y(y)=|1/g'(g^{-1}(y))|f_X(g^{-1}(y))$

So I do some algebra:
$\displaystyle g(x)=x^3$
$\displaystyle g'(x)=3x^2$
$\displaystyle g^{-1}(y)=y^{1/3}$
so $\displaystyle g'(g^{-1}(y))=g'(y^{1/3})=3y^{2/3}$
thus
$\displaystyle f_Y(y)=|1/3y^{2/3}|*(1/2)$

But there's a singularity/asymtopes at y=0!... am I doing something wrong? The books I have conveniently choose random vars so there is no divide by zero (for example, if X was on [1,2] or some other interval where g(x) doesn't cross the x-axis, everything works fine).

2. Hello,

X is uniform over [-1,1]. So the probability that it equals 0 is 0. We say that almost surely, X is different from 0. So it's not a problem if there is a singularity at a given point.

3. Ah, ok. In fact, the integral of $\displaystyle f_Y$ on [-1,1] seems to be 1. So it is alright for density functions to have asymptotes, as long as the integral over the interval doesn't explode to infinity?

4. Well actually, there's just one discontinuity, so it doesn't affect the value of the integral.

5. The condition for that equality should be "strict monotocity". For a rigirous solution of that problem you can partition the function x^3 into two (for x>0 and x<0) where strict monotocity holds.