# Independence between random variables — does it make sense?

A random variable is defined as a function from a probability space $\Omega$ to $\mathbb{R}$ (with certain properties). I think I understand the notion of independence, but my question is:

If two variables $X$ and $Y$ have the same probability distribution, aren't they the same mathematical object (that is, the same function)?

Then, why can $X$ be independent from $Y$ but not from $X$?

What does it mean to have two "different" random variables?

Again, I understand this from a practical point of view, but I am not sure about the formalization.

• Maybe this will help. Imagine $\Omega = \{\omega_1, \omega_2\}$ and $P(\{\omega_1\}) = P(\{\omega_2\}) = \frac 1 2$. Let $X, Y: \Omega \to \mathbb R$ with $X(\omega_1) = 1$, $X(\omega_2) = 0$ and $Y = 1 - X$. Clearly, $X$ and $Y$ are not the same mathematical object, however you can check that they do have the same probability distribution i.e. they induce the same probability measure on $\mathbb R$. – guy Nov 30 '11 at 3:00

Consider the set $\{(0,0),(1,0),(0,1),(1,1)\}$. Suppose each of these pairs has probability $1/4$. Then the $x$-coordinate of the pair is $0$ with probability $1/2$ and $1$ with probability $1/2$. And so is the $y$-coordinate. In other words, they both have the same distribution. But the $x$-coordinate is not the same as the $y$-coordinate. Notice that the probability that the $x$-coordinate equals the $y$-coordinate is $1/2$. If they were the same mathematical object, they would always be equal.