Transformation of random variable (uniform)

Click For Summary

Discussion Overview

The discussion revolves around the transformation of a random variable, specifically finding the density function of the random variable \(Y = X^2\) where \(X\) is uniformly distributed on the interval \((0,1)\). Participants explore the relationship between the cumulative distribution function (CDF) and the probability density function (PDF) through various approaches, including differentiation and integration.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants suggest starting with the CDF transformation \(P[Y \le y] = P[X^2 \le y] = P[X \le \sqrt{y}]\) to find the density function.
  • Others note that since \(Y\) cannot be negative, the expression \(P[X \le \sqrt{y}]\) should not include negative values, leading to discussions about the correct formulation of the probability.
  • There is mention of differentiating the CDF to obtain the PDF, with some participants proposing that the PDF can be expressed as \(f_Y(y) = f_X(\sqrt{y}) \cdot \frac{1}{2\sqrt{y}}\).
  • Some participants express confusion regarding the implications of different ranges for \(X\), such as \(U(0,10)\), and how that affects the density function.
  • There are discussions about verifying that the integral of the resulting PDF equals 1, with some participants unsure about how to derive \(f_Y(y)\) directly.
  • One participant points out that the CDF \(F_Y(y)\) can be expressed as \(P(Y \le y) = P(X \le \sqrt{y})\) and emphasizes the need to specify the range of \(y\) for the probability to be valid.
  • Corrections are made regarding the expressions for the PDF and CDF, with participants refining their understanding of the relationships between these functions.

Areas of Agreement / Disagreement

Participants generally agree on the approach of transforming the CDF to find the PDF, but there is no consensus on the specific expressions and the implications of different ranges for \(X\). The discussion remains unresolved regarding the best way to express the PDF and the conditions under which it holds.

Contextual Notes

Limitations include the dependence on the definitions of the random variables and the need for careful consideration of the ranges of \(X\) and \(Y\). Some mathematical steps remain unresolved, particularly in the context of different uniform distributions.

Jameson
Insights Author
Gold Member
MHB
Messages
4,533
Reaction score
13
This is something that when I see the work done it makes sense, but I find it difficult to do myself. I'm also aware there is an explicit formula for doing this but that involves Jacobians and a well-defined inverse, so I think it's more intuitive to do it step-by-step.

Problem: Suppose $X \text{ ~ } U(0,1)$. Find the density function of $Y=X^2$.

My attempt: I believe we should start by transforming the CDF and then differentiate to find the density function.

$P[Y \le y]=P[X^2 \le y]=P[X \le \sqrt{y}]$

Is this the direction I should be heading? From here should I try differentiating?

EDIT: I found some material on this question. It's important to note that $Y$ cannot be less than 0 so it seems that:
$$P[X \le \sqrt{y}]=P[-\sqrt{y} \le X \le \sqrt{y}]$$

Correct? Do the square roots look strange to anyone else? On my computer they look horrible.
 
Last edited:
Physics news on Phys.org
Re: Transformation of random variable

Jameson said:
This is something that when I see the work done it makes sense, but I find it difficult to do myself. I'm also aware there is an explicit formula for doing this but that involves Jacobians and a well-defined inverse, so I think it's more intuitive to do it step-by-step.

Problem: Suppose $X \text{ ~ } U(0,1)$. Find the density function of $Y=X^2$.

My attempt: I believe we should start by transforming the CDF and then differentiate to find the density function.

$P[Y \le y]=P[X^2 \le y]=P[X \le \sqrt{y}]$

Is this the direction I should be heading? From here should I try differentiating?

EDIT: I found some material on this question. It's important to note that $Y$ cannot be less than 0 so it seems that:
$$P[X \le \sqrt{y}]=P[-\sqrt{y} \le X \le \sqrt{y}]$$

Correct? Do the square roots look strange to anyone else? On my computer they look horrible.

Hi Jameson!

There is no probability for X being negative, so there's no need to include the negative part.
It is important to note that Y cannot be negative, because otherwise its square root would not be defined for part of the X domain.

And yes, that is the right direction.
Write $P[X \le \sqrt{y}]$ as an integral first, then differentiate.Btw, the square root looks passable (but slightly inconsistent) on my monitor. ;)
However, the square brackets look pretty bad, especially the right one.
 
Re: Transformation of random variable

Jameson said:
This is something that when I see the work done it makes sense, but I find it difficult to do myself. I'm also aware there is an explicit formula for doing this but that involves Jacobians and a well-defined inverse, so I think it's more intuitive to do it step-by-step.

Problem: Suppose $X \text{ ~ } U(0,1)$. Find the density function of $Y=X^2$.

My attempt: I believe we should start by transforming the CDF and then differentiate to find the density function.

$P[Y \le y]=P[X^2 \le y]=P[X \le \sqrt{y}]$

Is this the direction I should be heading? From here should I try differentiating?

EDIT: I found some material on this question. It's important to note that $Y$ cannot be less than 0 so it seems that:
$$P[X \le \sqrt{y}]=P[-\sqrt{y} \le X \le \sqrt{y}]$$

Correct? Do the square roots look strange to anyone else? On my computer they look horrible.

Excellent!... differentiating the probability You obtain the p.d.f. of $Y=X^{2}$... it is important to say that You arrive to the same result if X is uniformley distributed in [0,1] or X is uniformly distributed in [-1,1]...Kind regards $\chi$ $\sigma$
 
Re: Transformation of random variable

I like Serena said:
Hi Jameson!

There is no probability for X being negative, so there's no need to include the negative part.
It is important to note that Y cannot be negative, because otherwise its square root would not be defined for part of the X domain.

And yes, that is the right direction.
Write $P[X \le \sqrt{y}]$ as an integral first, then differentiate.

I think that's the bit that was confusing me. I've seen a few solutions to this that all contain the $P[-\sqrt{y} \le X]$ term and it somehow disappears, but that's just because $P[X] \ge 0$.

So for the domain of $X$, this becomes $P[X \le \sqrt{y}]$ and after differentiating I think we end up with $\frac{1}{2 \sqrt{y}}$ however, I have seen an explanation that say the derivative is in fact:
$$f_{X}(\sqrt{y}) \cdot \frac{1}{2 \sqrt{y}}$$
Is that a more general way to think of it? How do I apply $f_{X}(\sqrt{y})$? I don't think I understand at how how we used that $X \text{ ~ } U(0,1)$. What if $X \text{ ~ } U(0,10)$?

I'm getting closer, thank you both!
 
Re: Transformation of random variable

Jameson said:
I think that's the bit that was confusing me. I've seen a few solutions to this that all contain the $P[-\sqrt{y} \le X]$ term and it somehow disappears, but that's just because $P[X] \ge 0$.

So for the domain of $X$, this becomes $P[X \le \sqrt{y}]$ and after differentiating I think we end up with $\frac{1}{2 \sqrt{y}}$ however, I have seen an explanation that say the derivative is in fact:
$$f_{X}(\sqrt{y}) \cdot \frac{1}{2 \sqrt{y}}$$
Is that a more general way to think of it? How do I apply $f_{X}(\sqrt{y})$? I don't think I understand at how how we used that $X \text{ ~ } U(0,1)$. What if $X \text{ ~ } U(0,10)$?

I'm getting closer, thank you both!

If $X \text{ ~ } U(0,10)$, then with $0 \le x \le 10$ you get $$P[X \le x] = \int_0^x f_X(x)dx = \int_0^x \frac 1 {10-0} dx = \frac x {10}$$.

And by differentiating $$P[X \le x] = \frac x {10}$$, we find $$f_X(x) = \frac 1 {10}$$, what we already expected of course.

So you need to differentiate after replacing $x$ with $\sqrt y$ (and of course you need to use $U(0,1)$ instead of $U(0,10)$).
 
Re: Transformation of random variable

Ok, that makes sense. The range of $X$ will affect the density so it will add some scaling factor to the answer.

$$ P[X \le \sqrt{y}]=F_{X}(\sqrt{y})=\int_{0}^{\sqrt{y}}\frac{1}{1-0}dx$$

$$ f_{X}(\sqrt{y})=F'_{X}(\sqrt{y})=\frac{1}{2 \sqrt{y}}$$

Look good? :)

EDIT: I see another way to do it now. I was right before that the answer is also $f_{X}(\sqrt{y}) \cdot \frac{1}{2 \sqrt{y}}$. Now I should just apply the fact that the PDF is 1 in the given region and I get the same answer.
 
Last edited:
Re: Transformation of random variable

Jameson said:
Ok, that makes sense. The range of $X$ will affect the density so it will add some scaling factor to the answer.

$$ P[X \le \sqrt{y}]=F_{X}(\sqrt{y})=\int_{0}^{\sqrt{y}}\frac{1}{1-0}dx$$

$$ f_{X}(\sqrt{y})=F'_{X}(\sqrt{y})=\frac{1}{2 \sqrt{y}}$$

Look good? :)

Excellent!
(Learning from $\chi$ $\sigma$. ;))

Did you verify that the integral of $f_Y(y)$ for all possible values of y is equal to 1?
 
Re: Transformation of random variable

I like Serena said:
Excellent!
(Learning from $\chi$ $\sigma$. ;))

Did you verify that the integral of $f_Y(y)$ for all possible values of y is equal to 1?

Hmm, I actually don't know how to find $f_Y(y)$. All of this maneuvering has been to find $f_X(y)$. If I knew $F_Y(y)$ then I could just differentiate that though, but I don't know that.
 
Re: Transformation of random variable

Jameson said:
Hmm, I actually don't know how to find $f_Y(y)$. All of this maneuvering has been to find $f_X(y)$. If I knew $F_Y(y)$ then I could just differentiate that though, but I don't know that.

You already found it.
$$F_Y(y) = P(Y \le y) = P(X \le \sqrt y)$$
(Thanks for removing the superfluous new line!)I guess you should add the condition that $0 \le y \le 1$, since for other values of $y$ it is zero.
 
Last edited:
  • #10
Oops. Just noticed something wrong.

It should be:
$$\begin{array}{lcll}f_X(x)&=&1 & \qquad \text{ if } 0 \le x \le 1 \\
P(X \le x) &=& F_X(x) = x & \qquad \text{ if } 0 \le x \le 1 \\
f_X(\sqrt y)&=&1 &\qquad \text{ if } 0 \le y \le 1 \\
P(X \le \sqrt y)&=&F_Y(y)=F_X(\sqrt y)=\sqrt y &\qquad \text{ if } 0 \le y \le 1 \\
f_Y(y)&=&\frac 1 {2 \sqrt y} &\qquad \text{ if } 0 \le y \le 1
\end{array}$$
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
4K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K