Learn R Programming

optimStrat (version 2.0)

varp: Variance

Description

Compute the variance of x.

Usage

varp(x)

Arguments

x

a numeric vector.

Value

An object with the variance of x.

Details

Compute the variance of x using \(n\) (instead of \(n-1\) as in var) in the denominator.

See Also

var

Examples

Run this code
# NOT RUN {
x<- rnorm(100)
varp(x)
var(x)
# }

Run the code above in your browser using DataLab