let X,Y two independent discret Random Variables. $P(X=i)$ and $P(Y=i) $are given. I want to calculate $P(X< Y)$, so
$$P(X<Y)=P(X-Y<0)= \sum P(x-Y<0,X=x)=\sum P(x<Y)P(X=x)=\sum (1-P(Y \le x))P(X=x)=\sum(1-\sum P(Y=i))P(X=x)$$ where the inner sum goes from $i=1$ to $i=x$ and the outer sum over all outcomes from X. I this correct? Here I substituted X=x, theoretically i could substitute Y=y too. would the outcome be the same?