/** * Computes the inverse of the normal cumulative distribution function (CDF). * * Returns the inverse CDF (quantile function) for a normal distribution with mean `mu` and standard deviation `sigma` at probability `p`. * If `mu` and `sigma` are not provided, it defaults to the standard normal distribution (mu = 0, sigma = 1). * * @param p The probability value in the range (0,1). * @param mu The mean of the normal distribution. Defaults to 0. * @param sigma The standard deviation of the normal distribution. Defaults to 1. * @returns The inverse CDF (quantile). * @throws If `p` is not in the range (0,1) or `sigma` is not positive. * * @example Compute the inverse CDF for standard normal distribution * ```ts * import { assertEquals, assertAlmostEquals } from "jsr:@std/assert"; * * assertAlmostEquals(norminv(0.05), -1.6448536269514729, 8.224268134757364e-13); * * ``` * * @example Compute inverse CDF with custom mean and standard deviation * ```ts * import { assertEquals, assertAlmostEquals } from "jsr:@std/assert"; * * assertAlmostEquals(norminv(0.01, 10, 2), 5.3473042519183185, 2.673652125959159e-12); * * ``` * * @example Compute inverse CDF at median (should return mean) * ```ts * import { assertEquals, assertAlmostEquals } from "jsr:@std/assert"; * * assertAlmostEquals(norminv(0.5, 5, 1), 5.0, 2.5e-12); * * ``` * * @example Compute inverse CDF for a high probability (should be positive) * ```ts * import { assertEquals, assertAlmostEquals } from "jsr:@std/assert"; * * assertAlmostEquals(norminv(0.975, 0, 1), 1.959963984540054, 9.79981992270027e-13); * * ``` * * @example Compute inverse CDF for a low probability (should be negative) * ```ts * import { assertEquals, assertAlmostEquals } from "jsr:@std/assert"; * * assertAlmostEquals(norminv(0.025, 0, 1), -1.9599639845400545, 9.799819922700272e-13); * ``` */ export default function norminv(p: number, mu?: number, sigma?: number): number; //# sourceMappingURL=norminv.d.ts.map