CDF Function

Returns a value from a cumulative probability distribution.

Category: Probability
Note: The QUANTILE function returns the quantile from a distribution that you specify. The QUANTILE function is the inverse of the CDF function. For more information, see QUANTILE Function.

Syntax

Required Arguments

distribution

is a character constant, variable, or expression that identifies the distribution. Valid distributions are as follows:

Distribution
Argument
Bernoulli
BERNOULLI
Beta
BETA
Binomial
BINOMIAL
Cauchy
CAUCHY
Chi-Square
CHISQUARE
Exponential
EXPONENTIAL
F
F
Gamma
GAMMA
Generalized Poisson
GENPOISSON
Geometric
GEOMETRIC
Hypergeometric
HYPERGEOMETRIC
Laplace
LAPLACE
Logistic
LOGISTIC
Lognormal
LOGNORMAL
Negative binomial
NEGBINOMIAL
Normal
NORMAL|GAUSS
Normal mixture
NORMALMIX
Pareto
PARETO
Poisson
POISSON
T
T
Tweedie
TWEEDIE
Uniform
UNIFORM
Wald (inverse Gaussian)
WALD|IGAUSS
Weibull
WEIBULL
Note Except for T, F, and NORMALMIX, you can minimally identify any distribution by its first four characters.

quantile

is a numeric constant, variable, or expression that specifies the value of the random variable.

Optional Argument

parm-1, … ,parm-k

are optional constants, variables, or expressions that specify shape, location, or scale parameters appropriate for the specific distribution.

See Details for complete information about these parameters.

Details

The CDF function computes the left cumulative distribution function from various continuous and discrete probability distributions.

Bernoulli Distribution

CDF('BERNOULLI',x,p)
Arguments

x

is a numeric random variable.

p

is a numeric probability of success.

Range 0 ≤ p ≤ 1
Details
The CDF function for the Bernoulli distribution returns the probability that an observation from a Bernoulli distribution, with probability of success equal to p, is less than or equal to x. The equation follows:
C D F ( B E R N , x , p ) = { 0 x < 0 1 - p 0 x < 1 1 x 1
Note: There are no location or scale parameters for this distribution.

Beta Distribution

CDF('BETA',x,a,b<,l,r> )
Arguments

x

is a numeric random variable.

a

is a numeric shape parameter.

Range a > 0

b

is a numeric shape parameter.

Range b > 0

l

is the numeric left location parameter.

Default 0

r

is the right location parameter.

Default 1
Range r > l
Details
The CDF function for the beta distribution returns the probability that an observation from a beta distribution, with shape parameters a and b, is less than or equal to v. The following equation describes the CDF function of the beta distribution:
C D F ( B E T A , x , a , b , l , r ) = { 0 x l 1 β ( a , b ) l x ( v - l ) a - 1 ( r - v ) b - 1 ( r - l ) a + b - 1 d v l < x r 1 x > r
The following relationship applies to the preceding equation:
β ( a , b ) = Γ ( a ) Γ ( b ) Γ ( a + b )
The following relationship applies to the preceding equation:
Γ ( a ) = 0 x a - 1 e - x d x

Binomial Distribution

CDF('BINOMIAL',m,p,n)
Arguments

m

is an integer random variable that counts the number of successes.

Range m = 0, 1, ...

p

is a numeric probability of success.

Range 0 ≤ p ≤ 1

n

is an integer parameter that counts the number of independent Bernoulli trials.

Range n = 0, 1, ...
Details
The CDF function for the binomial distribution returns the probability that an observation from a binomial distribution, with parameters p and n, is less than or equal to m. The equation follows:
C D F ( B I N O M , m , p , n ) = { 0 m < 0 j = 0 m ( N j ) p j ( 1 - p ) n - j 0 m n 1 m > n
Note: There are no location or scale parameters for the binomial distribution.

Cauchy Distribution

CDF('CAUCHY',x<,θ><,λ> )
Arguments

x

is a numeric random variable.

θ

is a numeric location parameter.

Default 0

λ

is a numeric scale parameter.

Default 1
Range λ > 0
Details
The CDF function for the Cauchy distribution returns the probability that an observation from a Cauchy distribution, with the location parameter θ and the scale parameter λ, is less than or equal to x. The equation follows:
C D F ( C A U C H Y , x , θ , λ ) = 1 2 + 1 π t a n - 1 ( x - θ λ )

Chi-Square Distribution

CDF('CHISQUARE',x,df <,nc> )
Arguments

x

is a numeric random variable.

df

is a numeric degrees of freedom parameter.

Range df > 0

nc

is an optional numeric non-centrality parameter.

Range nc ≥ 0
Details
The CDF function for the chi-square distribution returns the probability that an observation from a chi-square distribution, with df degrees of freedom and non-centrality parameter nc, is less than or equal to x. This function accepts non-integer degrees of freedom. If nc is omitted or equal to zero, the value returned is from the central chi-square distribution. In the following equation, let ν = d f and let λ = n c . The following equation describes the CDF function of the chi-square distribution:
C D F ( C H I S Q , x , ν , λ ) = { 0 x < 0 j = 0 e - λ 2 ( λ 2 ) j j ! P c ( x , ν + 2 j ) x 0
In the equation, Pc(.,.) denotes the probability from the central chi-square distribution:
P c ( x , a ) = P g ( x 2 , a 2 )
In the equation, Pg(y,b) is the probability from the gamma distribution given by the equation:
P g ( y , b ) = 1 Γ ( b ) 0 y e - v v b - 1 d v

Exponential Distribution

CDF('EXPONENTIAL',x <,λ> )
Arguments

x

is a numeric random variable.

λ

is a scale parameter.

Default 1
Range λ > 0
Details
The CDF function for the exponential distribution returns the probability that an observation from an exponential distribution, with the scale parameter λ, is less than or equal to x. The equation follows:
C D F ( E X P O , x , λ ) = { 0 x < 0 1 - e - x λ x 0

F Distribution

CDF('F',x,ndf,ddf <,nc> )
Arguments

x

is a numeric random variable.

ndf

is a numeric numerator degrees of freedom parameter.

Range ndf > 0

ddf

is a numeric denominator degrees of freedom parameter.

Range ddf > 0

nc

is a numeric non-centrality parameter.

Range nc ≥ 0
Details
The CDF function for the F distribution returns the probability that an observation from an F distribution, with ndf numerator degrees of freedom, ddf denominator degrees of freedom, and non-centrality parameter nc, is less than or equal to x. This function accepts non-integer degrees of freedom for ndf and ddf. If nc is omitted or equal to zero, the value returned is from a central F distribution. In the following equation, let ν 1 = n d f , let ν 2 = d d f , and let λ = n c . The following equation describes the CDF function of the F distribution:
C D F ( F , x , v 1 , v 2 , λ ) = { 0 x < 0 j = 0 e - λ 2 ( λ 2 ) j j ! P F ( x , v 1 + 2 j , v 2 ) x 0  
In the equation, Pf(f,u1,u2) is the probability from the central F distribution with
P F ( x , u 1 , u 2 ) = P B ( u 1 x u 1 x + u 2 , u 1 2 , u 2 2 )
and PB(x,a,b) is the probability from the standard beta distribution.
Note: There are no location or scale parameters for the F distribution.

Gamma Distribution

CDF('GAMMA',x,a<,λ> )
Arguments

x

is a numeric random variable.

a

is a numeric shape parameter.

Range a > 0

λ

is a numeric scale parameter.

Default 1
Range λ > 0
Details
The CDF function for the gamma distribution returns the probability that an observation from a gamma distribution, with shape parameter a and scale parameter λ, is less than or equal to x. The equation follows:
C D F ( G A M M A , x , a , λ ) = { 0 x < 0 1 λ a Γ ( a ) 0 x v a - 1 e - v λ d v x 0

Generalized Poisson Distribution

CDF (‘GENPOISSON’, x, θ, η)
Arguments

x

is an integer random variable.

θ

specifies a shape parameter.

Range ≤5 and >0

η

specifies a shape parameter.

Range ≥0 and <0.95
Tip When η =0, the distribution is the Poisson distribution with a mean and variance of θ. When η>0, the mean is θ ÷ ( 1 η ) and the variance is θ ÷ ( 1 η ) 3 .
Details
The probability mass function for the generalized Poisson distribution follows:
f ( x ; θ , η ) = θ ( θ + η x ) x 1 e θ η x / x ! , x = 0 , 1 , 2 , ... , θ > 0 , 0 η < 1
If η =0, then the generalized Poisson distribution becomes the standard Poisson distribution with shape parameter θ.

Geometric Distribution

CDF('GEOMETRIC',m,p)
Arguments

m

is a numeric random variable that denotes the number of failures.

Range m = 0, 1, ...

p

is a numeric probability of success.

Range 0 ≤ p ≤ 1
Details
The CDF function for the geometric distribution returns the probability that an observation from a geometric distribution, with parameter p, is less than or equal to m. The equation follows:
C D F ( G E O M , m , p ) = { 0 m < 0 1 - ( 1 - p ) ( m + 1 ) m 0
Note: There are no location or scale parameters for this distribution.

Hypergeometric Distribution

CDF('HYPER',x,N,R,n<,o> )
Arguments

x

is an integer random variable.

N

is an integer population size parameter.

Range N = 1, 2, ...

R

is an integer number of items in the category of interest.

Range R = 0, 1, ..., N

n

is an integer sample size parameter.

Range n = 1, 2, ..., N

o

is an optional numeric odds ratio parameter.

Range o > 0
Details
The CDF function for the hypergeometric distribution returns the probability that an observation from an extended hypergeometric distribution, with population size N, number of items R, sample size n, and odds ratio o, is less than or equal to x. If o is omitted or equal to 1, the value returned is from the usual hypergeometric distribution. The equation follows:
C D F ( H Y P E R , x , N , R , n , o ) = { 0 x < m a x ( 0 , R + n - N ) i = 0 x ( R i ) ( N - R n - i ) o i j = m a x ( 0 , R + n - N ) m i n ( R , n ) ( R j ) ( N - R n - j ) o j m a x ( 0 , R + n - N ) x m i n ( R , n ) 1 x > m i n ( R , n )

Laplace Distribution

CDF('LAPLACE',x<,θ,λ> )
Arguments

x

is a numeric random variable.

θ

is a numeric location parameter.

Default 0

λ

is a numeric scale parameter.

Default 1
Range λ > 0
Details
The CDF function for the Laplace distribution returns the probability that an observation from the Laplace distribution, with the location parameter θ and the scale parameter λ, is less than or equal to x. The equation follows:
C D F ( L A P L A C E , x , θ , λ ) = { 1 2 e ( x - θ ) λ x < θ 1 - 1 2 e ( - ( x - θ ) λ ) x θ

Logistic Distribution

CDF('LOGISTIC',x<,θ,λ> )
Arguments

x

is a numeric random variable.

θ

is a numeric location parameter

Default 0

λ

is a numeric scale parameter.

Default 1
Range λ > 0
Details
The CDF function for the Logistic distribution returns the probability that an observation from a Logistic distribution, with a location parameter θ and a scale parameter λ, is less than or equal to x. The equation follows:
C D F ( L O G I S T I C , x , θ , λ ) = 1 1 + e ( - x - θ λ )

Lognormal Distribution

CDF('LOGNORMAL',x<,θ,λ> )
Arguments

x

is a numeric random variable.

θ

specifies a numeric log scale parameter. (e(θ) is a scale parameter.)

Default 0

λ

specifies a numeric shape parameter.

Default 1
Range λ > 0
Details
The CDF function for the lognormal distribution returns the probability that an observation from a lognormal distribution, with the log scale parameter θ and the shape parameter λ, is less than or equal to x. The equation follows:
C D F ( L O G N , x , θ , λ ) = { 0 x 0 1 λ 2 π - l o g ( x ) e ( - ( v - θ ) 2 2 λ 2 ) d v x > 0

Negative Binomial Distribution

CDF('NEGBINOMIAL',m,p,n)
Arguments

m

is a positive integer random variable that counts the number of failures.

Range m = 0, 1, ...

p

is a numeric probability of success.

Range 0 ≤ p ≤ 1

n

is a numeric value that counts the number of successes.

Range n > 0
Details
The CDF function for the negative binomial distribution returns the probability that an observation from a negative binomial distribution, with probability of success p and number of successes n, is less than or equal to m. The equation follows:
C D F ( N E G B , m , p , n ) = { 0 m < 0 p n Σ j = 0 m ( n + j - 1 n - 1 ) ( 1 - p ) j m 0
Note: There are no location or scale parameters for the negative binomial distribution.

Normal Distribution

CDF('NORMAL',x<,θ,λ> )
Arguments

x

is a numeric random variable.

θ

is a numeric location parameter.

Default 0

λ

is a numeric scale parameter.

Default 1
Range λ > 0
Details
The CDF function for the Normal distribution returns the probability that an observation from the Normal distribution, with the location parameter θ and the scale parameter λ, is less than or equal to x. The equation follows:
C D F ( N O R M A L , x , θ , λ ) = 1 λ 2 π - x e ( - ( v - θ ) 2 2 λ 2 ) d v

Normal Mixture Distribution

CDF('NORMALMIX',x,n,p,m,s)
Arguments

x

is a numeric random variable.

n

is the integer number of mixtures.

Range n = 1, 2, ...

p

is the n proportions, p 1 , p 2 , , p n , where Σ i = 1 i = n p i = 1 .

Range p = 0, 1, ...

m

is the n means m 1 , m 2 , , m n .

s

is the n standard deviations s 1 , s 2 , , s n .

Range s > 0
Details
The CDF function for the normal mixture distribution returns the probability that an observation from a mixture of normal distribution is less than or equal to x. The equation follows:
C D F ( N O R M A L M I X , x , n , p , m , s ) = Σ i = 1 i = n p i C D F ( N O R M A L , x , m i , s i )
Note: There are no location or scale parameters for the normal mixture distribution.

Pareto Distribution

CDF('PARETO',x,a<,k> )
Arguments

x

is a numeric random variable.

a

is a numeric shape parameter.

Range a > 0

k

is a numeric scale parameter.

Default 1
Range k > 0
Details
The CDF function for the Pareto distribution returns the probability that an observation from a Pareto distribution, with the shape parameter a and the scale parameter k, is less than or equal to x. The equation follows:
C D F ( P A R E T O , x , a , k ) = { 0 x < k 1 - ( k x ) a x k

Poisson Distribution

CDF('POISSON',n,m)
Arguments

n

is an integer random variable.

Range n = 0, 1, ...

m

is a numeric mean parameter.

Range m > 0
Details
The CDF function for the Poisson distribution returns the probability that an observation from a Poisson distribution, with mean m, is less than or equal to n. The equation follows:
C D F ( P O I S S O N , n , m ) = { 0 n < 0 Σ i = 0 n e m m i i ! n 0
Note: There are no location or scale parameters for the Poisson distribution.

T Distribution

CDF('T',t,df<,nc> )
Arguments

t

is a numeric random variable.

df

is a numeric degrees of freedom parameter.

Range df > 0

nc

is an optional numeric non-centrality parameter.

Details
The CDF function for the T distribution returns the probability that an observation from a T distribution, with degrees of freedom df and non-centrality parameter nc, is less than or equal to x. This function accepts non-integer degrees of freedom. If nc is omitted or equal to zero, the value returned is from the central T distribution. In the following equation, let ν = d f and let δ = n c . The equation follows:
C D F ( T , t , ν , δ ) = 1 2 ( ν / 2 1 ) Γ ( ν 2 ) 0 x ν - 1 e - 1 2 x 2 1 2 π - t x ν e - 1 2 ( u - δ ) 2 d u d x
Note: There are no location or scale parameters for the T distribution.

Tweedie Distribution

CDF (‘TWEEDIE’, y, p<,µ, φ>)
Arguments

y

is a random variable.

Range y ≥0
Notes This argument is required.
When p>1, y is numeric. When p=1, y is an integer.

p

is the power parameter.

Range p ≥1
Note This argument is required.

µ

is the mean.

Default 1
Range µ>0

φ

is the dispersion parameter.

Default 1
Range φ>0
Details
The CDF function for the Tweedie distribution returns an exponential dispersion model with variance and mean related by the equation variance = ϕ × μ p .
The equation follows:
0 y 1 y Σ j = 1 ( y j α ( p 1 ) j a ϕ j ( 1 α ) ( 2 p ) j j ! Γ ( j α ) ) e ( 1 ϕ ( y μ 1 p 1 1 p μ 2 p 1 2 p ) ) d y
The following relationship applies to the preceding equation:
α = 2 p 1 p
Note: The accuracy of computed Tweedie probabilities is highly dependent on the location in parameter space. Ten digits of accuracy are usually available except when p is near 2 or phi is near 0, in which case the accuracy might be as low as six digits.

Uniform Distribution

CDF('UNIFORM',x<,l,r> )
Arguments

x

is a numeric random variable.

l

is the numeric left location parameter.

Default 0

r

is the numeric right location parameter.

Default 1
Range r > l
Details
The CDF function for the uniform distribution returns the probability that an observation from a uniform distribution, with the left location parameter l and the right location parameter r, is less than or equal to x. The equation follows:
C D F ( U N I F O R M , x , l , r ) = { 0 x < l x - l r - l l x < r 1 x r
Note: The default values for l and r are 0 and 1, respectively.

Wald (Inverse Gaussian) Distribution

CDF('WALD',x,λ<,µ>)
CDF('IGAUSS',x,λ<,µ>)
Arguments

x

is a numeric random variable.

λ

is a numeric shape parameter.

Range λ > 0

µ

is the mean.

Default 1
Range µ > 0
Details
The CDF function for the Wald distribution returns the probability that an observation from a Wald distribution, with shape parameter λ, is less than or equal to x. The equation follows:
F x ( x ) = Φ { λ x ( x μ 1 ) } + e 2 λ / μ Φ { λ x ( x μ + 1 ) }
In the equation, Φ (.) is the standard normal cumulative distribution function. When x≤0, the CDF is 0.

Weibull Distribution

CDF('WEIBULL',x,a<,λ> )
Arguments

x

is a numeric random variable.

a

is a numeric shape parameter.

Range a > 0

λ

is a numeric scale parameter.

Default 1
Range λ > 0
Details
The CDF function for the Weibull distribution returns the probability that an observation from a Weibull distribution, with the shape parameter a and the scale parameter λ, is less than or equal to x. The equation follows:
C D F ( W E I B U L L , x , a , λ ) = { 0 x < 0 1 - e - ( x λ ) a x 0

Example

The following SAS statements produce these results.
SAS Statement
Result
y=cdf('BERN',0,.25);
0.75
y=cdf('BETA',0.2,3,4);
0.09888
y=cdf('BINOM',4,.5,10);
0.37695
y=cdf('CAUCHY',2);
0.85242
y=cdf('CHISQ',11.264,11);
0.57858
y=cdf('EXPO',1);
0.63212
y=cdf('F',3.32,2,3);
0.82639
y=cdf('GAMMA',1,3);
0.080301
y=cdf('GENPOISSON',9,1,.7);
0.906162963
y=cdf('HYPER',2,200,50,10);
0.52367
y=cdf('LAPLACE',1);
0.81606
y=cdf('LOGISTIC',1);
0.73106
y=cdf('LOGNORMAL',1);
0.5
y=cdf('NEGB',1,.5,2);
0.5
y=cdf('NORMAL',1.96);
0.97500
y=cdf('NORMALMIX',2.3,3,.33,.33,.34,
       .5,1.5,2.5,.79,1.6,4.3);
 
0.7181
y=cdf('PARETO',1,1);
0
y=cdf('POISSON',2,1);
0.91970
y=cdf('T',.9,5);
0.79531
y=cdf('TWEEDIE',.8,5);
0.5917629164
y=cdf('UNIFORM',0.25);
0.25
y=cdf('WALD',1,2);
0.62770
y=cdf('WEIBULL',1,2);
0.63212