Accord.Tests.Statistics.WeibullDistributionTest.CumulativeDistributionTest C# (CSharp) Method

CumulativeDistributionTest() private method

private CumulativeDistributionTest ( ) : void
return void
        public void CumulativeDistributionTest()
        {
            WeibullDistribution n = new WeibullDistribution(0.80, 12.5);

            double[] expected = 
            {
                0.0,
                0.1241655,
                0.2061272,
                0.2733265,
                0.3309536,
                0.3814949,
            };

            double[] actual = new double[expected.Length];

            for (int i = 0; i < actual.Length; i++)
                actual[i] = n.DistributionFunction(i);

            for (int i = 0; i < actual.Length; i++)
            {
                Assert.AreEqual(expected[i], actual[i], 1e-6);
                Assert.IsFalse(double.IsNaN(actual[i]));
            }
        }