Variance and standard deviation for grouped data
Let $(x_i,f_i), i=1,2, \cdots , n$
be the observed frequency distribution.
Formula
Sample variance
The sample variance of $X$ is denoted by $s_x^2$ and is given by
$s_x^2 =\dfrac{1}{N-1}\sum_{i=1}^{n}f_i(x_i -\overline{x})^2$
OR
$s_x^2 =\dfrac{1}{N-1}\bigg(\sum_{i=1}^{n}f_ix_i^2-\frac{\big(\sum_{i=1}^n f_ix_i\big)^2}{N}\bigg)$
where,
$N=\sum_{i=1}^n f_i$
is the total number of observations,$\overline{x}$
is the sample mean.
Sample standard deviation
The sample standard deviation of $X$ is defined as the positive square root of sample variance. The sample standard deviation of $X$ is given by