Function binomialTest

Two-sided binomial test for whether P(success) == p. The one-sided alternatives are covered by dstats.distrib.binomialCDF and binomialCDFR. k is the number of successes observed, n is the number of trials, p is the probability of success under the null.

double binomialTest (
  ulong k,
  ulong n,
  double p
);

Returns

The P-value for the alternative that P(success) != p against the null that P(success) == p.

Notes

This test can also be performed using multinomialTest, but this implementation is much faster and easier to use.