Probability – Probability of IID Random Variables Being Equal

probability

Suppose $X_1$ and $X_2$ are iid random variables. I want to determine $P(X_1=X_2)$.

If they are integer-valued random variables, then $$P(X_1=X_2) = \sum_{i \in \mathbb{Z}} P_{X_1,X_2}(i,i) = \sum_{i \in \mathbb{Z}} P_{X_1}(i)^2. $$

If they are continuous random variables, then $$P(X_1=X_2) = \int_{x \in \mathbb{R}} f_{X_1,X_2}(x,x) dx = \int_{x \in \mathbb{R}} f_{X_1}(x)^2 dx. $$ But when $X_1$ and $X_2$ are uniformly distributed over $[0,1)$, $$P(X_1=X_2) = \int_{x \in \mathbb{R}} f_{X_1}(x)^2 dx = \int_{x \in [0,1)} 1 dx = 1. $$ Intuitively it is not possible, since $P(X_1\neq X_2) > 0$. So is there some mistake I have made? Thanks!

Best Answer

No, your calculation for the continuous case is wrong. It should be $ P(X_1 = X_2) = \displaystyle\iint_D f_{X_1}(x) f_{X_2}(y)\ dx \ dy$, where $D = \{(x,y) \in {\mathbb R}^2: x = y\}$. But $D$ has two-dimensional measure (i.e. area) $0$, so the answer is $0$.

Related Question