$\displaystyle S^2 = Sum(Xi-X)^2/n-1$
I'm not sure what exactly Xi means. Is it the sum of a single data point minus the sample mean squared?
Thanks
the data is $\displaystyle X_1, X_2,\ldots X_n$
You're summing i from 1 to n, and it's $\displaystyle \bar X$, not X.
$\displaystyle S^2={\sum_{i=1}^n (X_i-\bar X)^2\over n-1}$
$\displaystyle ={ (X_1-\bar X)^2 + (X_2-\bar X)^2+(X_3-\bar X)^2+\cdots +(X_n-\bar X)^2 \over n-1}$
OR
$\displaystyle ={\sum_{i=1}^n X^2_i-n\bar X^2\over n-1}$