CV2 | R Documentation |
Squared Coefficient of Variation.
CV2(x)
x |
Numeric vector or matrix. |
Compute the squared Coefficient of Variation of one or several samples provided as a numeric vector or matrix.
Numeric vector of the squared coefficients of variation.
The squared coefficient of variation is the ratio
S^2/\bar{X}^2
where \bar{X}
and S^2
are the sample mean and the sample variance. The variance is computed
using the sample size n
as denominator, rather than the usual
n-1
.
n <- 30; nSamp <- 500
X <- matrix(rexp(n * nSamp), nrow= nSamp, ncol = n)
W <- CV2(X)
plot(density(W), main = "CV2 of exponential samples")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.