I still get a bit confused when calculating the variance of a sample:
Suppose I am given a value for $\sum_{i=1}^n x_i$, $\sum_{i=1}^n x_i^2$ and $n$. Which formula is the best to use as I seem to get confused whether to divide through by $n$ or $n-1$ ?
To be more clear,
Is either of the two below preferred, or do you know of a more accurate equation for estimate of sample variance?
$[(\sum_{i=1}^n x_i^2)/n]$ $-$ $[(\sum_{i=1}^n x_i)/n)^2]$
$[(\sum_{i=1}^n x_i^2)/(n-1)]$ $-$ $[(\sum_{i=1}^n x_i)/(n-1)^2]$