Learn R Programming

SciencesPo (version 0.11.21)

cv: Computes Pearson's coefficient of variation

Description

Computes the absolute coefficient of variation as proposed by Pearson: the standard deviation divided by the mean. Essentially, cv reflects a normalized measure of dispersion of a probability distribution. Distributions with cv < 1 are considered low-variance, while those with cv > 1 high-variance.

Usage

cv(x)

Arguments

x
is a numeric vector.

Value

  • Coefficient of variation value.

encoding

UTF-8

Details

sd(x)/mean(x) = cv, which is the inverse of signal-to-noise ratio.

Examples

Run this code
v <- rnorm(10) 
cv(v)

Run the code above in your browser using DataLab