3.0

3.0 | 1 rating Rate this file 19 downloads (last 30 days) File Size: 1.28 KB File ID: #3278

RelVar

by Robert Bemis

 

17 Apr 2003 (Updated 12 Jan 2010)

Code covered by the BSD License  

Descriptive statistic to characterize & compare data sets.

Download Now | Watch this File

File Information
Description

Whereas standard deviation and variance are measures of absolute variance, the coefficient of variation is a measure of relative variance. This is generally useful to compare several data sets. It can also be used as a simple quality indicator. The definition used here is ratio of standard deviation to mean value expressed as percentage. For more information on descriptive statistics, check out the online documentation for the Statistics Toolbox at http://www.mathworks.com/access/helpdesk/help/toolbox/stats/descript.shtml.

This is just a one-line utility but I use it often because it's convenient - saves typing.

MATLAB release MATLAB 6.5 (R13)
Zip File Content  
Other Files license.txt,
RelVar.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
19 Aug 2008 Ronald Van Steenweghen

As used with time series, not surprisingly a NaN enters the dataset. Therefore I suggest to use the replace this line of code by:

cv = nanstd(x(:))/nanmean(x(:))*100;

This will return a result even if NaN's are included into the dataset.

Please login to add a comment or rating.
Updates
12 Jan 2010

copyright

Tag Activity for this File
Tag Applied By Date/Time
statistics Robert Bemis 22 Oct 2008 07:00:01
probability Robert Bemis 22 Oct 2008 07:00:01
relative variance Robert Bemis 22 Oct 2008 07:00:01
coefficient of variation Robert Bemis 22 Oct 2008 07:00:01
measures Robert Bemis 22 Oct 2008 07:00:01
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com