scipy.stats.binom_test(x, n=None, p=0.5)

An exact (two-sided) test of the null hypothesis that the probability of success in a Bernoulli experiment is p.


x – Number of successes (or a vector of length 2 giving the
number of successes and number of failures respectively)

n – Number of trials (ignored if x has length 2) p – Hypothesized probability of success

Returns pval – Probability that null test is rejected for this set
of x and n even though it is true.

Previous topic


Next topic


This Page

Quick search