Why $P(X=Y)=0$ if $X$ and $Y$ are i.i.d continous r.v.s? I read this conclusion in text book:
If $X$ and $Y$ are i.i.d continuous r.v.s, then $P(X=Y)=0$, but it doesn't give any proof. I am a bit confused here, what is the rational for this conclusion? Is it because for a continuous r.v., the probability of it equaling to any particular value is $0$?
Thanks.
 A: For a legalistic argument: $P(X=Y)=E( \mathbb 1_{X=Y}) = E( E( \mathbb 1_{X=Y}|Y)) = E( 0) = 0$ since $E(\mathbb 1_{X=Y}|Y) = 0 \text{ a.s.}$.  That is, the OP's observation that continuous random variables take on particular values with probability zero, when used with Fubini's theorem (a.k.a. the law of total expectation), does the trick.
A: Try this simple reasoning: Let $Z=X-Y$ (which must also be continuous). Now, \begin{align*}P(X-Y=0)&=P(0 \leq X-Y \leq 0)\\
&= \int_0^0 p(z)dz\\
&=0,
\end{align*}
where $p$ is the density for $Z$.
A: What is ther area of a diagonal in a square?
Here the "honest" calculation:


*

*Let $f_X(x),f_Y(y)$ be the continuous probability densities of $X,Y$ and 

*$F_X(x) = P(X \leq x)$, $F_Y(y) = P(Y \leq y)$
Now you have
$$P(X=Y) = 1-P(X<Y) - P(X>Y) \stackrel{X,Y\;i.i.d.}{=}1-2P(Y>X)$$
So, we calculate the probability on the RHS:
\begin{eqnarray*} P(Y>X)
& = & \int_{x =-\infty}^{+\infty}\int_{y =x}^{+\infty}f_Y(y)f_X(x)dydx \\
& = & \int_{x =-\infty}^{+\infty}f_X(x)\int_{y =x}^{+\infty}f_Y(y)dydx \\
& \stackrel{X,Y\; i.i.d.}{=} & \int_{x =-\infty}^{+\infty}f_X(x)(1 -F_X(x))dx\\
& = & 1 - \boxed{\int_{x =-\infty}^{+\infty}f_X(x)F_X(x)dx}\\
\end{eqnarray*}
Now, note that you can show easily by partial integration that $I =\int_{x =-\infty}^{+\infty}f_X(x)F_X(x)dx = \frac{1}{2}$
Indeed we have
\begin{eqnarray*} I
& = & \int_{x =-\infty}^{+\infty}f_X(x)F_X(x)dx\\
& = & \left. (F_X(x))^2 \right|_{-\infty}^{+\infty}- \int_{x =-\infty}^{+\infty}F_X(x)f_X(x)dx\\
& = & 1-I\\
\end{eqnarray*}
All together
$$P(X=Y) = 1-2P(Y>X) = 1-2(1-I) = 1-2\cdot\frac{1}{2} = 0$$
A: For every $N$, partition $\mathbb{R}$ to $N$ intervals $I_n^N$ (we allow intersections of probability zero) such that $\mathbb{P}(X\in A_n)=\frac{1}{N}$ and $\mathbb{P}(I_i \cap I_j)=0$. Notice, that this is possible because $X,Y$ are continuous r.v..
So, 
\begin{align}
\mathbb{P}(X=Y) &\leq \mathbb{P}(\bigcup_n (X \in I_n^N,Y \in I_n^N ) )\\
&\leq \sum_{n=1}^N \mathbb{P}(X \in I_n^N,Y \in I_n^N  )\\
&\leq \sum_{n=1}^N \mathbb{P}(X \in I_n^N   )\mathbb{P}( Y \in I_n^N  )\\
&\leq \frac{1}{N}
\end{align}
Now, taking $N\to \infty$, we conclude 
$$\mathbb{P}(X=Y)=0.$$
