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

MultinomialTest() public method

Creates a new Multinomial test.
public MultinomialTest ( double sampleProportions, int sampleSize ) : System
sampleProportions double The proportions for each category in the sample.
sampleSize int The number of observations in the sample.
return System
        public MultinomialTest(double[] sampleProportions, int sampleSize)
        {
            double[] hypothesizedProportions = new double[sampleProportions.Length];
            for (int i = 0; i < hypothesizedProportions.Length; i++)
                hypothesizedProportions[i] = 1.0 / hypothesizedProportions.Length;

            Compute(sampleSize, sampleProportions, hypothesizedProportions);
        }

Same methods

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