Variance Discrete Uniform Distribution

The aim is to replicate the demonstration than can be found here : 
https://en.wikibooks.org/wiki/Statistics/Distributions/Discrete_Uniform

EXU=(∑_(i=0)^(n-1))((1/n)(a+i))

VXU=(∑_(i=0)^(n-1))((1/n)((((a+i)-EXU))^2))

(1/n)(∑_(i=0)^(n-1))(((((a+2i-b)/2)))^2)

(1/(4n))(∑_(i=0)^(n-1))((a^2)+4a×i-2a×b+4(i^2)-4i×b+(b^2))

Simplify[(1/(4n))((∑_(i=0)^(n-1))((a^2)-2a×b+(b^2))+(∑_(i=0)^(n-1))(4a×i-4i×b)+(∑_(i=0)^(n-1))(4(i^2)))]

Simplify[(1/(4n))(n((a^2)-2a×b+(b^2))+4(a-b)(∑_(i=0)^(n-1))(i)+4(∑_(i=0)^(n-1))((i^2)))]

(1/12) (2+3 a^2+3 b^2-6 a (1+b-n)-6 b (-1+n)-6 n+4 n^2)==(1/12) (2-6 a+3 a^2+6 b-6 a b+3 b^2-6 n+6 a n-6 b n+4 n^2)

Expand[%]

Remember that (∑_(i=0)^m)((i^2))=[m(m+1)(2m+1)]/6:

(∑_(i=0)^m)((i^2))

Simplify[(1/(4n))(n(((b-a))^2)+4(a-b)((((n-1)n)/2))+4((((n-1)n(2n-1))/6)))]

%==(1/12) (2-6 a+3 (a^2)+6 b-6 a b+3 (b^2)-6 n+6 a n-6 b n+4 (n^2))

Expand[%]

Simplify[(1/(4n))(n(((n-1))^2)-2(n-1)(n-1)n+(((2(n-1)n(2n-1))/3)))]

(* n=b-a+1 *)

n

Remove[n]

Simplify[(1/4) (-(((-1+n))^2)+(2/3) (-1+n) (-1+2 n))]

Simplify[(1/12)(-3(((n-1))^2)+2(n-1)(2n-1))]

Simplify[(1/12)(-3((n^2)-2n+1)+2(2(n^2)-3n+1))]

(1/12) (-1+(n^2))==(((n^2)-1)/12)

Expand[%]

n=b-a+1

Variance[DiscreteUniformDistribution[{a,b}]]

(1/12) (-1+(((1-a+b))^2))

Remove [n]

(1/12) (-1+(n^2))==(((n^2)-2)/12)

Expand[%]

With variable, the Expand function indicates that the expression are not equivalent.