/** A vector given either as a scalar (1-D case) or an array (k-D case). */ export type MvnVector = number | readonly number[]; /** A covariance given either as a scalar variance (1-D case) or a k×k matrix. */ export type MvnCov = number | readonly (readonly number[])[]; /** * Multivariate-normal probability density, handling both the 1-D case * (`x`/`mean` scalars, `cov` a scalar variance) and the general k-D case * (`x`/`mean` length-k arrays, `cov` a k×k matrix). Reduces to the ordinary * normal PDF when k=1. * * @example * mvnPdf([0, 0], [0, 0], [[1, 0], [0, 1]]); // ~0.15915494 (scipy multivariate_normal.pdf) * mvnPdf(0, 0, 1); // ~0.3989422804 (standard normal density at 0) */ export declare function mvnPdf(x: MvnVector, mean: MvnVector, cov: MvnCov): number; /** Options for {@link mvnSample}. */ export interface MvnSampleOptions { /** Seed for the deterministic RNG (reproducible draws). Omit for a * time-seeded, non-reproducible generator. */ seed?: string | number; } /** * Draw `n` samples from a multivariate normal `N(mean, cov)` via `x = mean + * L·z`, where `Σ = LLᵀ` (Cholesky) and `z` is a vector of independent standard * normals (Box-Muller). Handles the 1-D case the same as {@link mvnPdf}. * Returns an `n`-length array of length-k row vectors. * * @example * mvnSample([1, 2], [[2, 0.5], [0.5, 1]], 20000, { seed: 42 }); * // empirical mean ~= [1, 2], empirical covariance ~= [[2, 0.5], [0.5, 1]] */ export declare function mvnSample(mean: MvnVector, cov: MvnCov, n: number, opts?: MvnSampleOptions): number[][]; //# sourceMappingURL=mvn.d.ts.map