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)=1b−aa≤k<bF(x;a,b)=⌊x⌋−ab−aa≤x≤bG(q;a,b)=⌈q(b−a)+a⌉μ=b+a−12μ2=(b−a−1)(b−a+1)12γ1=0γ2=−65(b−a)2+1(b−a−1)(b−a+1).
M(t)=1b−ab−1∑k=aetk=ebt−eat(b−a)(et−1)
Implementation: scipy.stats.randint