interface
KurtosisOptions
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export interface KurtosisOptions extends StatisticsOptions {
/** Return excess kurtosis (subtract 3). Default `true`. */
excess?: boolean;
}
Fields, parameters & returned members (2)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
interface
MedianAbsoluteDeviationOptions
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
// ---- robust statistics ----
export interface MedianAbsoluteDeviationOptions extends StatisticsOptions {
/** Scale by 1.4826 for consistency with the normal stddev (default `true`). */
scale?: boolean;
}
Fields, parameters & returned members (2)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
type
NanPolicy
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export type NanPolicy = 'propagate' | 'omit' | 'throw';
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
interface
PopulationOptions
The estimator choice alone — the whole contract of the rolling family and `covarianceMatrix`.
/** The estimator choice alone — the whole contract of the rolling family and `covarianceMatrix`. */
export interface PopulationOptions {
/** Use the population estimator (÷n) instead of the sample estimator (÷(n-1)). */
population?: boolean;
}
Fields, parameters & returned members (1)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
interface
StatisticsOptions
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export interface StatisticsOptions {
nanPolicy?: NanPolicy;
}
Fields, parameters & returned members (1)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
interface
TrimmedMeanOptions
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export interface TrimmedMeanOptions extends StatisticsOptions {
/**
* Fraction dropped from EACH tail before averaging (default 0.1), in [0, 0.5]. At 0.5 nothing
* but the middle remains and the result is the median; the same fallback applies whenever the
* two trims would consume the whole sample.
*/
fraction?: number;
}
Fields, parameters & returned members (2)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
interface
VarianceOptions
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export interface VarianceOptions extends StatisticsOptions, PopulationOptions {
}
Fields, parameters & returned members (2)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
interface
WinsorizeOptions
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export interface WinsorizeOptions extends StatisticsOptions {
/** Lower tail fraction to clip (default 0.05). */
lower?: number;
/** Upper tail fraction to clip (default 0.05). */
upper?: number;
}
Fields, parameters & returned members (3)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
correlation
Pearson correlation coefficient. Throws on unequal lengths.
export declare function correlation(xs: ArrayLike<number>, ys: ArrayLike<number>, options?: StatisticsOptions): number;
Fields, parameters & returned members (4)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
covariance
Covariance of two equal-length series (sample by default). Throws on unequal lengths.
export declare function covariance(xs: ArrayLike<number>, ys: ArrayLike<number>, options?: VarianceOptions): number;
Fields, parameters & returned members (5)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
kurtosis
Population kurtosis; excess (−3) by default.
export declare function kurtosis(xs: ArrayLike<number>, options?: KurtosisOptions): number;
Fields, parameters & returned members (4)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
max
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export declare function max(xs: ArrayLike<number>, options?: StatisticsOptions): number;
Fields, parameters & returned members (3)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
mean
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export declare function mean(xs: ArrayLike<number>, options?: StatisticsOptions): number;
Fields, parameters & returned members (3)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
median
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export declare function median(xs: ArrayLike<number>, options?: StatisticsOptions): number;
Fields, parameters & returned members (3)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
medianAbsoluteDeviation
Median absolute deviation.
export declare function medianAbsoluteDeviation(xs: ArrayLike<number>, options?: MedianAbsoluteDeviationOptions): number;
Fields, parameters & returned members (4)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
min
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export declare function min(xs: ArrayLike<number>, options?: StatisticsOptions): number;
Fields, parameters & returned members (3)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
quantile
Quantile via the type-7 (linear interpolation of order statistics) method — the default used by
NumPy and R. `p` is in [0, 1].
export declare function quantile(xs: ArrayLike<number>, probability: number, options?: StatisticsOptions): number;
Fields, parameters & returned members (4)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
rollingCorrelation
Rolling Pearson correlation over a window. Aligned with `NaN` warmup.
export declare function rollingCorrelation(xs: ArrayLike<number>, ys: ArrayLike<number>, window: number): number[];
Fields, parameters & returned members (3)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
rollingCovariance
Rolling covariance over a window. Aligned with `NaN` warmup. Takes {@link PopulationOptions} for
the same reason as {@link rollingStandardDeviation}.
export declare function rollingCovariance(xs: ArrayLike<number>, ys: ArrayLike<number>, window: number, options?: PopulationOptions): number[];
Fields, parameters & returned members (5)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
rollingMean
Rolling mean. Output length equals input; the first `window-1` values are `NaN`. A window holding
a non-finite value — or whose own sum overflows — is reported `NaN`, never `±Infinity` (see
{@link finiteOrNaN}).
export declare function rollingMean(xs: ArrayLike<number>, window: number): number[];
Fields, parameters & returned members (2)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
rollingStandardDeviation
Rolling standard deviation (sample by default). Aligned with `NaN` warmup. Takes
{@link PopulationOptions}, not `VarianceOptions`: the rolling family has no `nanPolicy` (see the
module conventions), so the field is rejected as unknown rather than accepted and ignored.
export declare function rollingStandardDeviation(xs: ArrayLike<number>, window: number, options?: PopulationOptions): number[];
Fields, parameters & returned members (4)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
skewness
Population skewness (third standardized moment).
export declare function skewness(xs: ArrayLike<number>, options?: StatisticsOptions): number;
Fields, parameters & returned members (3)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
standardDeviation
Public declaration. Read the signature and parameter/member contracts below; no additional behavior is inferred.
export declare function standardDeviation(xs: ArrayLike<number>, options?: VarianceOptions): number;
Fields, parameters & returned members (4)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
sum
Kahan-compensated sum — minimizes rounding error over long series.
export declare function sum(xs: ArrayLike<number>, options?: StatisticsOptions): number;
Fields, parameters & returned members (3)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.
function
trimmedMean
Trimmed mean: drop `fraction` of the data from each tail, then average the rest.
export declare function trimmedMean(xs: ArrayLike<number>, options?: TrimmedMeanOptions): number;
Fields, parameters & returned members (4)
Stability, warnings & conventions
stable-by-law (pre-1.0; not a 1.0 stability guarantee)
Declared field units are shown above. “Unitless by name” means the name alone does not establish a unit, not that a financial quantity has none. Check source descriptions, conventions, and the returned diagnostics. Errors and warnings are part of the result contract.