FUNCTION
CDF_inv
Evaluates the inverse of the standard normal cumulative density function.
Interface
#include <codecogs/statistics/distributions/continuous/stdnormal/cdf_inv.h>
using namespace Statistics::Distributions::Continuous::Stdnormal;
This function evaluates the inverse of the standard normal cumulative density function: given a probability $p$ it returns the value $x$ such that $p = CDF_{stdnorm}(x)$ (see CDF).
The result is obtained from a rational (minimax) polynomial approximation - one for the central region $|p-0.5|\le 0.475$, another for the tails - and is then refined to full double-precision accuracy by a single iteration of Halley's rational method.
References
Jeremy Lea's C implementation of Peter Acklam's algorithm, found at: http://home.online.no/~pjacklam/notes/invnorm/impl/lea/lea.c
\graph p=0.01:0.99
Example 1
#include <iostream>
#include <codecogs/statistics/distributions/continuous/stdnormal/cdf_inv.h>
using namespace std;
int main()
{
cout << "standard normal CDF inverse (0.6179114) = ";
cout << Statistics::Distributions::Continuous::Stdnormal::CDF_inv(0.6179114) << endl;
return 0;
}Output:
standard normal CDF inverse (0.6179114) = 0.3Parameters
Interactive Calculator
Computing…
Set a range above first to export a graph.