Chapter Contents

Previous

Next
CDF

CDF



Computes cumulative distribution functions

Category: Probability


Syntax
Arguments
Details
Bernoulli Distribution
Beta Distribution
Binomial Distribution
Cauchy Distribution
Chi-squared Distribution
Exponential Distribution
F Distribution
Gamma Distribution
Geometric Distribution
Hypergeometric Distribution
Laplace Distribution
Logistic Distribution
Lognormal Distribution
Negative Binomial Distribution
Normal Distribution
Pareto Distribution
Poisson Distribution
T Distribution
Uniform Distribution
Wald (Inverse Gaussian) Distribution
Weibull Distribution
Examples

Syntax

CDF ('dist',quantile,parm-1, . . . ,parm-k)

Arguments

'dist'
is a character string that identifies the distribution. Valid distributions are as follows:

Distribution Argument
Bernoulli
'BERNOULLI'
Beta
'BETA'
Binomial
'BINOMIAL'
Cauchy
'CAUCHY'
Chi-squared
'CHISQUARED'
Exponential
'EXPONENTIAL'
F
'F'
Gamma
'GAMMA'
Geometric
'GEOMETRIC'
Hypergeometric
'HYPERGEOMETRIC'
Laplace
'LAPLACE'
Logistic
'LOGISTIC'
Lognormal
'LOGNORMAL'
Negative binomial
'NEGBINOMIAL'
Normal
'NORMAL'|'GAUSS'
Pareto
'PARETO'
Poisson
'POISSON'
T
'T'
Uniform
'UNIFORM'
Wald (inverse Gaussian)
'WALD'|'IGAUSS'
Weibull
'WEIBULL'

Note:   Except for T and F, any distribution can be minimally identified by its first four characters.  [cautionend]

quantile
is a numeric random variable.

parm-1, . . . ,parm-k
are shape, location, or scale parameters appropriate for the specific distribution. See the description for each distribution in "Details" for complete information about these parameters.


Details

Bernoulli Distribution


Syntax

CDF('BERNOULLI',x,p)

where

x
is a numeric random variable.

p
is a numeric probability of success.
Range: 0 [le] p [le] 1

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:

[IMAGE]

Note:   There are no location or scale parameters for this distribution.  [cautionend]

Beta Distribution


Syntax

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

where

x
is a numeric random variable.

a
is a numeric shape parameter.
Range: a > 0

b
is a numeric shape parameter, with b > 0.
Range: b > 0

l
is an optional numeric left location parameter.

r
is an optional right location parameter.
Range: r > l

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 x. The following equation describes the CDF function of the Beta distribution:

[IMAGE]

where

[IMAGE]

and

[IMAGE]

Note:   The default values for l and r are 0 and 1, respectively.   [cautionend]

Binomial Distribution


Syntax

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

where

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

p
is a numeric parameter that is the probability of success.
Range: 0 [le] p [le] 1

n
is an integer parameter that counts the number of independent Bernoulli trials.
Range: n > 0

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:

[IMAGE]

Note:   There are no location or scale parameters for the binomial distribution.  [cautionend]

Cauchy Distribution


Syntax

CDF('CAUCHY',x<,[thetas],[lambda]>)

where

x
is a numeric random variable.

[thetas]
is an optional numeric location parameter.

[lambda]
is an optional numeric scale parameter.
Range: [lambda] > 0

The CDF function for the Cauchy distribution returns the probability that an observation from a Cauchy distribution, with location parameter [thetas] and scale parameter [lambda], is less than or equal to x. The equation follows:

[IMAGE]

Note:   The default values for [thetas] and [lambda] are 0 and 1, respectively.  [cautionend]

Chi-squared Distribution


Syntax

CDF('CHISQUARED',x,df <,nc>)

where

x
is a numeric random variable.

df
is a numeric degrees of freedom parameter.
Range: df > 0

nc
is an optional numeric noncentrality parameter.
Range: nc [ge] 0

The CDF function for the chi-squared distribution returns the probability that an observation from a chi-squared distribution, with df degrees of freedom and noncentrality parameter nc, is less than or equal to x. This function accepts noninteger degrees of freedom. If nc is omitted or equal to zero, the value returned is from the central chi-squared distribution. The following equation describes the CDF function of the chi-squared distribution:

[IMAGE]

where Pc(.,.) denotes the probability from the central chi-squared distribution:

[IMAGE]

and where Pg(y,b) is the probability from the Gamma distribution given by

[IMAGE]


Exponential Distribution


Syntax

CDF('EXPONENTIAL',x <,[lambda]>)

where

x
is a numeric random variable.

[lambda]
is an optional scale parameter.
Range: [lambda] > 0

The CDF function for the exponential distribution returns the probability that an observation from an exponential distribution, with scale parameter [lambda], is less than or equal to x. The equation follows:

[IMAGE]

Note:   The default value for [lambda] is 1.  [cautionend]


F Distribution


Syntax

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

where

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 noncentrality parameter.
Range: nc [ge] 0

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 noncentrality parameter nc, is less than or equal to x. This function accepts noninteger degrees of freedom for ndf and ddf. If nc is omitted or equal to zero, the value returned is from a central F distribution. The following equation describes the CDF function of the F distribution:

[IMAGE]

where Pf(f,u1,u2) is the probability from the central F distribution with

[IMAGE]

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.  [cautionend]

Gamma Distribution


Syntax

CDF('GAMMA',x,a<,[lambda]>)

where

x
is a numeric random variable.

a
is a numeric shape parameter.
Range: a > 0

[lambda]
is an optional numeric scale parameter.
Range: [lambda] > 0

The CDF function for the Gamma distribution returns the probability that an observation from a Gamma distribution, with shape parameter a and scale parameter [lambda], is less than or equal to x. The equation follows:

[IMAGE]

Note:   The default value for [lambda] is 1.  [cautionend]

Geometric Distribution


Syntax

CDF('GEOMETRIC',m,p)

where

m
is a numeric random variable that denotes the number of failures.
Range: m [ge] 0

p
is a numeric probability.
Range: 0 [le] p [le] 1

The CDF function for the geometric distribution returns the probability that an obervation from a geometric distribution, with parameter p, is less than or equal to m. The equation follows:

[IMAGE]

Note:   There are no location or scale parameters for this distribution.  [cautionend]

Hypergeometric Distribution


Syntax

CDF('HYPER',x,m,k,n<,r>)

where

x
is an integer random variable.

m
is an integer population size parameter, with m [ge] 1.
Range:

k
is an integer number of items in the category of interest.
Range: 0 [le] k [le]m

n
is an integer sample size parameter.
Range: 0 [le] n [le] m

r
is an optional numeric odds ratio parameter.
Range: r > 0

The CDF function for the hypergeometric distribution returns the probability that an observation from an extended hypergeometric distribution, with population size m, number of items k, sample size n, and odds ratio r, is less than or equal to x. If r is omitted or equal to 1, the value returned is from the usual hypergeometric distribution. The equation follows:

[IMAGE]


Laplace Distribution


Syntax

CDF('LAPLACE',x<,[Theta],[lambda]>)

where

x
is a numeric random variable.

[thetas]
is an optional numeric location parameter.

[lambda]
is an optional numeric scale parameter.
Range: [lambda] > 0

The CDF function for the Laplace distribution returns the probability that an observation from the Laplace distribution, with location parameter [Theta] and scale parameter [lambda], is less than or equal to x. The equation follows:

[IMAGE]

Note:   The default values for [Theta] and [lambda] are 0 and 1, respectively.  [cautionend]

Logistic Distribution


Syntax

CDF('LOGISTIC',x<,[Theta],[lambda]>)

where

x
is a numeric random variable.

[thetas]
is an optional numeric location parameter

[lambda]
is an optional numeric scale parameter.
Range: [lambda] > 0

The CDF function for the logistic distribution returns the probability that an observation from a logistic distribution, with a location parameter [thetas] and a scale parameter [lambda], is less than or equal to x. The equation follows:

[IMAGE]

Note:   The default values for [thetas] and [lambda] are 0 and 1, respectively.  [cautionend]

Lognormal Distribution


Syntax

CDF('LOGNORMAL',x<,[Theta],[lambda]>)

where

x
is a numeric random variable.

[thetas]
is an optional numeric location parameter

[lambda]
is an optional numeric scale parameter.
Range: [lambda] > 0

The CDF function for the lognormal distribution returns the probability that an observation from a lognormal distribution, with location parameter [thetas] and scale parameter [lambda], is less than or equal to x. The equation follows:

[IMAGE]

Note:   The default values for [thetas] and [lambda] are 0 and 1, respectively.  [cautionend]

Negative Binomial Distribution


Syntax

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

where

m
is a positive integer random variable that counts the number of failures.
Range: m [ge] 0

p
is a numeric probability of success parameter.
Range: 0 [le] p [le] 1

n
is an integer parameter that counts the number of successes.
Range: n [ge] 1

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:

[IMAGE]

Note:   There are no location or scale parameters for the negative binomial distribution.  [cautionend]

Normal Distribution


Syntax

CDF('NORMAL',x<,[Theta],[lambda]>)

where

x
is a numeric random variable.

[thetas]
is an optional numeric location parameter.

[lambda]
is an optional numeric scale parameter.
Range: [lambda] > 0

The CDF function for the normal distribution returns the probability that an observation from the normal distribution, with location parameter [thetas] and scale parameter [lambda], is less than or equal to x. The equation follows:

[IMAGE]

Note:   The default values for [thetas] and [lambda] are 0 and 1, respectively.  [cautionend]

Pareto Distribution


Syntax

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

where

x
is a numeric random variable.

a
is a numeric shape parameter.
Range: a > 0

k
is an optional numeric scale parameter.
Range: k > 0

The CDF function for the Pareto distribution returns the probability that an observation from a Pareto distribution, with shape parameter a and scale parameter k, is less than or equal to x. The equation follows:

[IMAGE]

Note:   The default value for k is 1.  [cautionend]

Poisson Distribution


Syntax

CDF('POISSON',n,m)

where

n
is an integer random variable.

m
is a numeric mean parameter.
Range: m > 0

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:

[IMAGE]

Note:   There are no location or scale parameters for the Poisson distribution.  [cautionend]

T Distribution


Syntax

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

where

t
is a numeric random variable.

df
is a numeric degrees of freedom parameter
Range: df > 0

nc
is an optional numeric noncentrality parameter.

The CDF function for the T distribution returns the probability that an observation from a T distribution, with degrees of freedom df and noncentrality parameter nc, is less than or equal to x. This function accepts noninteger degrees of freedom. If nc is omitted or equal to zero, the value returned is from the central T distribution. The equation follows:

[IMAGE]

Note:   There are no location or scale parameters for the T distribution.  [cautionend]

Uniform Distribution


Syntax

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

where

x
is a numeric random variable.

l
is an optional numeric left location parameter.

r
is an optional numeric right location parameter.
Range: r > l

The CDF function for the uniform distribution returns the probability that an observation from a uniform distribution, with left location parameter l and right location parameter r, is less than or equal to x. The equation follows:

[IMAGE]

Note:   The default values for l and r are 0 and 1, respectively.  [cautionend]

Wald (Inverse Gaussian) Distribution


Syntax

CDF('WALD',x,d)
CDF('IGAUSS',x,d)

where

x
is a numeric random variable.

d
is a numeric shape parameter.
Range: d > 0

The CDF function for the Wald distribution returns the probability that an observation from a Wald distribution, with shape parameter d, is less than or equal to x. The equation follows:

[IMAGE]

where [Phi](.) denotes the probability from the standard normal distribution.

Note:   There are no location or scale parameters for the Wald distribution.  [cautionend]

Weibull Distribution


Syntax

CDF('WEIBULL',x,a<,[lambda]>)

where

x
is a numeric random variable.

a
is a numeric shape parameter.
Range: a > 0

[lambda]
is an optional numeric scale parameter.
Range: [lambda] > 0

The CDF function for the Weibull distribution returns the probability that an observation from a Weibull distribution, with shape parameter a and scale parameter [lambda] is less than or equal to x. The equation follows:

[IMAGE]

Note:   The default value for [lambda] is 1.  [cautionend]


Examples

SAS Statements Results
y=cdf('BERN',0,.25);
0.75
y=cdf('BERN',1,.25);

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('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('PARETO',1,1);
0
y=cdf('POISSON',2,1);
0.91970
y=cdf('T',.9,5);
0.79531
y=cdf('UNIFORM',0.25);
0.25
y=cdf('WALD',1,2);
0.62770
y=cdf('WEIBULL',1,2);
0.63212


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.