jstat / jstat

JavaScript Statistical Library
http://jstat.github.io/
MIT License
1.76k stars 245 forks source link

Get Z score by probability #268

Open omersname opened 3 years ago

omersname commented 3 years ago

Hello, I'm trying to get z score by a given probability value and I cant manage to do it. I tried the jStat.zscore function but it requires array and I need like a calculator that by a given p value I get the z score.

michaeleiseman commented 3 years ago

@omersname

Just use

jStat.normal.inv( p, mean, std )

were p is the probability you require.

If you want a STANDARD z score then set

mean to 0 and std to 1.