1

I would like to calculate Inverse of the normal cumulative distribution function (cdf) using scala breeze similar to MATLAB function NORMINV. But i did not find any builtin function to calculate it. could anybody has any ideas to do it in scala?

thanks

Humayoo
  • 698
  • 9
  • 29

2 Answers2

2

This code solve my problem. "NormalDistribution" class gives same result as MATLAB function NORMINV.

import org.apache.commons.math3.distribution.NormalDistribution
val standardNormal = new NormalDistribution(0, 1);
val infNorm = standardNormal.inverseCumulativeProbability(x)
Humayoo
  • 698
  • 9
  • 29
0

SBT dependency: libraryDependencies += "org.apache.commons" % "commons-math3" % "3.6.1"

LineDrop
  • 461
  • 4
  • 5