Statistics Toolbox | ![]() ![]() |
Discrete Uniform Distribution
The following sections provide an overview of the discrete uniform distribution.
Background of the Discrete Uniform Distribution. The discrete uniform distribution is a simple distribution that puts equal weight on the integers from one to N.
Definition of the Discrete Uniform Distribution. The discrete uniform pdf is
Example and Plot of the Discrete Uniform Distribution. As for all discrete distributions, the cdf is a step function. The plot shows the discrete uniform cdf for N = 10.
x = 0:10; y = unidcdf(x,10); stairs(x,y) set(gca,'Xlim',[0 11])
To pick a random sample of 10 from a list of 553 items:
numbers = unidrnd(553,1,10) numbers = 293 372 5 213 37 231 380 326 515 468
![]() | Noncentral Chi-Square Distribution | Exponential Distribution | ![]() |