Reputation: 1
Is the sd function the biased or the unbiased standard deviation? If it is the unbiased one, what command would I have to use to get the biased one?
Upvotes: 0
Views: 54
Reputation: 507
help(sd)
output: (sd and var use n-1)
Details
Like var this uses denominator n - 1.
To find population standard deviation: Even though var
used n-1
we can manipulate it to use n
instead.
x <- c(1,2,3,4,5)
n <- length(x)
sd_pop <- sqrt(var(x)*(n-1)/n)
sd_pop
Upvotes: 1