The coefficient of variation

We have seen how the standard deviation can describe how spread is a set of data.
The coefficient of variation (CV) is a standardised measure of dispersion of a probability distribution or frequency distribution. It is defined as the ratio of the standard deviation (sigma) to the mean (mu):

CV = \sigma / \mu

It shows the extent of variability in relation to mean of the population.

The coefficient of variation is useful because the standard deviation of data must always be understood in the context of the mean of the data. In contrast, the actual value of the CV is independent of the unit in which the measurement has been taken, so it is a dimensionless number.
For comparison between data sets with different units or widely different means, one should use the coefficient of variation instead of the standard deviation.

In Python (this fragment does make use of previously defined mean and standard deviation functions) is straightforward:

def coeffVar(X):
        return stdDev(X) / mean(X)
    except ZeroDivisionError:
        raise StatsError('mean is zero')

2 thoughts on “The coefficient of variation

  1. Pingback: Introduction to Python package NumPy | Look back in respect

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s