TITLE: Double Summation Switch
QUESTION [9 upvotes]: I have a question about switching the order of summation in this probability question.  I'll give the probability background, but it's not necessary to understand my question.  We have a random variable X that takes on nonnegative integer values.  We want to show that:
$\operatorname{E}[X]=\sum\limits_{i=1}^\infty P(X\geq i)$
We start off by noting that:
$\sum\limits_{i=1}^\infty P(X\geq i) = \sum\limits_{i=1}^\infty \sum\limits_{j=i}^\infty P(X = j). $
My question comes in at this next part:
$\begin{align}
\sum\limits_{i=1}^\infty \sum\limits_{j=i}^\infty P(X = j) &=\sum\limits_{j=1}^\infty \sum\limits_{i=1}^j P(X = j)\\
\end{align}$
If I explicitly write out the first several terms of the left hand side, I can convince myself that these two double sums are indeed the same.  But is there an intuitive, heuristic way to see that these two sums are equivalent without explicitly writing out any terms?
Thanks!
Note: If you need more background, you can read about this problem on the Wiki page:
http://en.wikipedia.org/wiki/Expected_value#Discrete_distribution_taking_only_non-negative_integer_values

REPLY [4 votes]: Instead of directly switching the sums, you can use an intermediate step with only one sum, for example:
$$\sum_{i=1}^{n}\sum_{j=1}^{i}f\left(\left(i,j\right)\right)\\
= \sum_{t\in\left\{ \left(i,j\right)\mid j\le i\le n\right\} }f\left(t\right)\\
= \sum_{j=1}^{n}\sum_{i=j}^{n}f\left(\left(i,j\right)\right)$$
This has the advantage that it works with pretty much arbitrary amounts of nested summations and it's also easier when you don't want to draw the matrix suggested by @hejseb.