Learn R Programming

SciencesPo (version 0.3.8.27)

cv: Computes Pearson's coefficient of variation

Description

This functions computes the absolute coefficient of variation as proposed by Pearson: 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

  • Will return the computation of the variation.

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