We build a chart
#color(white)(aaaa)##X##color(white)(aaaa)##1##color(white)(aaaa)##2##color(white)(aaaaaa)##3##color(white)(aaaa)##..........##color(white)(aaaa)##(n-1)##color(white)(aaaa)##n#
#color(white)(aaaa)##p##color(white)(aaaa)##1/n##color(white)(aaaa)##1/n##color(white)(aaaa)##1/n##color(white)(aaaa)##..........##color(white)(aaaaaa)##1/n##color(white)(aaaaa)##1/n#
#color(white)(aaaa)##Xp##color(white)(aaa)##1/n##color(white)(aaaa)##2/n##color(white)(aaaa)##3/n##color(white)(aaaa)##..........##color(white)(aaaa)##(n-1)/n##color(white)(aaaa)##n/n#
#color(white)(aaaa)##X^2p##color(white)(aa)##1^2/n##color(white)(aaaa)##2^2/n##color(white)(aaaa)##3^2/n##color(white)(aaaa)##..........##color(white)(a)##(n-1)^2/n##color(white)(aaaa)##n^2/n#
The Expected value is
#E(X)=sum_1^nXp=1/n(1+2+3+...+(n-1)+n)#
#=1/n*n/2(n+1)#
#=1/2(n+1)#
#sum_1^nX^2p=1/n(1^2+2^2+3^2+........+(n-1)^2+n^2)#
#=1/n*n/6(n+1)(2n+1)#
#=1/6(n+1)(2n+1)#
The variance is
#var(X)=(sum_1^nX^2p)-(E(X))^2#
#=1/6(n+1)(2n+1)-1/4(n+1)^2#
#=1/2(n+1)(1/3(2n+1)-1/2(n+1))#
#=1/2(n+1)*1/6(4n+2-3n-3)#
#=1/12(n+1)(n-1)#
#=1/12(n^2-1)#
#QED#
I hope that this is clearer.