Measure of Relative Variability

June 10, 2013

(This article was first published on Analysis with R, and kindly contributed to R-bloggers)

The measure of relative variability is the coefficient of variation (CV). Unlike measures of absolute variability, the CV is unitless when it comes to comparisons between the dispersions of two distributions of different units of measurement. In R, CV is obtained using cv function of raster package (to install an R package, click here).

Example 1. Below are the mean and standard deviation of the number of hours spent by Tonette every studying Stochastic Process Exam and the corresponding scores she got out of 100 items. Basing from this data, should one say the number of hours she spent in studying is more variable than her exam scores, or the other way around?

 Variable   Mean   Standard Deviation 
 Study Hours    25   2.6
 Scores 69 5.3

To determine this, we use the function below

And thus,

Interpretation: It is very clear from the computed CV that, the study hours is more variable than the exam scores, even though the standard deviation of the scores is higher than the spent hours.

Example 2. Consider the heights (in centimetres) of 11 AB English junior students at MSU-TCTO: 151, 160, 162, 155, 154, 168, 153, 158, 157, 150, and 167. And also their corresponding weights (in kilograms): 61, 69, 73, 65, 64, 78, 63, 68, 67, 60, and 77. Compute and interpret the coefficient of variation.

Using the cv function of raster package, we have

Interpretation: The weights of the students are more variable than their heights as proven by the computed coefficient of variation.


Asaad, Abubakar S. (2011). Simplified Biostatistics. Manila: Rex Book Store, Inc.

To leave a comment for the author, please follow the link and comment on their blog: Analysis with R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Mango solutions

RStudio homepage

Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training



CRC R books series

Contact us if you wish to help support R-bloggers, and place your banner here.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)