So, I found this proof of the variance of a discrete uniform distribution on Wikipedia (https://en.wikibooks.org/wiki/Statistics/Distributions/Discrete_Uniform) and I'm having trouble understanding what exactly was done from line 6 to 7. Here's a print of it:
How did (b-a)² in the first term become (n-1)² and (a-b) in the second term become (n-1)? Thanks very much in advance.
