popvar: population variance

View source: R/popvar.R

popvarR Documentation

population variance

Description

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.

Usage

popvar(x, ...)

Arguments

x

a numeric vector, matrix or data frame.

...

further arguments passed along to var

Examples

x <- c(0,1) ##variance should be 0.5^2=0.25
var(x) 
popvar(x)

rafalib documentation built on April 11, 2025, 5:51 p.m.

Related to popvar in rafalib...