Another option might be to skip using formulajs and just use a jStat function to do the computation. What's the name of that jStat function?
The documentation can be found at http://jstat.github.io
I'm not sure if that method specifically is there. Most of the more complex statistical stuff was done by community contributors. If it's not feel free to file an issue requesting it.