Loading [MathJax]/jax/output/HTML-CSS/jax.js
SciPy

This is documentation for an old release of SciPy (version 0.17.1). Read this page in the documentation of the latest stable release (version 1.15.0).

Discrete Uniform (randint) Distribution

The discrete uniform distribution with parameters (a,b) constructs a random variable that has an equal probability of being any one of the integers in the half-open range [a,b). If a is not given it is assumed to be zero and the only parameter is b. Therefore,

p(k,a,b)=1baak<bF(x;a,b)=xabaaxbG(q;a,b)=q(ba)+aμ=b+a12μ2=(ba1)(ba+1)12γ1=0γ2=65(ba)2+1(ba1)(ba+1).
M(t)=1bab1k=aetk=ebteat(ba)(et1)

Implementation: scipy.stats.randint