Question

Is there a function to calculate Inverse Normal Cumulative Distribution?

  • 2 January 2020
  • 3 replies
  • 44 views

Badge

Hi, I have been asked to mimic the NORM.INV formula in FME which, in Excel, calculates the inverse of the normal cumulative distribution for the specified mean and standard deviation. I have the required values for the calculation (mean, random number and standard deviation) but unable to work out how to replicate it. Quite a specific question, but any help would be very much appreciated.

Thanks, John


3 replies

Badge

Edit: the required values for this are mean, standard deviation, and probability (which is defined by a random number). I have all these already.

Userlevel 4
Badge +26

You could try the PythonCaller and use this as a guide:

 

 

https://stackoverflow.com/questions/20626994/how-to-calculate-the-inverse-of-the-normal-cumulative-distribution-function-in-p

 

 

You could also look into using the R-Caller: https://knowledge.safe.com/articles/37979/tutorial-getting-started-with-the-rcaller.html . I think R has the funciton

 

 

Perhaps @samatsafe or @lizsanderson could give you some 'R' tips?
Badge

Thanks for the tag @virtualcitymatt.

Because there is no close-ended formula to calculate the inverse normal cumulative distribution function, Matt is correct that using Python or R is your best bet. His link should let you do it relatively easily using Python, which would be the most straightforward approach. You will need scipy installed for that. Check out this Knowledge Base article if you need help getting started with Python and FME.

If you prefer to use R, you can use the qnorm function from the stats package to do the same thing as the NORM.INV formula from Excel. You have to have R installed; see this Knowledge Base article for tips.

Good luck and please let us know if you have any problems!

Reply