PDF Function
Returns a value from a probability density (mass) distribution.
| Categories: | Probability |
| CAS | |
| Alias: | PMF |
Syntax
Required Arguments
distribution
is a character constant, variable, or expression that identifies the distribution. Here are valid distributions:
|
Distribution
|
Argument
|
|---|---|
| Bernoulli |
Bernoulli |
| Beta |
BETA |
| Binomial |
BINOMIAL |
| Cauchy |
CAUCHY |
| Chi-Square |
CHISQUARE |
| Conway-Maxwell-Poisson |
CONMAXPOI |
| 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 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
parameter-1, ..., parameter-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
x
is a numeric constant, variable, or expression that specifies a random variable.
p
is a numeric constant, variable, or expression that specifies the probability of success.
| Range | 0≤p≤1 |
Beta Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
a
is a numeric constant, variable, or expression that specifies a shape parameter.
| Range | a > 0 |
b
is a numeric constant, variable, or expression that specifies a shape parameter.
| Range | b > 0 |
l
is a numeric constant, variable, or expression that specifies the left location parameter.
| Default | 0 |
r
is a numeric constant, variable, or expression that specifies the right location parameter.
| Default | 1 |
| Range | r > l |
Binomial Distribution
m
is an integer random variable that counts the number of successes.
| Range | m=0, 1, ... |
p
is a numeric constant, variable, or expression that specifies the probability of success.
| Range | 0 ≤ p ≤ 1 |
n
is an integer parameter that counts the number of independent Bernoulli trials.
| Range | n=0, 1, ... |
Cauchy Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
θ
is a numeric constant, variable, or expression that specifies a location parameter.
| Default | 0 |
λ
is a numeric constant, variable, or expression that specifies a scale parameter.
| Default | 1 |
| Range | λ > 0 |
Chi-Square Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
df
is a numeric constant, variable, or expression that specifies the degrees of freedom.
| Range | df > 0 |
nc
is a numeric constant, variable, or expression that specifies an optional noncentrality parameter.
| Range | nc ≥ 0 |
Conway-Maxwell-Poisson Distribution
y
is a numeric constant, variable, or expression that specifies a nonnegative integer representing a count.
λ
is a numeric constant, variable, or expression that specifies a location parameter, similar to the Poisson mean parameter.
ν
is a numeric constant, variable, or expression that specifies a dispersion parameter.
Exponential Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
λ
is a numeric constant, variable, or expression that specifies a scale parameter.
| Default | 1 |
| Range | λ > 0 |
F Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
ndf
is a numeric constant, variable, or expression that specifies the numerator degrees of freedom.
| Range | ndf> 0 |
ddf
is a numeric constant, variable, or expression that specifies the denominator degrees of freedom.
| Range | ddf > 0 |
nc
is a numeric constant, variable, or expression that specifies an optional noncentrality parameter.
| Range | nc ≥ 0 |
Gamma Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
a
is a numeric constant, variable, or expression that specifies a shape parameter.
| Range | a > 0 |
λ
is a numeric constant, variable, or expression that specifies a scale parameter.
| Default | 1 |
| Range | λ > 0 |
Generalized Poisson Distribution
x
is a numeric constant, variable, or expression that specifies an integer random variable.
θ
is a numeric constant, variable, or expression that specifies a shape parameter.
| Range | <105 and >0 |
η
Geometric Distribution
m
is a numeric constant, variable, or expression that specifies the number of failures before the first success.
| Range | m ≥ 0 |
p
is a numeric constant, variable, or expression that specifies a probability of success.
| Range | 0 ≤ p ≤ 1 |
Hypergeometric Distribution
x
is a numeric constant, variable, or expression that specifies an integer random variable.
N
is a numeric constant, variable, or expression that specifies an integer population size parameter.
| Range | N=1, 2, ... |
R
is a numeric constant, variable, or expression that specifies an integer number of items in the category of interest.
| Range | R=0, 1, ..., N |
n
is a numeric constant, variable, or expression that specifies an integer sample size parameter.
| Range | n=1, 2, ..., N |
o
is a numeric constant, variable, or expression that specifies an optional odds ratio parameter.
| Range | o > 0 |
Laplace Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
θ
is a numeric constant, variable, or expression that specifies a location parameter.
| Default | 0 |
λ
is a numeric constant, variable, or expression that specifies a scale parameter.
| Default | 1 |
| Range | λ > 0 |
Logistic Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
θ
is a numeric constant, variable, or expression that specifies a location parameter.
| Default | 0 |
λ
is a numeric constant, variable, or expression that specifies a scale parameter.
| Default | 1 |
| Range | λ > 0 |
Lognormal Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
θ
is a numeric constant, variable, or expression that specifies a log scale parameter. exp(θ) is a scale parameter.
| Default | 0 |
λ
is a numeric constant, variable, or expression that specifies a shape parameter.
| Default | 1 |
| Range | λ > 0 |
Negative Binomial Distribution
m
is a numeric constant, variable, or expression that specifies a positive integer random variable that counts the number of failures.
| Range | m=0, 1, ... |
p
is a numeric constant, variable, or expression that specifies a probability of success.
| Range | 0 ≤ p ≤ 1 |
n
is a numeric constant, variable, or expression that specifies a value that counts the number of successes.
| Range | n>0 |
Normal Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
θ
is a numeric constant, variable, or expression that specifies a location parameter.
| Default | 0 |
λ
is a numeric constant, variable, or expression that specifies a scale parameter.
| Default | 1 |
| Range | λ > 0 |
Normal Mixture Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
n
is a numeric constant, variable, or expression that specifies the integer number of mixtures.
| Range | n=1, 2, ... |
pi
si
Pareto Distribution
x
is a numeric constant, variable, or expression that specifies a numeric random variable.
a
is a numeric constant, variable, or expression that specifies a shape parameter.
| Range | a > 0 |
k
is a numeric constant, variable, or expression that specifies a scale parameter.
| Default | 1 |
| Range | k > 0 |
Poisson Distribution
n
is a numeric constant, variable, or expression that specifies an integer random variable.
| Range | n=0, 1, ... |
m
is a numeric constant, variable, or expression that specifies a mean parameter.
| Range | m > 0 |
T Distribution
t
is a numeric constant, variable, or expression that specifies a random variable.
df
is a numeric constant, variable, or expression that specifies the degrees of freedom.
| Range | df > 0 |
nc
is a numeric constant, variable, or expression that specifies an optional noncentrality parameter.
Tweedie Distribution
y
is a numeric constant, variable, or expression that specifies a random variable.
| Range | y ≥0 |
| Notes | This argument is required. |
| When y>1, y is numeric. When p=1, y is an integer. |
p
is a numeric constant, variable, or expression that specifies the power parameter.
| Range | p ≥1 |
| Note | This argument is required. |
µ
is a numeric constant, variable, or expression that specifies the mean parameter.
| Default | 1 |
| Range | µ >0 |
φ
is a numeric constant, variable, or expression that specifies the dispersion parameter.
| Default | 1 |
| Range | φ>0 |
Uniform Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
l
is a numeric constant, variable, or expression that specifies the left location parameter.
| Default | 0 |
r
is a numeric constant, variable, or expression that specifies the right location parameter.
| Default | 1 |
| Range | r > l |
Wald (Inverse Gaussian) Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
λ
is a numeric constant, variable, or expression that specifies a shape parameter.
| Range | λ > 0 |
µ
is a numeric constant, variable, or expression that specifies the mean parameter.
| Default | 1 |
| Range | μ > 0 |
Weibull Distribution
x
is a numeric constant, variable, or expression that specifies a random variable.
a
is a numeric constant, variable, or expression that specifies a shape parameter.
| Range | a > 0 |
λ
is a numeric constant, variable, or expression that specifies a scale parameter.
| Default | 1 |
| Range | λ > 0 |
Example
|
SAS Statement
|
Result
|
|---|---|
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('CONMAXPOI', .2, 2.3, .4); |
0.0097732635 |
y=pdf('EXPO', 1); |
0.36788 |
y=pdf('F', 3.32, 2, 3); |
0.054027 |
y=pdf('GAMMA', 1, 3); |
0.18394 |
y=pdf('GENPOISSON', 9, 1, .7); |
0.0150130915 |
y=pdf('GEOMETRIC', 5, .3); |
y=0.050421 |
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('TWEEDIE', .8, 5); |
0.7422908236 |
y=pdf('UNIFORM', 0.25); |
1 |
y=pdf('WALD', 1, 2); |
0.56419 |
y=pdf('WEIBULL', 1, 2); |
0.73576 |