Let $X, X'$ be independent with $X \sim p(x)$, $X' \sim r(x)$ for $x, x' \in X$.
I don't understand this equation:
$\sum p(x)r(x)=Pr(X=X')$
What is intuitive to me is if $X \sim p(x)$, $X' \sim p(x)$ for $x, x' \in X$, then $\sum p(x)p(x) = Pr(X=X')$.
Could anyone please explain a bit about why $\sum p(x)r(x)=Pr(X=X')$ above? Does it mean that $\sum p(x)r(x) = \sum p(x) p(x)=Pr(X=X')$ ?
If $X,X'$ are discrete random variables that are independent then: $$\Pr(X=X')=\sum_x\Pr(X=x=X')=\sum_x\Pr(X=x)\Pr(X'=x)$$where $x$ ranges over a countable set that serves as common support for $X$ and $X'$.
Let me know if things are still not clear.