Products & Services Solutions Academia Support User Community Company

Learn more about Statistics Toolbox   

unidcdf - Discrete uniform cumulative distribution function

Syntax

P = unidcdf(X,N)

Description

P = unidcdf(X,N) computes the discrete uniform cdf at each of the values in X using the corresponding maximum observable value in N. X and N can be vectors, matrices, or multidimensional arrays that have the same size. A scalar input is expanded to a constant array with the same dimensions as the other inputs. The maximum observable values in N must be positive integers.

The discrete uniform cdf is

The result, p, is the probability that a single observation from the discrete uniform distribution with maximum N will be a positive integer less than or equal to x. The values x do not need to be integers.

Examples

What is the probability of drawing a number 20 or less from a hat with the numbers from 1 to 50 inside?

probability = unidcdf(20,50)
probability =
  0.4000

See Also

cdf, unidpdf, unidinv, unidstat, unidrnd, mle

Uniform Distribution (Discrete)

  


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