Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type InputArray = NumericArray | Collection<number> | AccessorArrayLike<number>;
* - Setting the correction parameter to a value other than `0` has the effect of adjusting the divisor during the calculation of the standard deviation according to `N-c` where `c` corresponds to the provided degrees of freedom adjustment. When computing the standard deviation of a population, setting the correction parameter to `0` is the standard choice (i.e., the provided array contains data constituting an entire population). When computing the corrected sample standard deviation, setting the correction parameter to `1` is the standard choice (i.e., the provided array contains data sampled from a larger population; this is commonly referred to as Bessel's correction).
*
* @param x - input array
* @param correction - degrees of freedom adjustment
* @param correction - degrees of freedom adjustment (default: 1.0)
* @returns standard deviation
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ interface LogCDF {
*
* var mylogcdf = logcdf.factory( 0.0, 10.0 );
* y = mylogcdf( 0.5 );
* // returns ~-1.938
* // returns ~-1.941
*
* y = mylogcdf( 8.0 );
* // returns ~-0.35
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* - If `p < 0` or `p > 1`, the function returns `NaN`.
*
* @param p - input value
* @param x - input value
* @returns evaluated quantile function
*/
type Unary = ( x: number ) => number;
Expand Down Expand Up @@ -82,7 +82,7 @@ interface Quantile {
( p: number, a: number, b: number ): number;

/**
* Returns a function for evaluating the quantile function for an arcsine distribution with minimum support `a` an maximum support `b`.
* Returns a function for evaluating the quantile function for an arcsine distribution with minimum support `a` and maximum support `b`.
*
* @param a - minimum support
* @param b - maximum support
Expand All @@ -102,7 +102,7 @@ interface Quantile {
/**
* Arcsine distribution quantile function.
*
* @param x - input value
* @param p - input value
* @param a - minimum support
* @param b - maximum support
* @returns evaluated quantile function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ declare class Bernoulli {
*
* @param t - input value
* @returns evaluated MGF
*/
*/
mgf( t: number ): number;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ declare class Beta {
*
* @param t - input value
* @returns evaluated MGF
*/
*/
mgf( t: number ): number;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ declare class Binomial {
/**
* Evaluates the moment-generating function (MGF).
*
* @param x - input value
* @param t - input value
* @returns evaluated MGF
*/
mgf( t: number ): number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ interface Quantile {
*
* @param r - input value
* @param n - number of trials
* @param p - success probability
* @param p - success probability
* @returns evaluated quantile function
*
* @example
Expand Down Expand Up @@ -119,7 +119,7 @@ interface Quantile {
/**
* Binomial distribution quantile function.
*
* @param p - input value
* @param r - input value
* @param n - number of trials
* @param p - success probability
* @returns evaluated quantile function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* ## Notes
*
* - If provided `k < 0`, the function returns `NaN`.
* - If provided `k <= 0`, the function returns `NaN`.
*
* @param k - degrees of freedom
* @returns entropy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ interface MGF {
*
* var mymgf = mgf.factory( 1.0 );
*
* var y = mymgf( 0.2 );
* y = mymgf( 0.2 );
* // returns ~1.291
*
* y = mymgf( 0.4 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// TypeScript Version: 4.1

/**
* Evaluates the logarithm of the probability density function (PDF) for a raised cosine distribution.
* Evaluates the natural logarithm of the probability density function (PDF) for a raised cosine distribution.
*
* @param x - input value
* @returns evaluated logPDF
Expand All @@ -31,7 +31,7 @@ type Unary = ( x: number ) => number;
*/
interface LogPDF {
/**
* Evaluates the logarithm of the probability density function (PDF) for a raised cosine distribution with location parameter `mu` and scale parameter `s` at a value `x`.
* Evaluates the natural logarithm of the probability density function (PDF) for a raised cosine distribution with location parameter `mu` and scale parameter `s` at a value `x`.
*
* ## Notes
*
Expand Down Expand Up @@ -78,7 +78,7 @@ interface LogPDF {
( x: number, mu: number, s: number ): number;

/**
* Returns a function for evaluating the logarithm of the probability density function (PDF) for a raised cosine distribution.
* Returns a function for evaluating the natural logarithm of the probability density function (PDF) for a raised cosine distribution.
*
* @param mu - location parameter
* @param s - scale parameter
Expand All @@ -96,7 +96,7 @@ interface LogPDF {
}

/**
* Raised cosine distribution logarithm of probability density function (PDF).
* Raised cosine distribution natural logarithm of probability density function (PDF).
*
* @param x - input value
* @param mu - location parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ declare class Degenerate {
*
* @param t - input value
* @returns evaluated MGF
*/
*/
mgf( t: number ): number;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ interface LogCDF {
/**
* Returns a function for evaluating the natural logarithm of the cumulative distribution function (logCDF) of a degenerate distribution centered at a provided mean value.
*
* @param mu - value at which to center the distribution
* @returns logCDF
* @param mu - constant value of distribution
* @returns function to evaluate the natural logarithm of the cumulative distribution function
*
* @example
* var mylogcdf = logcdf.factory( 5.0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Evaluates the natural logarithm of the probability mass function (PMF) for a degenerate distribution.
*
* @param x - input value
* @returns evaluated PMF
* @returns evaluated logPMF
*/
type Unary = ( x: number ) => number;

Expand Down Expand Up @@ -86,7 +86,7 @@ interface LogPMF {
*
* var mylogpmf = logpmf.factory( 10.0 );
*
* var y = mylogpmf( 10.0 );
* y = mylogpmf( 10.0 );
* // returns 0.0
*/
declare var logpmf: LogPMF;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ declare class DiscreteUniform {
/**
* Evaluates the moment-generating function (MGF).
*
* @param x - input value
* @param t - input value
* @returns evaluated MGF
*/
mgf( t: number ): number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ interface Quantile {
( p: number, a: number, b: number ): number;

/**
* Returns a function for evaluating the quantile function for a discrete uniform distribution with minimum support `a` an maximum support `b`.
* Returns a function for evaluating the quantile function for a discrete uniform distribution with minimum support `a` and maximum support `b`.
*
* @param a - minimum support
* @param b - maximum support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ declare class Erlang {
*
* @param t - input value
* @returns evaluated MGF
*/
*/
mgf( t: number ): number;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ declare class Exponential {
*
* @param t - input value
* @returns evaluated MGF
*/
*/
mgf( t: number ): number;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ interface LogPDF {
( x: number, lambda: number ): number;

/**
* Returns a function for evaluating the natural logarithm of the probability density function (PDF) for an exponential distribution with parameter `lambda`.
* Returns a function for evaluating the natural logarithm of the probability density function (PDF) for an exponential distribution with rate parameter `lambda`.
*
* @param lambda - rate parameter
* @returns logarithm of probability density function (logPDF)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ declare class Frechet {
/**
* Fréchet distribution constructor.
*
* @param alpha - shape parameter (default: 0.0)
* @param alpha - shape parameter (default: 1.0)
* @param s - scale parameter (default: 1.0)
* @param m - location parameter (default: 0.0)
* @throws `alpha` must be a positive number
Expand All @@ -49,12 +49,12 @@ declare class Frechet {
* @returns distribution instance
*
* @example
* var Frechet = new Frechet();
* var frechet = new Frechet();
*
* var y = Frechet.cdf( 0.8 );
* var y = frechet.cdf( 0.8 );
* // returns ~0.287
*
* var mu = Frechet.mean;
* var mu = frechet.mean;
* // returns Infinity
*/
constructor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

/**
* Returns the variance for a Fréchet distribution with shape `alpha`, scale `s`, and location `m`.
*
* ## Notes
*
* - If provided `0 < alpha <= 2` and `s > 0`, the function returns positive infinity.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ declare class Gamma {
*
* @param t - input value
* @returns evaluated MGF
*/
*/
mgf( t: number ): number;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ interface Quantile {
* // returns NaN
*
* @example
* // Non-positive shape parameter:
* // Negative shape parameter:
* var y = quantile( 0.5, -1.0, 1.0 );
* // returns NaN
*
* @example
* // Non-positive rate parameter:
* // Negative rate parameter:
* var y = quantile( 0.5, 1.0, -1.0 );
* // returns NaN
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Evaluates the natural logarithm of the probability mass function (PMF) for a geometric distribution.
*
* @param x - input value
* @returns evaluated PMF
* @returns evaluated logPMF
*/
type Unary = ( x: number ) => number;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ declare class Gumbel {
constructor();

/**
* Location parameter.
* Location parameter.
*/
mu: number;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// TypeScript Version: 4.1

/**
* Returns the differential entropy of a half-normal distribution.
* Returns the differential entropy for a half-normal distribution with scale parameter `sigma`.
*
* ## Notes
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ interface CDF {
*
* @param x - input value
* @param alpha - shape parameter
* @param beta - rate parameter
* @param beta - scale parameter
* @returns evaluated CDF
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ interface LogPDF {
*
* @param x - input value
* @param alpha - shape parameter
* @param beta - rate parameter
* @param beta - scale parameter
* @returns evaluated logPDF
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ interface PDF {
( x: number, alpha: number, beta: number ): number;

/**
* Returns a function for evaluating the probability density function (PDF) for a gamma distribution with shape parameter `alpha` and rate parameter `beta`.
* Returns a function for evaluating the probability density function (PDF) for an inverse gamma distribution with shape parameter `alpha` and rate parameter `beta`.
*
* @param alpha - shape parameter
* @param beta - rate parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ interface Quantile {
* @example
* // Non-positive shape parameter:
* var y = quantile( 0.5, -1.0, 1.0 );
* // returns NaN
*
* @example
* // Non-positive rate parameter:
Expand Down Expand Up @@ -109,7 +110,7 @@ interface Quantile {
*
* @param p - input value
* @param alpha - shape parameter
* @param beta - rate parameter
* @param beta - scale parameter
Comment thread
kgryte marked this conversation as resolved.
* @returns evaluated quantile function
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ interface LogCDF {
( x: number, a: number, b: number ): number;

/**
* Returns a function for evaluating the cumulative distribution function (CDF) for a Kumaraswamy's double bounded distribution with first shape parameter `a` and second shape parameter `b`.
* Returns a function for evaluating the natural logarithm of the cumulative distribution function (CDF) for a Kumaraswamy's double bounded distribution with first shape parameter `a` and second shape parameter `b`.
*
* @param a - first shape parameter
* @param b - second shape parameter
* @returns CDF
* @returns logCDF
*
* @example
* var mylogcdf = logcdf.factory( 0.5, 0.5 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ interface LogPDF {
}

/**
* Arcsine distribution logarithm of probability density function (PDF).
* Kumaraswamy's double bounded distribution logarithm of probability density function (PDF).
*
* @param x - input value
* @param a - first shape parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ interface Quantile {
/**
* Kumaraswamy's double bounded distribution quantile function.
*
* @param x - input value
* @param p - input probability
* @param a - first shape parameter
* @param b - second shape parameter
* @returns evaluated quantile function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ interface CDF {
*
* ## Notes
*
* - If provided `b = < 0`, the function returns `NaN`.
* - If provided `b < 0`, the function returns `NaN`.
*
* @param x - input value
* @param mu - location parameter
Expand Down
Loading
Loading