powered by
Returns the population variance. Note that var returns the unbiased sample estimate of the population variance. It simply multiplies the result of var by (n-1) / n with n the population size.
var
popvar(x, ...)
a numeric vector, matrix or data frame.
further arguments passed along to var
x <- c(0,1) ##variance should be 0.5^2=0.25 var(x) popvar(x)
Run the code above in your browser using DataLab