Products & Services Solutions Academia Support User Community Company

Learn more about Statistics Toolbox   

Uniform Distribution (Discrete)

Definition

The discrete uniform pdf is

Background

The discrete uniform distribution is a simple distribution that puts equal weight on the integers from one to N.

Example

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])

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

See Also

Discrete Distributions

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS