# Thread: why is $P[g(X)\leq y]=P[X \leq h(y)]$ for monotonically increasing functions

1. ## why is $P[g(X)\leq y]=P[X \leq h(y)]$ for monotonically increasing functions

Above is a theorem for how one can find the pdf to the inverse function. I have a problem with the part $P[g(X) \leq y]=P[X \leq h(y)]$

My question is the underlined part below.

If $g$ and $h$ are inverses of each other and ar monotonically increasing then:$$g(X)\leq y\implies X=h(g(X))\leq h(y)$$and:

$$X\leq h(y)\implies g(X)\leq g(h(y))=y$$

So we have $$g(X)\leq y\iff X\leq h(y)$$or equivalently:

$$\{g(X)\leq y\}=\{X\leq h(y)\}$$and consequently:$$\mathsf P(g(X)\leq y)=\mathsf P(X\leq h(y))$$

How can one just use the equality sign? Why would the fraction of outcomes be the same after you have used the inverse? Can someone prove this mathematically? That is why is $P(a \leq b) = P(h(a) \leq h(b))$ for a monotonically increasing function? Can someone prove that part of the theory?

2. ## Re: why is $P[g(X)\leq y]=P[X \leq h(y)]$ for monotonically increasing functions

Who is X? Why, X is a random variable; i.e. a function from an underlying probability space $\Omega$ to the reals.

$$\{g(X)\leq y\}=\{X\leq h(y)\}$$
You proved the equality of the two events (subsets of $\Omega$). So the probability of the two events is the same. I don't see what your problem is.

3. ## Re: why is $P[g(X)\leq y]=P[X \leq h(y)]$ for monotonically increasing functions

The proof in my post is taken from someone else so that might be the problem that I don't get it all myself. I will try to get to my problem by an example. Lets say $g(x)=x^2$ hence $h(y)=\sqrt{y}$. So first we write $P(g(x) \leq y)$ and we should have that $P(g(x) \leq y)=P(h(y) \leq x$. This means $P(x^2 \leq y)=P(\sqrt{y} \leq x$. Now lets define that y goes from 0 to 10 and that we want to find P for y from 0 to 4.32. $P(x^2 \leq 4.32)$. How would I advance further with this example?

4. ## Re: why is $P[g(X)\leq y]=P[X \leq h(y)]$ for monotonically increasing functions

$P(g(x)\leq y)$
Now my question is: who are $x$ and $y$? You can find a probability only of an event! So I assume as before that $x$ (should be written as $X$) is a random variable. When you say $y$ ranges from 0 to 10, I guess you want the probability of the event $\{0\leq g(X)\leq 10\}$. Assuming again that function g is increasing, this is the probability of event $\{h(0)\leq X\leq h(10)\}$

5. ## Re: why is $P[g(X)\leq y]=P[X \leq h(y)]$ for monotonically increasing functions

$P(x^2 \leq 4.32)$ and $h(o)=\sqrt{0}=0$ so $P(h(0) \leq x)\: \:$ $x=\sqrt{4.32}=2.078\: \:$ $h(10)=\sqrt{10}=3.16$. Then $P(h(0) \leq 2.078)=\frac{2.078}{3.16}=0.65$ and $P(x^2 \leq 4.32)=\frac{4.32}{10}=0.43$. I dont get the two probabilites as equal. Can someone do the calculations?

6. ## Re: why is $P[g(X)\leq y]=P[X \leq h(y)]$ for monotonically increasing functions

My second attempt would be something like this. We look at the standard normal distribution with $\mu=0$ and $\sigma=1$. Then we apply integration limits 0 to 10 for $x$.

$\int_{0}^{10} \frac{1}{\sqrt{2 \pi}} e^-{\frac{x^2}{2}} dx=1.25$

and for the inverse $\sqrt{x}$ 0 to $\sqrt{10}=3.16$

$\int_{0}^{3.16} \frac{1}{\sqrt{2 \pi}} e^-{\frac{\sqrt{x}^2}{2}} dx=1.59$

7. ## Re: why is $P[g(X)\leq y]=P[X \leq h(y)]$ for monotonically increasing functions

Your original post asked a question about the distribution of a r.v. g(X) (of course X is a r.v.) where function g is monotonic. The function $g(x)=x^2$ is not monotonic.

Let $f(x)={1\over \sqrt{2\pi}}\exp(-x^2/2)$, the density of a standard normal N(0,1) r.v. X

$$\int_0^{10}f(x)dx$$

This integral represents the probability of the event $(0\leq X\leq 10)$, which of course must be a real number between 0 and 1. So it's definitely not 1.25. This integral (probability) is very close to .5

Now you seem to want the probability of $(0\leq X^2\leq10)$. This event is the same as $(-\sqrt{10}\leq X\leq \sqrt{10})$. So its probability is
$$\int_{-\sqrt{10}}^{\sqrt{10}}f(x)dx\approx0.998$$

8. ## Re: why is $P[g(X)\leq y]=P[X \leq h(y)]$ for monotonically increasing functions

Originally Posted by johng
Your original post asked a question about the distribution of a r.v. g(X) (of course X is a r.v.) where function g is monotonic. The function $g(x)=x^2$ is not monotonic.

Let $f(x)={1\over \sqrt{2\pi}}\exp(-x^2/2)$, the density of a standard normal N(0,1) r.v. X

$$\int_0^{10}f(x)dx$$

This integral represents the probability of the event $(0\leq X\leq 10)$, which of course must be a real number between 0 and 1. So it's definitely not 1.25. This integral (probability) is very close to .5

Now you seem to want the probability of $(0\leq X^2\leq10)$. This event is the same as $(-\sqrt{10}\leq X\leq \sqrt{10})$. So its probability is
$$\int_{-\sqrt{10}}^{\sqrt{10}}f(x)dx\approx0.998$$
But where is the equality $P[g(X) \leq y]=P[X \leq h(y)]$. I see that $x^2$ is not a monotonic but what about $x^3$. Its integral would be $( X\leq 1.78)$

$$\int_0^{1.78}{1\over \sqrt{2\pi}}\exp(-x^2/2)dx=0.46$$

But the operation that gives $( X\leq 1.78)$ is the same as getting to $P[X \leq h(y)]$?

9. ## Re: why is $P[g(X)\leq y]=P[X \leq h(y)]$ for monotonically increasing functions

Now you're back to events $(X\leq c)$ for a constant c. Again with f the density of a standard normal r.v. X, $$P(X\leq 10)=\int_{-\infty}^{10}f(x)dx=0.5+\int_0^{10}f(x)dx\approx 1$$
$$(X^3\leq10)=(-\infty<X\leq 10^{1/3})\text{ has probability }\int_{-\infty}^{10^{1/3}}f(x)dx\approx 0.984$$

Maybe your problem is one of simple algebra: $\sqrt{x^2}=|x|\text{ not } x$, but $\sqrt[3]{x^3}=x$.

10. ## Re: why is $P[g(X)\leq y]=P[X \leq h(y)]$ for monotonically increasing functions

Thanks for all your guidance! I believe I get the theorem now! That $P[g(X) \leq y]=P[X \leq h(y)]$ is just a normal approach to a pdf $f_x$. And we can then rewrite $F_x$ into $F_y$ in a general way. And after that obtaining the derivative of $F_x$ and $F_y$ and by that obtaining a new way to write $f_y$.