Confusion about notation of random variables and random vectors

If $X$ and $Y$ are scalar random variables, then how does one interpret the random vector $Z = (X,Y)$? In particular is it assumed that if $X$ and $Y$ both have the same domain, then we define $Z$ by $$Z(\omega) = (X(\omega), Y(\omega)) ?$$ In this notation how do we distinguish the above from $$Z(x,y) = (X(x),Y(y))$$ for instance.

I am in particular confused by this notation when consider expected values. For instance let $X$ and $Y$ be as above. How do I differentiate between $$E(XY) = \int_{\Omega} XY \ d \mathbb{P}$$ where now $XY := X(\omega) Y(\omega)$ and we are integrating with respect to the measure on their common domain, and $$E(XY) = \int_{\Omega_1 \times \Omega_2} XY \ d \mathbb{P} \ ,$$ where this time $XY := X(x)Y(y)$ and we are integrating with respect to the product measure on the product of the domains of $X$ and $Y$.

Another example where I was confused for quite some time was calculating the cumulative distribution function of $Z = X + Y$. I was unsure whether or not to calculate $$\mathbb{P} ( \{ \omega \in \Omega : X(\omega) + Y(\omega) \leq t \} )$$ or $$\mathbb{P} (\{ (\omega_1,\omega_2) \in \Omega_1 \times \Omega_2 : X(\omega_1) + Y(\omega_2) \leq t \}) \ .$$

• Generally when one defines the sum or product of functions, it is implicitly assumed that the functions are defined on the same domain... – Math1000 Oct 7 '16 at 20:25
• The notation [$E(XY) = \int_{\Omega_1 \times \Omega_2} XY \ d \mathbb{P}$ where $XY := X(x)Y(y)$] is horrendous. To begin with, $XY:=X(x)Y(y)$ is meaningless, as you should realize if you start to wonder what this "definition" really says. A correct version would be to define $X$ and $Y$ on $\Omega_1\times\Omega_2$ by $$X(\omega_1,\omega_2)=\xi(\omega_1)\qquad Y(\omega_1,\omega_2)=\eta(\omega_2)$$ for some given functions $\xi:\Omega_1\to\mathbb R$ and $\eta:\Omega_2\to\mathbb R$. – Did Oct 8 '16 at 8:47