How to show: $\sum_{k=1}^{\infty}\sum_{n=1}^{k}P(X=k)=\sum_{n=1}^{\infty}\sum_{k=n}^{\infty}P(X=k)$ Can anyone explain why this equation is true.
$$\sum_{k=1}^{\infty}\sum_{n=1}^{k}P(X=k)=\sum_{n=1}^{\infty}\sum_{k=n}^{\infty}P(X=k).$$
 A: Let $a_{k,n}=P(X=k)$ if $k\geq n$ and $a_{k,n}=0$ otherwise. Then we need to show:
$$\sum_{k=1}^\infty\sum_{n=1}^k P(X=k) = \sum_{k=1}^\infty \sum_{n=1}^\infty a_{k,n}\stackrel{?}{=} \sum_{n=1}^\infty\sum_{k=1}^\infty a_{k,n} = \sum_{n=1}^\infty \sum_{k=n}^\infty a_{k,n}$$
That interior switch is, as you say, a result of Tonelli's theorem for summations, since $a_{k,n}\geq 0$.
A: I've posted answers to this here before.
$$\sum_{k=1}^\infty \sum_{n=1}^k P(X=k)=\sum_{n=1}^\infty \sum_{k=n}^\infty P(X=k).$$
$$
\begin{array}{c|ccccccccccccccccc}
& n=1 & n=2 & n=3 & n=4 & \cdots
\\
\hline
k=1 & \bullet \\
k=2 & \bullet & \bullet \\
k=3 & \bullet & \bullet & \bullet \\
k=4 & \bullet & \bullet & \bullet & \bullet \\
\vdots & \vdots & \vdots & \vdots & \vdots & \ddots
\end{array}
$$
The sum $\sum_{n=1}^k$ goes along the $k$th horizontal row (and is a finite sum).
The sum $\sum_{k=1}^\infty \sum_{n=1}^k$ then adds those up.
The sum $\sum_{k=n}^\infty$ goes down the $n$th vertical column (and is thus an infinite sum, and starts at $n$, not at $0$).
The sum $\sum_{n=1}^\infty \sum_{k=n}^\infty$ then adds those up.
