From aed40133f4cad9d43456b16b0486f03da1031ba9 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 28 Apr 2026 20:26:29 +0000 Subject: [PATCH] docs: align `stats/base/dists/lognormal/logcdf` with namespace conventions Aligns logcdf parameter terminology with the 13 sibling packages (cdf, pdf, logpdf, quantile, mean, median, mode, entropy, kurtosis, skewness, stdev, variance, ctor) which uniformly describe `mu` as the location parameter and `sigma` as the scale parameter of the underlying normal distribution. Drift items corrected (logcdf was the lone outlier): - JSDoc / TS-decl / repl.txt / README descriptions: `mu - mean` -> `mu - location parameter` (13/14 = 93% of siblings). - JSDoc / TS-decl / repl.txt / README descriptions: `sigma - standard deviation` -> `sigma - scale parameter` (13/14 = 93% of siblings). - Function-description prose: "with mean \`mu\` and standard deviation \`sigma\`" -> "with location parameter \`mu\` and scale parameter \`sigma\`" (13/14 = 93% of siblings); also added the matching prose to the factory.js JSDoc summary, which previously lacked any parameter description. - Example-comment label: "Negative standard deviation" -> "Negative scale parameter" (matches sibling phrasing for the sigma < 0 example). The mu/sigma terms are the location/scale of the underlying normal, not the mean/stddev of the lognormal, so the prior wording was mathematically misleading. JSDoc TYPE annotations and behavior are intentionally unchanged: factory.js legitimately accepts sigma === 0 (delegates to the degenerate distribution), and main.js is exercised by test.logcdf.js with sigma === 0, so NonNegativeNumber is preserved for both. --- .../base/dists/lognormal/logcdf/README.md | 4 ++-- .../base/dists/lognormal/logcdf/docs/repl.txt | 14 +++++++------- .../lognormal/logcdf/docs/types/index.d.ts | 18 +++++++++--------- .../base/dists/lognormal/logcdf/lib/factory.js | 6 +++--- .../base/dists/lognormal/logcdf/lib/main.js | 8 ++++---- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/README.md index 24113674ccb9..99e75ed005aa 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/README.md @@ -38,7 +38,7 @@ var logcdf = require( '@stdlib/stats/base/dists/lognormal/logcdf' ); #### logcdf( x, mu, sigma ) -Evaluates the natural logarithm of the [cumulative distribution function][cdf] (CDF) for a [lognormal][lognormal-distribution] distribution with parameters `mu` (mean) and `sigma` (standard deviation). +Evaluates the natural logarithm of the [cumulative distribution function][cdf] (CDF) for a [lognormal][lognormal-distribution] distribution with parameters `mu` (location parameter) and `sigma` (scale parameter). ```javascript var y = logcdf( 2.0, 0.0, 1.0 ); @@ -83,7 +83,7 @@ y = logcdf( 10.0, 8.0, 0.0 ); #### logcdf.factory( mu, sigma ) -Returns a `function` for evaluating the [cumulative distribution function][cdf] (CDF) of a [lognormal][lognormal-distribution] distribution with parameters `mu` (mean) and `sigma` (standard deviation). +Returns a `function` for evaluating the [cumulative distribution function][cdf] (CDF) of a [lognormal][lognormal-distribution] distribution with parameters `mu` (location parameter) and `sigma` (scale parameter). ```javascript var mylogcdf = logcdf.factory( 10.0, 2.0 ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/docs/repl.txt index e621f9c5d65f..3adfbe143a03 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/docs/repl.txt +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/docs/repl.txt @@ -1,8 +1,8 @@ {{alias}}( x, μ, σ ) Evaluates the natural logarithm of the cumulative distribution function - (CDF) for a lognormal distribution with mean `μ` and standard deviation `σ` - at a value `x`. + (CDF) for a lognormal distribution with location parameter `μ` and scale + parameter `σ` at a value `x`. If provided `NaN` as any argument, the function returns `NaN`. @@ -17,7 +17,7 @@ Location parameter. σ: number - Standard deviation. + Scale parameter. Returns ------- @@ -37,7 +37,7 @@ > y = {{alias}}( 0.0, 0.0, NaN ) NaN - // Negative standard deviation: + // Negative scale parameter: > y = {{alias}}( 2.0, 0.0, -1.0 ) NaN @@ -50,8 +50,8 @@ {{alias}}.factory( μ, σ ) Returns a function for evaluating the natural logarithm of the cumulative - distribution function (CDF) of a lognormal distribution with mean `μ` and - standard deviation `σ`. + distribution function (CDF) of a lognormal distribution with location + parameter `μ` and scale parameter `σ`. Parameters ---------- @@ -59,7 +59,7 @@ Location parameter. σ: number - Standard deviation. + Scale parameter. Returns ------- diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/docs/types/index.d.ts index a94b3e46ea00..5ac5db372757 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/docs/types/index.d.ts @@ -31,15 +31,15 @@ type Unary = ( x: number ) => number; */ interface LogCDF { /** - * Evaluates the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution with mean `mu` and standard deviation `sigma` at a value `x`. + * Evaluates the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution with location parameter `mu` and scale parameter `sigma` at a value `x`. * * ## Notes * * - If provided `sigma < 0`, the function returns `NaN`. * * @param x - input value - * @param mu - mean - * @param sigma - standard deviation + * @param mu - location parameter + * @param sigma - scale parameter * @returns logarithm of cumulative distribution function * * @example @@ -63,7 +63,7 @@ interface LogCDF { * // returns NaN * * @example - * // Negative standard deviation: + * // Negative scale parameter: * var y = logcdf( 2.0, 0.0, -1.0 ); * // returns NaN * @@ -78,10 +78,10 @@ interface LogCDF { ( x: number, mu: number, sigma: number ): number; /** - * Returns a function for evaluating the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution. + * Returns a function for evaluating the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution with location parameter `mu` and scale parameter `sigma`. * - * @param mu - mean - * @param sigma - standard deviation + * @param mu - location parameter + * @param sigma - scale parameter * @returns logcdf * * @example @@ -99,8 +99,8 @@ interface LogCDF { * Lognormal distribution natural logarithm of cumulative distribution function (CDF). * * @param x - input value -* @param mu - mean -* @param sigma - standard deviation +* @param mu - location parameter +* @param sigma - scale parameter * @returns evaluated logcdf * * @example diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/factory.js b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/factory.js index bb2d41ace17f..d27952bc7edd 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/factory.js +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/factory.js @@ -31,10 +31,10 @@ var NINF = require( '@stdlib/constants/float64/ninf' ); // MAIN // /** -* Returns a function for evaluating the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution. +* Returns a function for evaluating the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution with location parameter `mu` and scale parameter `sigma`. * -* @param {number} mu - mean -* @param {NonNegativeNumber} sigma - standard deviation +* @param {number} mu - location parameter +* @param {NonNegativeNumber} sigma - scale parameter * @returns {Function} logcdf * * @example diff --git a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/main.js index ec7cebb1ce2a..5a093c6d7026 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/main.js +++ b/lib/node_modules/@stdlib/stats/base/dists/lognormal/logcdf/lib/main.js @@ -28,11 +28,11 @@ var NINF = require( '@stdlib/constants/float64/ninf' ); // MAIN // /** -* Evaluates the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution with mean `mu` and standard deviation `sigma` at a value `x`. +* Evaluates the natural logarithm of the cumulative distribution function (CDF) for a lognormal distribution with location parameter `mu` and scale parameter `sigma` at a value `x`. * * @param {number} x - input value -* @param {number} mu - mean -* @param {NonNegativeNumber} sigma - standard deviation +* @param {number} mu - location parameter +* @param {NonNegativeNumber} sigma - scale parameter * @returns {number} logarithm of cumulative distribution function * * @example @@ -56,7 +56,7 @@ var NINF = require( '@stdlib/constants/float64/ninf' ); * // returns NaN * * @example -* // Negative standard deviation: +* // Negative scale parameter: * var y = logcdf( 2.0, 0.0, -1.0 ); * // returns NaN *