Accord.Tests.Statistics.TwoSampleWilcoxonSignedRankTestTest.WilcoxonSignedRankTestConstructorTest C# (CSharp) Метод

WilcoxonSignedRankTestConstructorTest() приватный Метод

private WilcoxonSignedRankTestConstructorTest ( ) : void
Результат void
        public void WilcoxonSignedRankTestConstructorTest()
        {
            // Example from http://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test

            double[] sample1 = { 125, 115, 130, 140, 140, 115, 140, 125, 140, 135 };
            double[] sample2 = { 110, 122, 125, 120, 140, 124, 123, 137, 135, 145 };

            TwoSampleHypothesis alternate = TwoSampleHypothesis.ValuesAreDifferent;
            var target = new TwoSampleWilcoxonSignedRankTest(sample1, sample2, alternate);

            // Wikipedia uses an alternate definition for the W statistic. The framework
            // uses the positive W statistic. There is no difference, if the proper
            // respective statistical tables (or distributions) are followed.
            Assert.AreEqual(27, target.Statistic);
            Assert.IsFalse(target.Significant);
        }