SciencesPo (version 1.3.8)

cv: Pearson's Coefficient of Variation

Description

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

Usage

cv(x, na.rm = TRUE)

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

Arguments

x
A numeric vector.
na.rm
A logical value, default is FALSE

Value

  • The coefficient of variation.

encoding

UTF-8

Details

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

Examples

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

Run the code above in your browser using DataLab