Skip to contents

s^2 = (1/(n-1)) sum (xi - xbar)^2, reported beside the 1/n form.

Usage

SampVar(x)

Arguments

x

numeric data, n >= 2.

Value

list(sample_variance, population_variance).

References

Morin, D. J. (2016). Probability: For the Enthusiastic Beginner. Createspace. Eq (3.73).

Examples

SampVar(c(2, 4, 4, 4, 5, 5, 7, 9))$sample_variance
#> [1] 4.571429