Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# cdf

Cumulative distribution functions

## Syntax

y = cdf('name',x,A)
y = cdf('name',x,A,B)
y = cdf('name',x,A,B,C)
y = cdf(___,'upper')

## Description

y = cdf('name',x,A) returns the cumulative distribution function for the one-parameter family of distributions specified by name. a contains parameter values for the distribution. The cumulative distribution function is evaluated at the values in x and its values are returned in y. If x and A are arrays, they must be the same size. If x is a scalar, it is expanded to a constant matrix the same size as A. If a is a scalar, it is expanded to a constant matrix the same size as x. y is the common size of x and A after any necessary scalar expansion.

y = cdf('name',x,A,B) returns the cumulative distribution function for two-parameter families of distributions, where parameter values are given in A and B. If x, A, and B are arrays, they must be the same size. If x is a scalar, it is expanded to a constant matrix the same size as A and B. If either A or B are scalars, they are expanded to constant matrices the same size as x. y is the common size of x, A, and B after any necessary scalar expansion.

y = cdf('name',x,A,B,C) returns the cumulative distribution function for three-parameter families of distributions, where parameter values are given in A, B, and C. If x, A, B, and C are arrays, they must be the same size. If x is a scalar, it is expanded to a constant matrix the same size as A, B, and C. If any of A, B or C are scalars, they are expanded to constant matrices the same size as x. y is the common size of x, A, B, and C after any necessary scalar expansion.

y = cdf(___,'upper') returns the complement of the cumulative distribution function for the specified distribution, using an algorithm that more accurately computes the extreme upper tail probabilities. You can use the 'upper' argument with any of the previous syntaxes.

The following are acceptable strings for name (specified in single quotes).

nameDistributionInput Parameter AInput Parameter BInput Parameter C
'beta' or 'Beta'Beta Distributionab
'bino' or 'Binomial'Binomial Distributionn: number of trialsp: probability of success for each trial
'birnbaumsaunders'Birnbaum-Saunders Distributionβγ
'burr' or 'Burr'Burr Type XII Distributionα: scale parameterc: shape parameterk: shape parameter
'chi2' or 'Chisquare'Chi-Square Distributionν: degrees of freedom
'exp' or 'Exponential'Exponential Distributionμ: mean
'ev' or 'Extreme Value'Extreme Value Distributionμ: location parameterσ: scale parameter
'f' or 'F'F Distributionν1: numerator degrees of freedomν2: denominator degrees of freedom
'gam' or 'Gamma'Gamma Distributiona: shape parameterb: scale parameter
'gev' or 'Generalized Extreme Value'Generalized Extreme Value Distributionk: shape parameterσ: scale parameterμ: location parameter
'gp' or 'Generalized Pareto'Generalized Pareto Distributionk: tail index (shape) parameterσ: scale parameterμ: threshold (location) parameter
'geo' or 'Geometric'Geometric Distributionp: probability parameter
'hyge' or 'Hypergeometric'Hypergeometric DistributionM: size of the populationK: number of items with the desired characteristic in the populationn: number of samples drawn
'inversegaussian'Inverse Gaussian Distributionμλ
'logistic'Logistic Distributionμσ
'loglogistic'Loglogistic Distributionμσ
'logn' or 'Lognormal'Lognormal Distributionμσ
'nakagami'Nakagami Distributionμω
'nbin' or 'Negative Binomial'Negative Binomial Distributionr: number of successesp: probability of success in a single trial
'ncf' or 'Noncentral F'Noncentral F Distributionν1: numerator degrees of freedomν2: denominator degrees of freedomδ: noncentrality parameter
'nct' or 'Noncentral t'Noncentral t Distributionν: degrees of freedomδ: noncentrality parameter
'ncx2' or 'Noncentral Chi-square'Noncentral Chi-Square Distributionν: degrees of freedomδ: noncentrality parameter
'norm' or 'Normal'Normal Distributionμ: mean σ: standard deviation
'poiss' or 'Poisson'Poisson Distributionλ: mean
'rayl' or 'Rayleigh'Rayleigh Distributionb: scale parameter
'rician'Rician Distributions: noncentrality parameterσ: scale parameter
't' or 'T'Student's t Distributionν: degrees of freedom
'tlocationscale't Location-Scale Distributionμ: location parameterσ: scale parameterν: shape parameter
'unif' or 'Uniform'Uniform Distribution (Continuous)a: lower endpoint (minimum)b: upper endpoint (maximum)
'unid' or 'Discrete Uniform'Uniform Distribution (Discrete)N: maximum observable value
'wbl' or 'Weibull'Weibull Distributiona: scale parameterb: shape parameter

## Examples

expand all

### Compute Normal Distribution cdf

Compute the cdf of the normal distribution with mean 0 and standard deviation 1 at inputs –2, –1, 0, 1, 2.

`p = cdf('Normal',-2:2,0,1)`
```p =
0.0228  0.1587  0.5000  0.8413  0.9772
```

The order of the parameters is the same as for normcdf.

### Compute Poisson Distribution cdf

Compute the cdfs of Poisson distributions with rate parameters 1, 2, ... 5, at inputs 0, 1, ... 4, respectively.

`p = cdf('Poisson',0:4,1:5)`
```p =
0.3679  0.4060  0.4232  0.4335  0.4405```

The order of the parameters is the same as for poisscdf.