File tree Expand file tree Collapse file tree 2 files changed +34
-4
lines changed
lib/node_modules/@stdlib/stats/base/dists/studentized-range Expand file tree Collapse file tree 2 files changed +34
-4
lines changed Original file line number Diff line number Diff line change @@ -65,10 +65,25 @@ The namespace contains the following distribution functions:
65
65
<!-- eslint no-undef: "error" -->
66
66
67
67
``` javascript
68
- var objectKeys = require ( ' @stdlib/utils/keys' );
69
68
var tukey = require ( ' @stdlib/stats/base/dists/studentized-range' );
70
69
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
72
87
```
73
88
74
89
</section >
Original file line number Diff line number Diff line change 18
18
19
19
'use strict' ;
20
20
21
- var objectKeys = require ( '@stdlib/utils/keys' ) ;
22
21
var tukey = require ( './../lib' ) ;
23
22
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