Which formula is correct for the variance of discrete uniform distribution?

1.5k Views Asked by At

This video offers this formula for the variance of discrete uniform distrubution:

img

However, this Wiki page uses a different formula despite everything else is the same:

$$\textrm{var}(X) = \frac{(b−a+1)^2−1}{12} = \frac{(b−a)(b−a+1)}{12}.$$

Can someone explain to me why we have this discrepancy? Thank you.

1

There are 1 best solutions below

3
On

Your last step is wrong: $x^{2}-y^{2}=(x-y)(x+y)$ so you get the same answer in the two cases.