Learn R Programming

SciencesPo (version 1.3.9)

cv: Pearson's Coefficient of Variation

Description

Computes the absolute coefficient of variation cv as proposed by Karl Pearson. This coefficient is given by the division of the standard deviation by the mean. As the CV reflects a normalized measure of the dispersion of a given probability distribution, values for $cv < 1$ are considered low-variance, while those with $cv > 1$ high-variance.

Usage

cv(x, na.rm = TRUE, ...)

## S3 method for class 'default': cv(x, na.rm = TRUE, ...)

Arguments

x
A numeric vector.
na.rm
A logical value, default is FALSE
...
Additional arguements (currently ignored)

Value

  • The coefficient of variation.

encoding

UTF-8

Details

$\frac{sd(x)}{mean(x)} = cv$, which is the inverse of signal-to-noise ratio.

See Also

se, skewness, kurtosis, winsorize, outliers

Examples

Run this code
set.seed(51);
x <- sample(100);
cv(x);

Run the code above in your browser using DataLab