I'm trying to convert something from my excel spreadsheets into Javascript and came along the NORMSINV() macro in my spreadsheets.
The NormSInv() is nicely documented at http://office.microsoft.com/en-us/excel-help/normsinv-HP005209195.aspx. Basically it's of the form Z = NormSInv(probability) where if you give it the probability (say 0.90), it gives you the Z value for a standard normal distribution (Z= 1.33).
I could encode the entire transformation table as per http://en.wikipedia.org/wiki/Standard_normal_table but want to avoid reinventing the wheel.
So, is there such a function in Javascript? eg. in Javascript's math libraries (if there is such a thing!).
Thanks Sid
i extracted the
jStat.distribution.normal.inv
into a standalone function you can use with webpack as a closure (or just by itself).import normalinv from 'jsfile'
let yourMath = normalinv()
or
var yourMath = normalinv();
yourMath(p, m, d)
There's nothing that I know of embedded into JavaScript's core.
You might like to take a look at the JStat JavaScript library. This seems to offer a range of functions for statistical calculation.
I ended up implementing the NormSInv() in javascript myself. No point in including an entire stats library when I need just one function