FUNCTION
CDF
Evaluates the standard normal cumulative density function.
Interface
#include <codecogs/statistics/distributions/continuous/stdnormal/cdf.h>
using namespace Statistics::Distributions::Continuous::Stdnormal;
This function evaluates the standard normal cumulative density function, which is the area under the Gaussian probability density function, integrated over the range $[-\infty, x]$:
$$CDF_{stdnorm}(x) = \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^x e^{-t^2/2} \: dt
= \frac{1}{2}(1+erf(z))$$
(1)
where $z=x/\sqrt 2$ and erf is the error function computed using errorFn.
This function has the following form: \graph x=-4:4
Example 1
#include <iostream>
#include <codecogs/statistics/distributions/continuous/stdnormal/cdf.h>
using namespace std;
int main()
{
cout << "standard normal CDF (0.3) = ";
cout << Statistics::Distributions::Continuous::Stdnormal::CDF(0.3) << endl;
return 0;
}Output:
standard normal CDF (0.3) = 0.617911Parameters
x
The upper limit on the integral
References
http://mathworld.wolfram.com/StandardNormalDistribution.html
Interactive Calculator
x
Result
Computing…
Set a range above first to export a graph.
This function's source code is only visible to registered users — documentation and the calculator above are free to use either way. Sign in to see it.