2
$\begingroup$

mathematical formula to calculate standard deviation is $SD = (\frac{SSD}{n-1})^{0.5}$

Would like to find SSD and how to write in r ?

SSD = ????

$\endgroup$
3
  • $\begingroup$ Just rearrange: ssd <- (sd^2)*(n-1). $\endgroup$
    – ralph
    Commented Jun 5, 2021 at 10:55
  • $\begingroup$ @ralph thanks ralph! but can you show the working to convert that to sd^2? $\endgroup$
    – Learner
    Commented Jun 5, 2021 at 11:06
  • $\begingroup$ Square both sides (to remove the square root), then multiply both sides by $(n - 1)$. $\endgroup$
    – ralph
    Commented Jun 5, 2021 at 11:09

1 Answer 1

3
$\begingroup$

I'll use $\sigma$ for SD to avoid confusion with SSD:

If $\sigma = (\frac{SSD}{n-1})^{0.5}$, then

$\sigma^2 = \frac{SSD}{n-1}$. Therefore:

$SSD = \sigma^2 (n-1)$

$\endgroup$
1
  • 2
    $\begingroup$ So sd(x)^2 * (length(x) - 1) in R (or var(x) * (length(x) - 1)) $\endgroup$
    – Dave
    Commented Jun 5, 2021 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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