コード例 #1
0
        public static double get(uint i, uint n, double x)
        {
            double coeff = Factorial.get(n) /
                           (Factorial.get(n - i) * Factorial.get(i));

            return(coeff * Math.Pow(x, i) * Math.Pow(1.0 - x, n - i));
        }
コード例 #2
0
 private double calcSummand(uint index)
 {
     return(Math.Exp(-lambda_) * Math.Pow(lambda_, index) / Factorial.get(index));
 }