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

TwoProportionZTest() public method

Creates a new Z-Test for two sample proportions.
public TwoProportionZTest ( double proportion1, int sampleSize1, double proportion2, int sampleSize2, TwoSampleHypothesis alternate = TwoSampleHypothesis.ValuesAreDifferent ) : System
proportion1 double The proportion of success observations in the first sample.
sampleSize1 int The total number of observations in the first sample.
proportion2 double The proportion of success observations in the second sample.
sampleSize2 int The total number of observations in the second sample.
alternate TwoSampleHypothesis The alternative hypothesis (research hypothesis) to test.
return System
        public TwoProportionZTest(double proportion1, int sampleSize1, double proportion2, int sampleSize2,
            TwoSampleHypothesis alternate = TwoSampleHypothesis.ValuesAreDifferent)
        {
            int x1 = (int)Math.Round(proportion1 * sampleSize1);
            int x2 = (int)Math.Round(proportion2 * sampleSize2);

            Compute(x1, sampleSize1, x2, sampleSize2, alternate);
        }

Same methods

TwoProportionZTest::TwoProportionZTest ( int successes1, int trials1, int successes2, int trials2, TwoSampleHypothesis alternate = TwoSampleHypothesis.ValuesAreDifferent ) : System