Accord.Statistics.Testing.MultinomialTest.MultinomialTest C# (CSharp) Method

MultinomialTest() public method

Creates a new Multinomial test.
public MultinomialTest ( int sampleCounts, double hypothesizedProportions ) : System
sampleCounts int The number of occurrences for each category in the sample.
hypothesizedProportions double The hypothesized category proportions. Default is /// to assume uniformly equal proportions.
return System
        public MultinomialTest(int[] sampleCounts, double[] hypothesizedProportions)
        {
            if (sampleCounts.Length != hypothesizedProportions.Length)
                throw new DimensionMismatchException("hypothesizedProportions");

            int sampleSize = sampleCounts.Sum();
            double[] sampleProportions = sampleCounts.Divide(sampleSize);

            Compute(sampleSize, sampleProportions, hypothesizedProportions);
        }

Same methods

MultinomialTest::MultinomialTest ( double sampleProportions, int sampleSize ) : System
MultinomialTest::MultinomialTest ( double sampleProportions, int sampleSize, double hypothesizedProportions ) : System
MultinomialTest::MultinomialTest ( int sampleCounts ) : System
MultinomialTest::MultinomialTest ( int sample, int categories ) : System
MultinomialTest::MultinomialTest ( int sample, int categories, double hypothesizedProportions ) : System