Skip to content
Francois Vancoppenolle edited this page Jul 25, 2014 · 24 revisions

Previous Chapter          Previous Page          Table of content

Statistics

The purpose of a graphics is to display data in a visual way. People who visualize the graph will have a better comprehension of the data. The theory that is behind this method is called "Descriptive statistics". This is a small part of a wider theory. Another part of statistics computes values; the most kown of them is the mean; but values like the standard deviation, the median, the quartiles are other values that helps to "summarize" lot of data. Through the "stats.js" add-ins module, some of well known statistical values are computed.

statistical values

This chapter lists the statistical values computed by the stats.js module.

  • count_all, count_missing, count_not_missing
    Count_missing : count the number of missing values in the data;
    count_not_missing : count the number of not missing values in the data;
    count_all=count_missing+count_not_missing;

  • sum
    sum : sum of the not missing values;

  • mean
    mean = sum / count_not_missing;

  • sum_square_diff_mean
    sum_square_diff_mean=sum of the (values-mean)^2

  • variance
    variance=sum_square_diff_mean/count_not_missing

  • standard_deviation
    standard_deviation=square root (variance)

  • standard_deviation_estimation
    standard_deviation_estimation=square root(sum_square_diff_mean/(count_not_missing-1))

  • standard_error_mean
    standard_error_mean=square root(sum_square_diff_mean) / count_not_missing;

  • minimum
    minimum of the values

  • maximum
    maximum of the values

  • Q0, Q1, Q5, Q10, Q25, Q50, Q75, Q90, Q95, Q99, Q100
    Qx = the value obtained with following algorith :
    -> The data are ordered;
    -> x% of the data are lower than Qx; (100-x)% of the values are greater than Qx.


The Qx values are computed like they are computed in the SAS software which is a software well know in the statistical world.

Special values :
Q0 : minimum value;
Q100 : maximum value;
  • Median
    median=Q50

  • Interquantile_range
    interquantile_range=Q75-Q50

How to compute the statistical values

If you want to compute the statistal value listed in previous chapter, include the "Add-ins\stats.js" module and call the "stats" function with parameter data and config.

 <SCRIPT src='..\Add-ins\stats.js'></script>
 (...)
 <SCRIPT>
 var mydata1= {
 (...)
 };
 var statOptions = {
 (...)
 };
 stats(mydata1,statOptions);
 </SCRIPT>

replacement in your data/options

Previous Chapter          Previous Page          Top of Page

Clone this wiki locally