Learn R Programming

DeclareDesign (version 1.0.4)

pop.var: Population variance function

Description

Population variance function

Usage

pop.var(x, na.rm = FALSE)

Value

numeric scalar of the population variance

Arguments

x

a numeric vector, matrix or data frame.

na.rm

logical. Should missing values be removed?

Examples

Run this code

x <- 1:4
var(x) # divides by (n-1)
pop.var(x) # divides by n


Run the code above in your browser using DataLab