So, I found this proof of the variance of a discrete uniform distribution on Wikipedia (https://en.wikibooks.org/wiki/Statistics/Distributions/Discrete_Uniform) but I'm having trouble understanding what exactly was done in this point:
How did (b-a)² become (n-1)² and (a-b) become (n-1)? Thanks in advance.