var_pop | R Documentation |
Calculate the population variance or standard deviation of a vector.
var_pop(x)
sd_pop(x)
x |
(Numeric) vector. |
Unlike var
, which returns the sample variance,
var_pop()
returns the population variance. sd_pop()
returns the standard deviation based on the population variance.
The population variance or standard deviation of x
.
data(efc)
# sampling variance
var(efc$c12hour, na.rm = TRUE)
# population variance
var_pop(efc$c12hour)
# sampling sd
sd(efc$c12hour, na.rm = TRUE)
# population sd
sd_pop(efc$c12hour)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.