Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public double pdf_norm(double x)
- {
- return (1 / Math.Sqrt(Math.PI)) * Math.Exp(-1 * (Math.Pow(x, 2) / 2));
- }
- public double cdf_norm(double x)
- {
- double[] bValues = [0.2316419, 0.319381530, −0.356563782, 1.781477937, −1.821255978, 1.330274429];
- double t = 1 / (1 + bValues[0]*x);
- return 1 - pdf_norm(x)*(bValues[1]*t + bValues[2]*Math.Pow(t,2) + bValues[3]*Math.Pow(t,3) + bValues[4]*Math.Pow(t,4) + bValues[5]*Math.Pow(t,5));
- }
Add Comment
Please, Sign In to add comment