Example #1
0
            public IEnumerator GetEnumerator()
            {
                const double error = 0.001;
                var          xi    = StandardNormalDistribution.CumulativeDistributionFunction(0.5);

                yield return(Case(
                                 x: new[] { xi, xi },
                                 corr: new[, ]
                {
                    { 1d, 0.5 },
                    { 0.5, 1d },
                },
                                 expected: 0.5462444438570895,
                                 error: error));

                yield return(Case(
                                 x: new[] { xi, xi },
                                 corr: new[, ]
                {
                    { 1d, -0.5 },
                    { -0.5, 1d },
                },
                                 expected: 0.41922310903660254,
                                 error: error));
            }
Example #2
0
 public void TestCumulativeDistributionFunction(double x, double expected)
 {
     Assert.AreEqual(expected, StandardNormalDistribution.Instance.CumulativeDistribution(x));
     Assert.AreEqual(expected, StandardNormalDistribution.CumulativeDistributionFunction(x));
 }