From 07f77f752efd9e4aa82c4880874328bb8b10b41c Mon Sep 17 00:00:00 2001 From: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com> Date: Thu, 18 Apr 2024 04:30:08 +0530 Subject: [PATCH 1/3] feat: stats/base/dists/studentized-range Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com> --- .../base/dists/studentized-range/README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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..fb4bccd35db7 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: +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 ``` From c6bf0508ad23bfa621fcf93e99637a8aeef135a4 Mon Sep 17 00:00:00 2001 From: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com> Date: Thu, 18 Apr 2024 04:31:51 +0530 Subject: [PATCH 2/3] Update index.js Signed-off-by: Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com> --- .../dists/studentized-range/examples/index.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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 From 9be6941f535625ca3db56450c2323bba7fa1ae54 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Wed, 19 Jun 2024 18:01:50 +0000 Subject: [PATCH 3/3] chore: use variable assignment in README.md examples --- .../@stdlib/stats/base/dists/studentized-range/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 fb4bccd35db7..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 @@ -78,12 +78,12 @@ 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 +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: -console.log( tukey.quantile( 0.9, r, v, nranges ) ); -// => ~4.433 +out = tukey.quantile( 0.9, r, v, nranges ); +// returns ~4.433 ```