import { xBoxPlotWithOutliers } from "./xBoxPlotWithOutliers.js";
import { xMean } from "./xMean.js";
import { xStandardDeviation } from "./xStandardDeviation.js";
/**
 * Calculate distribution statistics of an array without providing options
 * This ensure that the statistics are calculated in the same way in all the packages
 * If the array is empty it will throw an error
 * If the array has a length of 1, sd will be NaN (unbiased calculation of sd)
 * @param array - data.
 * @returns q1, median, q3, min, max.
 */
export function xDistributionStats(array) {
    return {
        ...xBoxPlotWithOutliers(array),
        mean: xMean(array),
        sd: xStandardDeviation(array),
        nb: array.length,
    };
}
//# sourceMappingURL=xDistributionStats.js.map