The binomial test is an exact statistical test of a success probability
based on the number
of successes in
independent Bernoulli trials. Under the null
hypothesis
,
has the binomial
distribution
A one-sided P-value is the appropriate upper or lower binomial tail. A two-sided -value requires a stated ordering of outcomes; common exact
conventions need not give identical values because the binomial
distribution is discrete.