diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/README.md b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/README.md index 4af1399479e4..f6c4ceb52a24 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/README.md @@ -65,10 +65,25 @@ The namespace contains the following distribution functions: ```javascript -var objectKeys = require( '@stdlib/utils/keys' ); var tukey = require( '@stdlib/stats/base/dists/studentized-range' ); -console.log( objectKeys( tukey ) ); +/* +* Let's consider an example where we are analyzing the test scores of students in a class. +* We're interested in using the Studentized Range Distribution to analyze the range of scores. +* The distribution has parameters: r (number of means), v (degrees of freedom), and nranges (number of ranges). +*/ + +var r = 5.0; +var v = 20.0; +var nranges = 3.0; + +// CDF can be used to calculate the cumulative distribution function at a specific value: +var out = tukey.cdf( 2.0, r, v, nranges ); +// returns ~0.074 + +// Quantile can also be used to calculate the quantile function at a specific probability: +out = tukey.quantile( 0.9, r, v, nranges ); +// returns ~4.433 ``` diff --git a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/examples/index.js index ecb36621a6e3..a0b962182ba6 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/studentized-range/examples/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/studentized-range/examples/index.js @@ -18,7 +18,22 @@ 'use strict'; -var objectKeys = require( '@stdlib/utils/keys' ); var tukey = require( './../lib' ); -console.log( objectKeys( tukey ) ); +/* +* Let's consider an example where we are analyzing the test scores of students in a class. +* We're interested in using the Studentized Range Distribution to analyze the range of scores. +* The distribution has parameters: r (number of means), v (degrees of freedom), and nranges (number of ranges). +*/ + +var r = 5.0; +var v = 20.0; +var nranges = 3.0; + +// CDF can be used to calculate the cumulative distribution function at a specific value: +console.log( tukey.cdf( 2.0, r, v, nranges ) ); +// => ~0.074 + +// Quantile can also be used to calculate the quantile function at a specific probability: +console.log( tukey.quantile( 0.9, r, v, nranges ) ); +// => ~4.433