MCPcopy Create free account
hub / github.com/microsoft/SandDance / quantileNormal

Function quantileNormal

docs/app/js/sanddance-app.js:119338–119341  ·  view source on GitHub ↗
(p, mean, stdev)

Source from the content-addressed store, hash-verified

119336 return z > 0 ? 1 - cd : cd;
119337} // Approximation of Probit function using inverse error function.
119338function quantileNormal(p, mean, stdev) {
119339 if (p < 0 || p > 1) return NaN;
119340 return (mean || 0) + (stdev == null ? 1 : stdev) * SQRT2 * erfinv(2 * p - 1);
119341} // Approximate inverse error function. Implementation from "Approximating
119342// the erfinv function" by Mike Giles, GPU Computing Gems, volume 2, 2010.
119343// Ported from Apache Commons Math, http://www.apache.org/licenses/LICENSE-2.0
119344function erfinv(x) {

Callers 2

gaussianFunction · 0.70
quantileLogNormalFunction · 0.70

Calls 1

erfinvFunction · 0.70

Tested by

no test coverage detected