File tree Expand file tree Collapse file tree
lib/node_modules/@stdlib/stats/base/dists/studentized-range Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,10 +65,25 @@ The namespace contains the following distribution functions:
6565<!-- eslint no-undef: "error" -->
6666
6767``` javascript
68- var objectKeys = require ( ' @stdlib/utils/keys' );
6968var tukey = require ( ' @stdlib/stats/base/dists/studentized-range' );
7069
71- console .log ( objectKeys ( tukey ) );
70+ /*
71+ * Let's consider an example where we are analyzing the test scores of students in a class.
72+ * We're interested in using the Studentized Range Distribution to analyze the range of scores.
73+ * The distribution has parameters: r (number of means), v (degrees of freedom), and nranges (number of ranges).
74+ */
75+
76+ var r = 5.0 ;
77+ var v = 20.0 ;
78+ var nranges = 3.0 ;
79+
80+ // CDF can be used to calculate the cumulative distribution function at a specific value:
81+ var out = tukey .cdf ( 2.0 , r, v, nranges );
82+ // returns ~0.074
83+
84+ // Quantile can also be used to calculate the quantile function at a specific probability:
85+ out = tukey .quantile ( 0.9 , r, v, nranges );
86+ // returns ~4.433
7287```
7388
7489</section >
Original file line number Diff line number Diff line change 1818
1919'use strict' ;
2020
21- var objectKeys = require ( '@stdlib/utils/keys' ) ;
2221var tukey = require ( './../lib' ) ;
2322
24- console . log ( objectKeys ( tukey ) ) ;
23+ /*
24+ * Let's consider an example where we are analyzing the test scores of students in a class.
25+ * We're interested in using the Studentized Range Distribution to analyze the range of scores.
26+ * The distribution has parameters: r (number of means), v (degrees of freedom), and nranges (number of ranges).
27+ */
28+
29+ var r = 5.0 ;
30+ var v = 20.0 ;
31+ var nranges = 3.0 ;
32+
33+ // CDF can be used to calculate the cumulative distribution function at a specific value:
34+ console . log ( tukey . cdf ( 2.0 , r , v , nranges ) ) ;
35+ // => ~0.074
36+
37+ // Quantile can also be used to calculate the quantile function at a specific probability:
38+ console . log ( tukey . quantile ( 0.9 , r , v , nranges ) ) ;
39+ // => ~4.433
You can’t perform that action at this time.
0 commit comments