Previous Page | Next Page

Functions and CALL Routines

PDF Function



Returns a value from a probability density (mass) distribution.
Category: Probability
Alias: PMF

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

Syntax

PDF (dist,quantile<,parm-1, ... ,parm-k>)


Arguments

dist

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

quantile

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

parm-1,...,parm-k

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

See: Details for complete information about these parameters

Details


Bernoulli Distribution


Syntax

PDF('BERNOULLI',x,p)

where

x

is a numeric random variable.

p

is a numeric probability of success.

Range: 0 [le] p [le] 1

The PDF function for the Bernoulli distribution returns the probability density function of a Bernoulli distribution, with probability of success equal to p. The PDF function is evaluated at the value x. The equation follows:

[equation]

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


Beta Distribution


Syntax

PDF('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: 0
r

is the right location parameter.

Default: 0
Range: r > l

The PDF function for the beta distribution returns the probability density function of a beta distribution, with shape parameters a and b. The PDF function is evaluated at the value x. The equation follows:

[equation]

Note:   The quantity [equation] is forced to be [equation].   [cautionend]


Binomial Distribution


Syntax

PDF('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: 0 [le] p [le] 1
n

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

Range: n = 0, 1, ...

The PDF function for the binomial distribution returns the probability density function of a binomial distribution, with parameters p and n, which is evaluated at the value m. The equation follows:

[equation]

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


Cauchy Distribution


Syntax

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

where

x

is a numeric random variable.

[thetas]

is a numeric location parameter.

Default: 0
[lambda]

is a numeric scale parameter.

Default: 1
Range: [lambda] > 0

The PDF function for the Cauchy distribution returns the probability density function of a Cauchy distribution, with the location parameter [thetas] and the scale parameter [lambda]. The PDF function is evaluated at the value x. The equation follows:

[equation]


Chi-Square Distribution


Syntax

PDF('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 [ge] 0

The PDF function for the chi-square distribution returns the probability density function of a chi-square distribution, with df degrees of freedom and non-centrality parameter nc. The PDF function is evaluated at the value 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 PDF function of the chi-square distribution,

[equation]

where pc(.,.) denotes the density from the central chi-square distribution:

[equation]

and where pg(y,b) is the density from the gamma distribution, which is given by

[equation]


Exponential Distribution


Syntax

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

where

x

is a numeric random variable.

[lambda]

is a scale parameter.

Default: 1
Range: [lambda] > 0

The PDF function for the exponential distribution returns the probability density function of an exponential distribution, with the scale parameter [lambda]. The PDF function is evaluated at the value x. The equation follows:

[equation]


F Distribution


Syntax

PDF('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 [ge] 0

The PDF function for the F distribution returns the probability density function of an F distribution, with ndf numerator degrees of freedom, ddf denominator degrees of freedom, and non-centrality parameter nc. The PDF function is evaluated at the value x. This PDF 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 $\nu_1$ = ndf, let $\nu_2$ = ddf, and let $\lambda$ = nc. The following equation describes the PDF function of the F distribution.

[equation]

where pf(f,u1,u2) is the density from the central F distribution with

[equation]

and where pB(x,a,b) is the density from the standard beta distribution.

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


Gamma Distribution


Syntax

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

where

x

is a numeric random variable.

a

is a numeric shape parameter.

Range: a > 0
[equation]

is a numeric scale parameter.

Default: 1
Range: [lambda] > 0

The PDF function for the gamma distribution returns the probability density function of a gamma distribution, with the shape parameter a and the scale parameter [lambda]. The PDF function is evaluated at the value x. The equation follows:

[equation]


Geometric Distribution


Syntax

PDF('GEOMETRIC',m,p)

where

m

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

Range: m [ge] 0
p

is a numeric probability of success.

Range: 0 [le] p [le] 1

The PDF function for the geometric distribution returns the probability density function of a geometric distribution, with parameter p. The PDF function is evaluated at the value m. The equation follows:

[equation]

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


Hypergeometric Distribution


Syntax

PDF('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 PDF function for the hypergeometric distribution returns the probability density function of an extended hypergeometric distribution, with population size N, number of items R, sample size n, and odds ratio o. The PDF function is evaluated at the value x. If o is omitted or equal to 1, the value returned is from the usual hypergeometric distribution. The equation follows:

[equation]


Laplace Distribution


Syntax

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

where

x

is a numeric random variable.

[thetas]

is a numeric location parameter.

Default: 0
[lambda]

is a numeric scale parameter.

Default: 1
Range: [lambda] > 0

The PDF function for the Laplace distribution returns the probability density function of the Laplace distribution, with the location parameter [thetas] and the scale parameter [lambda]. The PDF function is evaluated at the value x. The equation follows:

[equation]


Logistic Distribution


Syntax

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

where

x

is a numeric random variable.

[thetas]

is a numeric location parameter.

Default: 0
[lambda]

is a numeric scale parameter.

Default: 1
Range: [lambda] > 0

The PDF function for the logistic distribution returns the probability density function of a logistic distribution, with the location parameter [thetas] and the scale parameter [lambda]. The PDF function is evaluated at the value x. The equation follows:

[equation]


Lognormal Distribution


Syntax

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

where

x

is a numeric random variable.

[thetas]

specifies a numeric log scale parameter. (exp([thetas]) is a scale parameter.)

Default: 0
[lambda]

specifies a numeric shape parameter.

Default: 1
Range: [lambda] > 0

The PDF function for the lognormal distribution returns the probability density function of a lognormal distribution, with the log scale parameter [thetas] and the shape parameter [lambda]. The PDF function is evaluated at the value x. The equation follows:

[equation]


Negative Binomial Distribution


Syntax

PDF('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: 0 [le] p [le] 1
n

is a numeric value that counts the number of successes.

Range: n > 0

The PDF function for the negative binomial distribution returns the probability density function of a negative binomial distribution, with probability of success p and number of successes n. The PDF function is evaluated at the value m. The equation follows:

[equation]

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


Normal Distribution


Syntax

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

where

x

is a numeric random variable.

[thetas]

is a numeric location parameter.

Default: 0
[lambda]

is a numeric scale parameter.

Default: 1
Range: [lambda] > 0

The PDF function for the normal distribution returns the probability density function of a normal distribution, with the location parameter [thetas] and the scale parameter [lambda]. The PDF function is evaluated at the value x. The equation follows:

[equation]


Normal Mixture Distribution


Syntax

PDF('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, [equation], where [equation].

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

is the n means [equation].

s

is the n standard deviations [equation].

Range: s > 0

The PDF 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:

[equation]

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


Pareto Distribution


Syntax

PDF('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 PDF function for the Pareto distribution returns the probability density function of a Pareto distribution, with the shape parameter a and the scale parameter k. The PDF function is evaluated at the value x. The equation follows:

[equation]


Poisson Distribution


Syntax

PDF('POISSON',n,m)

where

n

is an integer random variable.

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

is a numeric mean parameter.

Range: m > 0

The PDF function for the Poisson distribution returns the probability density function of a Poisson distribution, with mean m. The PDF function is evaluated at the value n. The equation follows:

[equation]

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


T Distribution


Syntax

PDF('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 PDF function for the T distribution returns the probability density function of a T distribution, with degrees of freedom df and non-centrality parameter nc. The PDF function is evaluated at the value x. This PDF 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 $\nu$ = df and let $\delta$ = nc.

[equation]

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


Uniform Distribution


Syntax

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

where

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

The PDF function for the uniform distribution returns the probability density function of a uniform distribution, with the left location parameter l and the right location parameter r. The PDF function is evaluated at the value x. The equation follows:

[equation]


Wald (Inverse Gaussian) Distribution


Syntax

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

where

x

is a numeric random variable.

d

is a numeric shape parameter.

Range: d > 0

The PDF function for the Wald distribution returns the probability density function of a Wald distribution, with shape parameter d, which is evaluated at the value x. The equation follows:

[equation]

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


Weibull Distribution


Syntax

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

where

x

is a numeric random variable.

a

is a numeric shape parameter.

Range: a > 0
[lambda]

is a numeric scale parameter.

Default: 1
Range: [lambda] > 0

The PDF function for the Weibull distribution returns the probability density function of a Weibull distribution, with the shape parameter a and the scale parameter [lambda]. The PDF function is evaluated at the value x. The equation follows:

[equation]


Examples

SAS Statements Results
y=pdf('BERN',0,.25);
0.75
y=pdf('BERN',1,.25);
0.25
y=pdf('BETA',0.2,3,4);
1.2288
y=pdf('BINOM',4,.5,10);
0.20508
y=pdf('CAUCHY',2);
0.063662
y=pdf('CHISQ',11.264,11);
0.081686
y=pdf('EXPO',1);
0.36788
y=pdf('F',3.32,2,3);
0.054027
y=pdf('GAMMA',1,3);
0.18394
y=pdf('HYPER',2,200,50,10);
0.28685
y=pdf('LAPLACE',1);
0.18394
y=pdf('LOGISTIC',1);
0.19661
y=pdf('LOGNORMAL',1);
0.39894
y=pdf('NEGB',1,.5,2);
0.25
y=pdf('NORMAL',1.96);
0.058441
y=pdf('NORMALMIX',2.3,3,.33,.33,.34,
       .5,1.5,2.5,.79,1.6,4.3);
 
0.1166
y=pdf('PARETO',1,1);
1
y=pdf('POISSON',2,1);
0.18394
y=pdf('T',.9,5);
0.24194
y=pdf('UNIFORM',0.25);
1
y=pdf('WALD',1,2);
0.56419
y=pdf('WEIBULL',1,2);
0.73576


See Also

Functions:

LOGCDF Function

LOGPDF Function

LOGSDF Function

CDF Function

SDF Function

QUANTILE Function

Previous Page | Next Page | Top of Page