RandomState.binomial()
numpy.random.RandomState.binomial
-
RandomState.binomial(n, p, size=None)
-
Draw samples from a binomial distribution.
Samples are drawn from a binomial distribution with specified parameters, n trials and p probability of success where n an integer >= 0 and p is in the interval [0,1]. (n may be input as a float, but it is truncated to an integer in use)
Parameters: n : float (but truncated to an integer)
parameter, >= 0.
p : float
parameter, >= 0 and <=1.
size : int or tuple of ints, optional
Output shape. If the given shape is, e.g.