My colleagues and I are having discussion whether it's valid to calculate standard deviation for $n=2$ or not? I think it's valid since I can calculate based on the equation, but higher N will give more power in the analysis. Can anyone comment? Thank you!

  • 7
    $\begingroup$ Valid, sure; useful, not so much. $\endgroup$ – André Nicolas Dec 21 '15 at 16:15
  • $\begingroup$ I can't think of a counter-argument. What are they ? $\endgroup$ – Yves Daoust Dec 21 '15 at 16:52
  • $\begingroup$ @AndréNicolas: for $N=2$, the standard deviation and range coincide (to a constant). Both are a cheap measure of spread that can be quite useful. An example application is the measure of temporal noise in images when you cannot afford taking more than two of them. $\endgroup$ – Yves Daoust Dec 21 '15 at 16:58

Standard deviation is a measure of spread from the mean, so it is defined even when $N=1$ (although in that case it will always be 0). Certainly when $N=2$, it is a meaningful statistic.

And you are right -- if $N$ is larger, the statistic will be more powerful.

  • $\begingroup$ I am not so sure about the $0$ spread. I'd rather say it's indeterminate. $\endgroup$ – Yves Daoust Dec 21 '15 at 17:00
  • $\begingroup$ @YvesDaoust interesting -- why? If you the entire population of 1 element, its distance from itself is certainly 0... $\endgroup$ – gt6989b Dec 21 '15 at 19:06
  • $\begingroup$ For $N>1$, $\hat\sigma$ is an estimator of $\sigma$. For $N=1$, nothing can be estimated (I wouldn't take $0$ as a good estimator of $\sigma$). $\endgroup$ – Yves Daoust Dec 21 '15 at 19:13
  • $\begingroup$ @YvesDaoust the first one was my intuition too - no indeterminacy: $$\sigma^2 = \frac{1}{n} \sum_{k = 1}^n (x_k - \mu)^2 = \frac{(x_1 - \mu)^2}{1} = 0$$ since $x_1 = \mu$... $\endgroup$ – gt6989b Dec 21 '15 at 19:15
  • $\begingroup$ I removed that in the meantime (even though the argument holds for the unbiaised variance). $\endgroup$ – Yves Daoust Dec 21 '15 at 19:17

It depends on how many "degrees of freedom" you have, or how much data you have left after estimating the other parameters you need before getting to the variance. If you have a single univariate sample and just want to estimate a variance, you can since this only requires an estimate of the mean. If on the other hand you have a simple linear regression and have fit an intercept and slope, then you have no degrees of freedom left and can't estimate the variance of the error term.


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.