Ejemplo n.º 1
0
        public static double NormalCdf(double x, double mean, double variance)
        {
            double centered = x - mean;
            double ztrans   = centered / (Math.Sqrt(variance) * Math.Sqrt(2));

            return(0.5 * (1 + ProbabilityFunctions.Erf(ztrans)));
        }
Ejemplo n.º 2
0
 public static double StdNormalCdf(double x)
 {
     return(0.5 * (1 + ProbabilityFunctions.Erf(x * 1 / Math.Sqrt(2))));
 }