Groovy web console

subscribe to the feed Subscribe
to this
site
Excel NORM.DIST function (via #groovywebconsole)
tweet this snippet Tweet
this
script

Excel NORM.DIST function

Published 4 months ago by Yury Ilyich with tags excel statistics distribution gauss
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
println("Excel NORM.DIST function")

def normdist(x,m,s) {
 v = -(x-m)*(x-m)/(2*s*s)
 return 1/(Math.sqrt(2*Math.PI)*s) * Math.pow(Math.E,v)
}

value = normdist(0.4,0.4,0.2625)
println(value)