CDF Function


Computes cumulative distribution functions

Category: Probability

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-Square

'CHISQUARE'

Exponential

'EXPONENTIAL'

F

'F'

Gamma

'GAMMA'

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'

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 random variable.

parm-1, ... ,parm-k

  • are optional shape , location , or scale parameters appropriate for the specific distribution.

  • See: 'Details' on page 419 for complete information about these parameters

Details

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

Bernoulli Distribution

  • CDF ('BERNOULLI', x , p )

where

  • x

    • is a numeric random variable.

  • p

    • is a numeric probability of success.

    • Range: p 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:

click to expand

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

Beta Distribution

  • 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.

    • Range: b > 0

  • l

    • is the numeric left location parameter.

    • Default:

  • r

    • is the right location parameter.

    • Default: 1

    • 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:

click to expand

where

click to expand

and

click to expand

Binomial Distribution

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

where

  • m

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

    • Range: m = 0, 1, ...

  • p

    • is a numeric probability of success.

    • Range: p 1

  • n

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

    • Range: n = 0, 1, ...

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:

click to expand

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

Cauchy Distribution

  • CDF ('CAUCHY', x <, , » >)

where

  • x

    • is a numeric random variable.

    • is a numeric location parameter.

    • Default:

  • »

    • is a numeric scale parameter.

    • Default: 1

    • Range: » > 0

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:

click to expand

Chi-Square Distribution

  • CDF ('CHISQUARE', 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 non- centrality parameter.

    • Range: nc

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

click to expand

where P c (.,.) denotes the probability from the central chi-square distribution:

click to expand

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

click to expand

Exponential Distribution

  • CDF ('EXPONENTIAL', x <, » >)

where

  • x

    • is a numeric random variable.

  • »

    • is a scale parameter.

    • Default: 1

    • Range: » > 0

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:

click to expand

F Distribution

  • 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 non-centrality parameter.

    • Range: nc

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

click to expand

where P f ( f , u 1 , u 2 ) is the probability from the central F distribution with

click to expand

and P B ( 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 <, » >)

where

  • x

    • is a numeric random variable.

  • a

    • is a numeric shape parameter.

    • Range: a > 0

  • »

    • is a numeric scale parameter.

    • Default: 1

    • Range: » > 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 » , is less than or equal to x . The equation follows:

click to expand

Geometric Distribution

  • CDF ('GEOMETRIC', m,p )

where

  • m

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

    • Range: m = 0, 1, ...

  • p

    • is a numeric probability of success.

    • Range: p 1

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:

click to expand

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

Hypergeometric Distribution

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

where

  • 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

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:

click to expand

Laplace Distribution

  • CDF ('LAPLACE', x <, , >)

where

  • x

    • is a numeric random variable.

    • is a numeric location parameter.

    • Default:

  • »

    • is a numeric scale parameter.

    • Default: 1

    • Range: » > 0

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:

click to expand

Logistic Distribution

  • CDF ('LOGISTIC', x <, , » >)

where

  • x

    • is a numeric random variable.

    • is a numeric location parameter

    • Default:

  • »

    • is a numeric scale parameter.

    • Default: 1

    • Range: » > 0

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:

click to expand

Lognormal Distribution

  • CDF ('LOGNORMAL', x <, , » >)

where

  • x

    • is a numeric random variable.

    • is a numeric location parameter.

    • Default:

  • »

    • is a numeric scale parameter.

    • Default: 1

    • Range: » > 0

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

click to expand

Negative Binomial Distribution

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

where

  • 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: p 1

  • n

    • is an integer parameter that counts the number of successes.

    • Range: n = 1, 2, ...

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:

click to expand

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

Normal Distribution

  • CDF ('NORMAL', x <, , » >)

where

  • x

    • is a numeric random variable.

    • is a numeric location parameter.

    • Default:

  • »

    • is a numeric scale parameter.

    • Default: 1

    • Range: » > 0

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:

click to expand

Normal Mixture Distribution

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

where

  • 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 .

    • 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

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:

click to expand

Note: There are no location or scale parameters for the normal mixture distribution.

Pareto Distribution

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

where

  • 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

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:

click to expand

Poisson Distribution

  • CDF ('POISSON', n,m )

where

  • n

    • is an integer random variable.

    • Range: n = 0,1,...

  • 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:

click to expand

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

T Distribution

  • 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 non-centrality parameter.

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. The equation follows:

click to expand

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

Uniform Distribution

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

where

  • x

    • is a numeric random variable.

  • l

    • is the numeric left location parameter.

    • Default:

  • r

    • is the numeric right location parameter.

    • Default: 1

    • Range: r > l

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:

click to expand

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

Wald (Inverse Gaussian) Distribution

  • 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:

click to expand

where (.) denotes the probability from the standard normal distribution.

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

Weibull Distribution

  • CDF ('WEIBULL', x, a <, » >)

where

  • x

    • is a numeric random variable.

  • a

    • is a numeric shape parameter.

    • Range: a > 0

  • »

    • is a numeric scale parameter.

    • Default: 1

    • Range: » > 0

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:

click to expand

Examples

SAS Statements

Results

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( ' 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);

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




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net