1
$\begingroup$

I know how to calculate SD when given data points by using: $ \displaystyle \mathrm{SD} = \sqrt{\sum(x^2 - \text{mean}^2) / n} $.

I have been given just the sum of $x$ and sum of $x^2$. How do I calculate SD from this?!

An example question I am stuck on: Sum of $x = 1303$

Sum of $x^2 = 123557.$

There are 14 years for which the data is given - I would assume this is n...

$\endgroup$
2
  • $\begingroup$ would you like to describe how do you compute SD given data points? which formula do you use? $\endgroup$ Jan 24 '18 at 18:44
  • 2
    $\begingroup$ Hint: The variance is $s^2 = \frac{1}{n-1}(Q - T^2/n),$ where $Q = \sum_i X_i^2$ and $T = \sum_i X_i.$ This is proved by performing the square in $\frac{1}{n-2}\sum_i(X_i - \bar X)^2,$ using the distributive law, and using the definition of $\bar X.$ $\endgroup$
    – BruceET
    Jan 24 '18 at 19:12
0
$\begingroup$

In a not confusing manner (hopefully) the way i would start is to work out the variance using: Sxx = (Sum of)x^2 - n(Mean)^2

Then from there to find the standard deviation i would use:

srqroot(Sxx/n-1)

hopefully that has helped!

$\endgroup$
1
  • $\begingroup$ Your formula for SD seems slightly wrong. Assuming the mean $m$ is known then the variance $V=\frac{\sum (x_k-m)^2}{n}=\frac{\sum x_k^2}{n}-m^2$ so $SD=\sqrt{\frac{\sum x_k^2}{n}-m^2}$. When the mean is being estimated by the average of the $x's$, then the division is by $n-1$ rather than $n$. $\endgroup$ Jul 13 '18 at 3:02
0
$\begingroup$

Hint: You need a formula, where you can enter the sum of squares and the square of the sum. Let us first define these as follows: $$ SSQ =\sum\limits_{k=1}^{n} x_k^2 \quad\text{and}\quad SQS = \sum\limits_{k=1}^{n} x_k \;. $$

A famous formula of the (population)1 variance is $$ \mathrm{Var}(X) = \dfrac{1}{n} \sum\limits_{k=1}^{n} x_k^2 - \left( \dfrac{1}{n} \sum\limits_{k=1}^{n} x_k \right)^2 = \dfrac{SSQ}{n} - \left( \dfrac{SQS}{n} \right)^2 \;. $$ The (population) standard deviation, therefore, is $$ \boxed { \mathrm{SD}(X) = \sqrt{\dfrac{SSQ}{n} - \left( \dfrac{SQS}{n} \right)^2} } \;. $$ You see that you also need $n$, the number of samples.


1 The population statistics can be corrected, when sample statistics are required.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.