WOLFRAM

PDF[dist,x]

gives the probability density function for the distribution dist evaluated at x.

PDF[dist,{x1,x2,}]

gives the multivariate probability density function for a distribution dist evaluated at {x1,x2,}.

PDF[dist]

gives the PDF as a pure function.

Details

  • For discrete distributions, PDF is also known as a probability mass function.
  • For continuous distributions, PDF[dist,x] dx gives the probability that an observed value will lie between x and x+dx for infinitesimal dx.
  • For discrete distributions, PDF[dist,x] gives the probability that an observed value will be x.
  • For continuous multivariate distributions, PDF[dist,{x1,x2,}]dx1 dx2 gives the probability that an observed value will lie in the box given by the limits xi and xi+dxi for infinitesimal dxi.
  • For discrete multivariate distributions, PDF[dist,{x1,x2,}] gives the probability that an observed value will be {x1,x2,}.

Examples

open allclose all

Basic Examples  (4)Summary of the most common use cases

The PDF of a univariate continuous distribution:

Out[1]=1
Out[2]=2

The PDF of a univariate discrete distribution:

Out[1]=1
Out[2]=2

The PDF of a multivariate continuous distribution:

Out[1]=1
Out[2]=2

The PDF for a multivariate discrete distribution:

Out[1]=1
Out[2]=2

Scope  (23)Survey of the scope of standard use cases

Parametric Distributions  (5)

Obtain exact numeric results:

Out[1]=1
Out[2]=2

Obtain a machine-precision result:

Out[1]=1

Obtain a result at any precision for a continuous distribution:

Out[1]=1

Obtain a result at any precision for a discrete distribution with inexact parameters:

Out[1]=1

PDF threads element-wise over lists:

Out[1]=1

Multivariate distributions:

Out[2]=2

Nonparametric Distributions  (4)

PDF for non-parametric distributions:

Out[2]=2
Out[3]=3

Compare with the value for the underlying parametric distribution:

Out[4]=4

Plot the PDF for a histogram distribution:

Out[1]=1

Closed-form expression for the PDF of a kernel mixture distribution:

Out[1]=1

Plot of the PDF of a bivariate smooth kernel distribution:

Out[1]=1

Derived Distributions  (10)

Product of independent distributions:

Out[1]=1
Out[2]=2

Component mixture distribution:

Out[1]=1
Out[2]=2

Quadratic transformation of a discrete distribution:

Out[1]=1
Out[2]=2

Censored distribution:

Out[1]=1
Out[2]=2

Truncated distribution:

Out[1]=1
Out[2]=2

Parameter mixture distribution:

Out[1]=1

Copula distribution:

Out[1]=1
Out[2]=2

Formula distribution defined by its PDF:

Out[1]=1

Defined by its CDF:

Out[2]=2

Defined by its survival function:

Out[3]=3

Marginal distribution:

Out[1]=1

The PDF for QuantityDistribution assumes the argument is a Quantity with compatible units:

Out[1]=1
Out[2]=2

This allows for direct quantity substitution:

Out[3]=3

Compare with the direct use of the quantity argument:

Out[4]=4

Random Processes  (4)

Find the PDF for a SliceDistribution of a discrete-state random process:

Out[1]=1
Out[2]=2

A continuous-state random process:

Out[3]=3
Out[4]=4

Find the multiple time-slice PDF for a discrete-state process:

Out[1]=1
Out[2]=2

A multi-slice for a continuous-state process:

Out[3]=3
Out[4]=4

Find the PDF for the StationaryDistribution of a discrete-state random process:

Out[1]=1
Out[2]=2

Find the slice distribution for time :

Out[1]=1
Out[2]=2

Applications  (10)Sample problems that can be solved with this function

Visualizing PDFs  (5)

Plot a continuous PDF:

Out[1]=1

Plot a discrete PDF:

Out[1]=1

Plot a continuous bivariate PDF:

Out[1]=1

Plot a discrete bivariate PDF:

Out[1]=1
Out[2]=2

Plot a family of univariate continuous PDFs:

Out[1]=1

Computing the CDF  (1)

Compute the CDF from the PDF by solving a differential equation:

Out[1]=1
Out[2]=2
Out[3]=3

Confidence Intervals  (1)

Plot a confidence interval for a standard normal distribution:

Out[1]=1

Compute boundaries of the 70% confidence interval:

Out[2]=2
Out[3]=3

Mode of a Distribution  (1)

Compute the mode of a distribution from its PDF:

Out[2]=2
Out[3]=3
Out[4]=4

Affine Transformations  (1)

Compute the PDF after an affine transformation:

Out[1]=1

Poisson Approximation to Binomial  (1)

Verify the Poisson approximation of the binomial distribution for large and small :

Out[2]=2
Out[3]=3
Out[4]=4
Out[5]=5

Properties & Relations  (9)Properties of the function, and connections to other functions

The integral or sum over the support of the distribution is unity:

Out[1]=1
Out[2]=2

The CDF is the integral of the PDF for continuous distributions; :

Out[1]=1
Out[2]=2
Out[3]=3

The CDF is the integral of the PDF ; :

Out[4]=4

The CDF is the sum of the PDF for discrete distributions :

Out[1]=1
Out[2]=2
Out[3]=3

The survival function is the integral of the PDF ; :

Out[1]=1
Out[2]=2
Out[3]=3

Expectation for for a continuous distribution is the PDF-weighted integral :

Out[2]=2
Out[3]=3

The expectation for for a discrete distribution is the PDF-weighted sum :

Out[2]=2
Out[3]=3

The probability of for a discrete univariate distribution is given by the PDF:

Out[1]=1
Out[2]=2

The HazardFunction of a distribution is a ratio of the PDF and the survival function:

Out[1]=1
Out[2]=2

Possible Issues  (3)Common pitfalls and unexpected behavior

Symbolic closed forms do not exist for some distributions:

Out[1]=1

Numerical evaluation works:

Out[2]=2

Substitution of invalid values into symbolic outputs can give results that are not meaningful:

Out[1]=1

Passing it as an argument will generate correct results:

Out[2]=2

The PDF of a distribution whose measure is incompatible with the Lebesgue measure or counting measure on the integer lattice may not evaluate or may give an incorrect result:

The result of the PDF is not normalized:

Out[2]=2

The distribution measure has an atom at the origin, and hence is incompatible with the Lebesgue measure:

Out[3]=3

The incompatibility manifests itself in a jump discontinuity of the CDF at the atom location:

Out[4]=4
Out[5]=5

Mixed distributions are fully supported by Expectation, Probability, RandomVariate, etc.:

Out[6]=6
Out[7]=7

Neat Examples  (3)Surprising or curious use cases

PDF for a truncated binormal distribution:

Out[2]=2

Isosurfaces for a trivariate normal distribution:

Out[2]=2

Isosurfaces for PDF when varying a correlation coefficient:

Out[2]=2
Wolfram Research (2007), PDF, Wolfram Language function, https://reference.wolfram.com/language/ref/PDF.html (updated 2010).
Wolfram Research (2007), PDF, Wolfram Language function, https://reference.wolfram.com/language/ref/PDF.html (updated 2010).

Text

Wolfram Research (2007), PDF, Wolfram Language function, https://reference.wolfram.com/language/ref/PDF.html (updated 2010).

Wolfram Research (2007), PDF, Wolfram Language function, https://reference.wolfram.com/language/ref/PDF.html (updated 2010).

CMS

Wolfram Language. 2007. "PDF." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2010. https://reference.wolfram.com/language/ref/PDF.html.

Wolfram Language. 2007. "PDF." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2010. https://reference.wolfram.com/language/ref/PDF.html.

APA

Wolfram Language. (2007). PDF. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PDF.html

Wolfram Language. (2007). PDF. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PDF.html

BibTeX

@misc{reference.wolfram_2025_pdf, author="Wolfram Research", title="{PDF}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/PDF.html}", note=[Accessed: 25-May-2025 ]}

@misc{reference.wolfram_2025_pdf, author="Wolfram Research", title="{PDF}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/PDF.html}", note=[Accessed: 25-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_pdf, organization={Wolfram Research}, title={PDF}, year={2010}, url={https://reference.wolfram.com/language/ref/PDF.html}, note=[Accessed: 25-May-2025 ]}

@online{reference.wolfram_2025_pdf, organization={Wolfram Research}, title={PDF}, year={2010}, url={https://reference.wolfram.com/language/ref/PDF.html}, note=[Accessed: 25-May-2025 ]}