popvar: population variance

Description Usage Arguments Examples

Description

Returns the population variance. Note that var returns the unbiased sample estimate of the population varaince. It simply multiplies the result of var by (n-1) / n with n the populaton size.

Usage

1
popvar(x, ...)

Arguments

x

a numeric vector, matrix or data frame.

...

further arguments passed along to var

Examples

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

ririzarr/rafalib documentation built on May 27, 2019, 9:10 a.m.