Skip to content

Instantly share code, notes, and snippets.

@dbinoj
Last active April 9, 2022 18:58
Show Gist options
  • Select an option

  • Save dbinoj/ac28de70f0be618ba7679ae8920c2d29 to your computer and use it in GitHub Desktop.

Select an option

Save dbinoj/ac28de70f0be618ba7679ae8920c2d29 to your computer and use it in GitHub Desktop.
Javascript implementation of NORMSDIST function from Excel
function NORMSDIST(z) {
// Uses https://cdn.jsdelivr.net/jstat/latest/jstat.min.js
if (isNaN(z)) return '#VALUE!';
var mean = 0, sd = 1;
return jStat.normal.cdf(z, mean, sd);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment