MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / cdf

Function cdf

src/compute-engine/numerics/distributions.ts:69–70  ·  view source on GitHub ↗
(k: number)

Source from the content-addressed store, hash-verified

67 // CDF(k) = P(X ≤ k) = I_{1−p}(n−k, k+1); the kernel is undefined at a=0,
68 // so the k ≥ n endpoint (CDF = 1) is handled explicitly.
69 const cdf = (k: number): number =>
70 k >= n ? 1 : k < 0 ? 0 : betaRegularized(1 - p, n - k, k + 1);
71 return discreteQuantile(cdf, prob, mean, stddev, 0, n, deadline);
72}
73

Callers 1

discreteQuantileFunction · 0.85

Calls 2

betaRegularizedFunction · 0.90
gammaQFunction · 0.90

Tested by

no test coverage detected