cv: Coefficient of Variation

View source: R/stats.R

cvR Documentation

Coefficient of Variation

Description

Returns the observed coefficient of variation (CoV) of a given sample x.

If na.rm is true then missing values are removed before computation proceeds, as in the case of the mean() function.

Usage

cv(x, na.rm = TRUE)

Arguments

x

a numeric vector.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

Details

The coefficient of variation is defined as is defined as the ratio of the standard deviation to the mean. It shows the extent of variability in relation to the mean of the population.

cv() estimates the CoV of a given sample by computing the ratio of the sample standard deviation (see stats::sd) to the sample mean.

Examples

cv(1:10)

SynthETIC documentation built on Sept. 3, 2023, 5:06 p.m.