UNPKG
norm-dist
Version:
latest (3.1.0)
3.1.0
3.0.1
3.0.0
2.0.2
2.0.1
2.0.0
1.1.1
1.1.0
1.0.0
normal distribution pdf, cdf, quantile
github.com/hville/norm-dist
hville/norm-dist
norm-dist
/
pdf.js
9 lines
(8 loc)
•
174 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
/** * normal distribution pdf *
@param
{
number
}
z
*
@return
{
number
}
probability
*/
export
default
function
(
z
) {
return
Math
.
exp
(-(
Math
.
log
(
2
*
Math
.
PI
) + z*z) *
0.5
) }