I’m going to derive the formula for the sample standard deviation in terms of the sum and the sum of squares.
Let us start from the formula, where .
Expand the expression inside the summation to obtain: Now separate terms: .
Notice . Substituting the left hand side of this equation into the second term and substituting the right hand side of into the third term yields:
Hence, or as desired.