# Thread: find pdf of z= x^2+y^2, x,y-uniform

1. ## find pdf of z= x^2+y^2, x,y-uniform

X,Y are independent and uniformly distributed on [-1,1]. Z is constructed by taking the samles of X and Y and constructing X^2+Y^2 , but discarding all Z>1. Therefore, prove taht Z has a uniform distribution on [0,1].

Solution:
So i've substittuted x=r cos a y= r sin a. Then I find that J=1 , => f(r)= r* (Pi/2). Then to find f(Z) = f(R^2):

P(0<R^2<r)= P(R< r^1/2)=F(r^1/2) => f(R^2) = 1/2& r^(-1/2)*f(r^1/2) =>
f(R^1/2) = 1/4*Pi But as I understand the Integral of this function over [0,1] should be 1 and it is not. So do I miss some boundary conditions?

Thanks.

2. I don't really understand your computation, but here is what I'd say:

Initially, the point $\displaystyle (X,Y)$ is uniformly distributed on the square $\displaystyle [-1,1]\times [-1,1]$. Discarding the samples where $\displaystyle Z>1$ amounts to sample the distribution of $\displaystyle (X,Y)$ conditional on the event that $\displaystyle Z\leq 1$, which is the uniform distribution on the unit disc $\displaystyle D(0,1)$ (we discard the points falling outside).
Then, for $\displaystyle 0<r<1$: $\displaystyle P(Z\leq r)=P((X,Y)\in D(0,\sqrt{r}))=\frac{\mbox{Area}(D(0,\sqrt{r}))}{\ mbox{Area}(D(0,1))}=\frac{\pi r}{\pi}=r$. This proves that the distribution of $\displaystyle Z$ is the uniform distribution on $\displaystyle [0,1]$.