LOADING STUDIO VIEW…
Zero-dependency Swift and TypeScript bivariate Gaussian golf shot dispersion probability library with shared numerical parity test vectors.
Statistical golf advice should never be a black box. dispersion-math publishes the foundational bivariate Gaussian probability functions used to reason about club dispersion, safe-zone landing probabilities, and sample dispersion statistics—with zero external dependencies and shared cross-language numerical test vectors.
normalCdf(x) — Deterministic normal cumulative distribution function with maximum error.gaussianBand(mean, sd, lo, hi) — Probability mass over a bounded target corridor.probabilityInZone(club, scenario, shortSideBias) — Bivariate target probability combining longitudinal carry spread, lateral spread, and asymmetric short-side decay.rankClubs(clubs, scenario) — Deterministic club ordering by target zone probability.dispersionFromShots(shots) — Sample mean bias and unbiased sample standard deviations from logged shots.import { probabilityInZone, rankClubs } from "./ts/src/index.mjs";
const sevenIron = {
id: "7i",
name: "7 Iron",
carryYards: 162,
carrySd: 8.5,
lateralSd: 10.0,
};
const scenario = {
distanceToTargetYards: 160,
safeZoneWidthYards: 28,
safeZoneDepthYards: 26,
};
const probability = probabilityInZone(sevenIron, scenario);
To explore correlated bivariate distributions, polygon hazards, and aim optimization interactively, open the Shot Dispersion Explorer in the Lab.