1

I was reading some examples and I got stuck understanding these steps:
$$\sum_{m=1}^{100}\sum_{n=1, m\ne n}^{100}mn\frac{1}{9900}=\frac{1}{9900}\sum_{m=1}^{100}(m\sum_{n=1, m\ne n}^{100}n)=\frac{1}{9900}\sum_{m=1}^{100}(m(\sum_{n=1}^{100}n-m))$$
I can understand the second step where $m$ is like a constant for the next sum so we could remove it out the sum, but what makes the third step true? I tried to come out with smaller examples and got that it's wrong, but it's most likely because I've made mistakes.
Would appreciate any explanation and any smaller examples to see what's going on here.
Thanks in advance!

Pwaol
  • 2,113
  • 1
    Try $m\sum_{n=1}^{100}(n-m) = -100 m^2 + \sum_{n=1}^{100} nm = \sum_{n=1, m\ne n} nm$. Sorry for my original typos and later edits. I'm pretty sure that the third step boils down to a factorization argument, and the first two rely only on factorization of a constant. – Talmsmen Jun 05 '21 at 18:02
  • 2
    As you remarked, $m$ is a constant, so $\sum_{n=1}^{100} (n-m)=\sum_{n=1}^{100} n+m\sum_{n=1}^{100} 1=\sum_{n=1}^{100} n+100m.$ From this you can easily conclude the calculation – ecrin Jun 05 '21 at 18:04
  • 1
    Would it be $\sum_{n=1}^{100} (n-m)=\sum_{n=1}^{100} n-m\sum_{n=1}^{100} 1$? – Talmsmen Jun 05 '21 at 18:06
  • 1
    Thanks alot for the help, so the $-100m^2$ includes all the options when $m=n$ so when we subtract it, and add it in the sum, we make no difference. That's the trick here? – Pwaol Jun 05 '21 at 18:09
  • That's what I think. Was this problem originally from probability and statistics or real analysis? It seems like an "average" of a discrete bivariate distribution. Really, the distribution would just be a set of numbers in ascending order as opposed to a distribution developed by a probability density function, so I would guess that this problem belongs in analysis, right? – Talmsmen Jun 05 '21 at 18:11
  • 1
    @JPwin It's in Probability, Calculating $E(XY)$, while $P(X=m,Y=n)=\frac{1}{9900}$ for $m\ne n$ and zero when $m=n$ – Pwaol Jun 05 '21 at 18:23

1 Answers1

1

Take $m\sum_{n=1}^{100}(n-m) = -100 m^2 + \sum_{n=1}^{100} nm = \sum_{n=1, m\ne n} nm$. As you remarked in your comments, the $-100m^2$ term cancels every case when $m=n$, so we add that as a stipulation in the final sum.

Talmsmen
  • 1,146