We have given two random variables $X,Y$ such that $(X,Y)\sim U([0,1]^2)$. I need to compute the probability that $(X,Y)$ is in $C:=\{(x,y)\in [0,1]^2: x^2+y^2\leq 1\}$
Now I know that since $(X,Y)$ is uniformly distributed we have $$\Bbb{P}((X,Y)\in C)=A(C)=\frac{\pi}{4}$$ where $A$ is the area.
Now I also thought about computing $\Bbb{P}((X,Y)\in C)$ really "mathematically" with integrals. I thought that $$\Bbb{P}((X,Y)\in C)=\int_0^1 \int_0^{\sqrt{1-x^2}}dydx$$ which indeed gives the same but was that just luck that the integrals give also $\frac{\pi}{4}$ or can we really compute $\Bbb{P}((X,Y)\in C)$ in this way?
Thanks for your help.
Does this answer your question?
In short: no... it wasn't "luck."