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

Function densityNormal

docs/app/js/sanddance-app.js:119296–119300  ·  view source on GitHub ↗
(value, mean, stdev)

Source from the content-addressed store, hash-verified

119294 return mean + x * stdev;
119295}
119296function densityNormal(value, mean, stdev) {
119297 stdev = stdev == null ? 1 : stdev;
119298 const z = (value - (mean || 0)) / stdev;
119299 return Math.exp(-0.5 * z * z) / (stdev * SQRT2PI);
119300} // Approximation from West (2009)
119301// Better Approximations to Cumulative Normal Functions
119302function cumulativeNormal(value, mean, stdev) {
119303 mean = mean || 0;

Callers 1

gaussianFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected