/**
 * statistics.ts — Foundational statistical functions used across the engine.
 * Pure functions, zero dependencies, zero side effects.
 */
/**
 * Compute the arithmetic mean of a numeric array.
 * @param values - Array of numbers
 * @returns The arithmetic mean
 * @throws Error if the array is empty
 */
export declare function mean(values: number[]): number;
/**
 * Compute the sample variance (Bessel-corrected, divides by n-1).
 * @param values - Array of numbers
 * @returns The sample variance
 * @throws Error if the array has fewer than 2 elements
 */
export declare function variance(values: number[]): number;
/**
 * Compute the sample standard deviation (square root of sample variance).
 * @param values - Array of numbers
 * @returns The sample standard deviation
 */
export declare function stdDev(values: number[]): number;
/**
 * Compute a percentile from sorted or unsorted data using linear interpolation.
 * @param values - Array of numbers (will not be mutated)
 * @param p - Percentile in [0, 1] (e.g. 0.05 for 5th percentile)
 * @returns The interpolated percentile value
 */
export declare function percentile(values: number[], p: number): number;
/**
 * Compute the sample skewness (Fisher's definition, bias-adjusted).
 * Measures asymmetry of the distribution.
 * @param values - Array of numbers (at least 3)
 * @returns The sample skewness
 */
export declare function skewness(values: number[]): number;
/**
 * Compute the excess kurtosis (Fisher's definition, bias-adjusted).
 * Normal distribution has excess kurtosis of 0.
 * @param values - Array of numbers (at least 4)
 * @returns The sample excess kurtosis
 */
export declare function kurtosis(values: number[]): number;
/**
 * Compute the sample covariance between two arrays (Bessel-corrected).
 * @param x - First array of numbers
 * @param y - Second array of numbers (same length as x)
 * @returns The sample covariance
 */
export declare function covariance(x: number[], y: number[]): number;
/**
 * Standard normal cumulative distribution function (CDF).
 * Uses the Abramowitz & Stegun rational approximation (formula 26.2.17).
 * Accuracy: |error| < 7.5e-8.
 * @param x - The z-score
 * @returns P(Z <= x) for standard normal Z
 */
export declare function normalCDF(x: number): number;
/**
 * Standard normal probability density function (PDF).
 * @param x - The z-score
 * @returns phi(x) = (1/sqrt(2*pi)) * exp(-x^2/2)
 */
export declare function normalPDF(x: number): number;
/**
 * Inverse of the standard normal CDF (quantile function).
 * Uses the rational approximation from Abramowitz & Stegun (formula 26.2.23)
 * with refinement via Halley's method for improved accuracy.
 * @param p - Probability in (0, 1)
 * @returns z such that P(Z <= z) = p
 * @throws Error if p is not in (0, 1)
 */
export declare function normalInverseCDF(p: number): number;
//# sourceMappingURL=statistics.d.ts.map