/** * Advanced math and statistics utilities * These are enhanced utilities beyond standard Lodash */ /** * Computes the mean (average) of the values in array. * * @param array - The array to compute the mean of * @returns Returns the mean value * * @example * mean([4, 2, 8, 6]); * // => 5 * * mean([]); * // => undefined */ export declare function mean(array: readonly number[]): number | undefined; /** * Computes the median of the values in array. * * @param array - The array to compute the median of * @returns Returns the median value * * @example * median([4, 2, 8, 6]); * // => 5 * * median([4, 2, 8, 6, 10]); * // => 6 */ export declare function median(array: readonly number[]): number | undefined; /** * Computes the mode (most frequent value) of the values in array. * * @param array - The array to compute the mode of * @returns Returns an array of the most frequent values * * @example * mode([4, 2, 8, 6, 2, 4, 2]); * // => [2] * * mode([4, 2, 8, 6, 2, 4]); * // => [2, 4] */ export declare function mode(array: readonly number[]): number[]; /** * Computes the standard deviation of the values in array. * * @param array - The array to compute the standard deviation of * @param sample - Whether to use sample standard deviation (default: false for population) * @returns Returns the standard deviation * * @example * standardDeviation([2, 4, 4, 4, 5, 5, 7, 9]); * // => 2 * * standardDeviation([2, 4, 4, 4, 5, 5, 7, 9], true); * // => 2.138 */ export declare function standardDeviation(array: readonly number[], sample?: boolean): number | undefined; /** * Computes the variance of the values in array. * * @param array - The array to compute the variance of * @param sample - Whether to use sample variance (default: false for population) * @returns Returns the variance * * @example * variance([2, 4, 4, 4, 5, 5, 7, 9]); * // => 4 */ export declare function variance(array: readonly number[], sample?: boolean): number | undefined; /** * Computes the percentile of the values in array. * * @param array - The array to compute the percentile of * @param percentile - The percentile to compute (0-100) * @returns Returns the percentile value * * @example * percentile([1, 2, 3, 4, 5], 50); * // => 3 * * percentile([1, 2, 3, 4, 5, 6], 75); * // => 4.75 */ export declare function percentile(array: readonly number[], percentile: number): number | undefined; /** * Computes the range (difference between max and min) of the values in array. * * @param array - The array to compute the range of * @returns Returns the range * * @example * rangeOfValues([4, 2, 8, 6]); * // => 6 */ export declare function rangeOfValues(array: readonly number[]): number | undefined; /** * Computes the geometric mean of the values in array. * * @param array - The array to compute the geometric mean of * @returns Returns the geometric mean * * @example * geometricMean([2, 8]); * // => 4 * * geometricMean([4, 1, 1/32]); * // => 0.5 */ export declare function geometricMean(array: readonly number[]): number | undefined; /** * Computes the harmonic mean of the values in array. * * @param array - The array to compute the harmonic mean of * @returns Returns the harmonic mean * * @example * harmonicMean([2, 3, 4]); * // => 2.769... */ export declare function harmonicMean(array: readonly number[]): number | undefined;