Showing uniform distribution on (0,1) of a random variable

Let $$X,Y$$ be two random variables and $$Z:=(X,Y)$$ and $$Z\sim \mathcal{U}([0,1]^2)$$. Show: $$X\sim \mathcal{U}([0,1])$$.

The density of $$Z$$ is $$1_{[0,1]\times[0,1]}(x,y)$$ (indicatorfunction) and I want to show that $$P(X\leq t)=t$$ (where $$P(X\le t)$$=$$F_X(t)$$).

Now in order to make use of the uniform distribution of $$Z$$, I have to make a trivial statement for $$Y$$, such as $$Y < \infty$$. Then I would like to compute it like that: $$P(X\le t)=P(X\le t , Y < \infty)=\int_{-\infty}^{\infty} \int_{-\infty}^{t} 1_{[0,1]\times[0,1]}(x,y)dxdy=\int_{0}^{1}\int_{0}^{t}dxdy=t$$

The problem I have is that I don't know if I can use the double integral like I did. Normally there would only be one integral when you look at the CDF, but here of course 2 variables are used but I have not worked with a random vector before so I am unsure if that is correct. Also, is that claim from $$Y$$ I made ok or should it be something else? I am thankful for any comments!

• Since $1_{[0,1]\times [0,1]}(x,y)=1_{[0,1]}(x)\,1_{[0,1]}(y)$, $X,Y$ are independent $U(0,1)$. – StubbornAtom May 21 at 10:13
• Things are okay here. You can also just leave the (harmless) equality $=P(X\leq t,Y<\infty)$ out (or interchange it with $=P(X\leq t,Y\in\mathbb R)$ if you like). One nitpick: you should mention that $t\in[0,1]$ here. – drhab May 21 at 10:37