Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • System Modeler

    Multidomain modeling and simulation of complex systems

  • Compute ServicesUse with Mathematica and Wolfram|One
  • AI AccessUse with Mathematica and Wolfram|One
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Wolfram|Alpha

  • Wolfram|Alpha Website
  • Wolfram|Alpha APIs

AI Products

  • Wolfram AI Ecosystem
  • Wolfram Foundation Tool
  • Wolfram Cloud MCP
  • Wolfram Local MCP
  • Agent One API
  • CAG Component APIs

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • Linguistic Understanding

Additional Deployment Options

  • Wolfram Cloud
  • Wolfram Web Engine
  • wolframscript
  • WSTPServer
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

Wolfram Consulting

Data Science, Finance & Business

  • Artificial Intelligence
  • Data Science
  • Healthcare
  • Real Estate

Engineering

  • Civil Engineering
  • Automotive Engineering
  • Sustainable Energy

Science & Technology

  • AgTech
  • Biosciences
  • Environmental Science
  • Food Science
  • Quantum Computation
  • Social and Behavioral Sciences

More Wolfram Solutions

Technology for Education

  • Research Universities
  • Colleges & Teaching Universities
  • High Schools
  • Resources for Students

Education Initiatives

  • Next-Gen EdTech
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
For AIs
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • System Modeler
    • Compute ServicesUse with Mathematica and Wolfram|One
    • AI AccessUse with Mathematica and Wolfram|One
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Wolfram|Alpha
      • Wolfram|Alpha Website
      • Wolfram|Alpha APIs
    • AI Products
      • Wolfram AI Ecosystem
      • Wolfram Foundation Tool
      • Wolfram Cloud MCP
      • Wolfram Local MCP
      • Agent One API
      • CAG Component APIs
    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • Linguistic Understanding
    • Additional Deployment Options
      • Wolfram Cloud
      • Wolfram Web Engine
      • wolframscript
      • WSTPServer
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions
    • Wolfram Consulting

    Data Science, Finance & Business

    • Artificial Intelligence
    • Data Science
    • Healthcare
    • Real Estate

    Engineering

    • Civil Engineering
    • Automotive Engineering
    • Sustainable Energy

    Science & Technology

    • AgTech
    • Biosciences
    • Environmental Science
    • Food Science
    • Quantum Computation
    • Social and Behavioral Sciences

    More Wolfram Solutions

    Technology for Education

    • Research Universities
    • Colleges & Teaching Universities
    • High Schools
    • Resources for Students

    Education Initiatives

    • Next-Gen EdTech
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • For AIs
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
PDF
  • See Also
    • CDF
    • SurvivalFunction
    • HazardFunction
    • Quantile
    • Probability
    • Expectation
    • ProbabilityDistribution
    • Mean
    • BinCounts
    • Histogram
    • RarerProbability
  • Related Guides
    • Descriptive Statistics
    • Statistical Distribution Functions
    • Random Variables
    • Fourier Analysis
    • Probability & Statistics
  • Tech Notes
    • Discrete Distributions
    • Continuous Distributions
    • See Also
      • CDF
      • SurvivalFunction
      • HazardFunction
      • Quantile
      • Probability
      • Expectation
      • ProbabilityDistribution
      • Mean
      • BinCounts
      • Histogram
      • RarerProbability
    • Related Guides
      • Descriptive Statistics
      • Statistical Distribution Functions
      • Random Variables
      • Fourier Analysis
      • Probability & Statistics
    • Tech Notes
      • Discrete Distributions
      • Continuous Distributions

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
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Parametric Distributions  
Nonparametric Distributions  
Derived Distributions  
Random Processes  
Applications  
Visualizing PDFs  
Computing the CDF  
Confidence Intervals  
Mode of a Distribution  
Affine Transformations  
Poisson Approximation to Binomial  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Tech Notes
Related Guides
Related Links
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • CDF
    • SurvivalFunction
    • HazardFunction
    • Quantile
    • Probability
    • Expectation
    • ProbabilityDistribution
    • Mean
    • BinCounts
    • Histogram
    • RarerProbability
  • Related Guides
    • Descriptive Statistics
    • Statistical Distribution Functions
    • Random Variables
    • Fourier Analysis
    • Probability & Statistics
  • Tech Notes
    • Discrete Distributions
    • Continuous Distributions
    • See Also
      • CDF
      • SurvivalFunction
      • HazardFunction
      • Quantile
      • Probability
      • Expectation
      • ProbabilityDistribution
      • Mean
      • BinCounts
      • Histogram
      • RarerProbability
    • Related Guides
      • Descriptive Statistics
      • Statistical Distribution Functions
      • Random Variables
      • Fourier Analysis
      • Probability & Statistics
    • Tech Notes
      • Discrete Distributions
      • Continuous Distributions

PDF

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 all close all

Basic Examples  (4)

The PDF of a univariate continuous distribution:

Wolfram Language code: PDF[NormalDistribution[0, 1], x]
Wolfram Language code: Plot[%, {x, -5, 5}, Filling -> Axis]

The PDF of a univariate discrete distribution:

Wolfram Language code: PDF[HypergeometricDistribution[20, 50, 100], k]
Wolfram Language code: DiscretePlot[%, {k, 0, 20}, ExtentSize -> 0.5]

The PDF of a multivariate continuous distribution:

Wolfram Language code: PDF[BinormalDistribution[1 / 3], {x, y}]
Wolfram Language code: Plot3D[%, {x, -3, 3}, {y, -3, 3}]

The PDF for a multivariate discrete distribution:

Wolfram Language code: PDF[MultivariatePoissonDistribution[1, {2, 3}], {x, y}]
Wolfram Language code: DiscretePlot3D[%, {x, 0, 10}, {y, 0, 10}, ExtentSize -> 0.5]

Scope  (25)

Parametric Distributions  (7)

Obtain exact numeric results:

Wolfram Language code: PDF[WeibullDistribution[2, 5], 4]
Wolfram Language code: PDF[NegativeBinomialDistribution[20, 1 / 3], 5]

Obtain a machine-precision result:

Wolfram Language code: PDF[WeibullDistribution[2, 5], 4.]

Obtain a result at any precision for a continuous distribution:

Wolfram Language code: PDF[WeibullDistribution[2, 5], N[4, 25]]

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

Wolfram Language code: PDF[NegativeBinomialDistribution[20, N[1 / 3, 30]], 5]

Obtain a symbolic expression for the PDF:

Wolfram Language code: PDF[ChiSquareDistribution[ν], x]
Wolfram Language code: PDF[UniformDistribution[{{a, b}, {c, d}}], {x, y}]

Obtain pure function result:

Wolfram Language code: PDF[GammaDistribution[1, 2]]

Evaluate at a value:

Wolfram Language code: %[3]

PDF threads element-wise over lists:

Wolfram Language code: PDF[NormalDistribution[], {0.0, 0.2, 0.3}]

Multivariate distributions:

Wolfram Language code: PDF[BinormalDistribution[1 / 2], {{0.0, 0.0}, {0.2, 0.2}, {0.3, 0.3}}]

Nonparametric Distributions  (4)

PDF for non-parametric distributions:

Wolfram Language code: r = RandomVariate[NormalDistribution[], 10 ^ 4];
Wolfram Language code: PDF[HistogramDistribution[r], 0.2]
Wolfram Language code: PDF[SmoothKernelDistribution[r], 0.2]

Compare with the value for the underlying parametric distribution:

Wolfram Language code: PDF[NormalDistribution[], 0.2]

Plot the PDF for a histogram distribution:

Wolfram Language code: Plot[PDF[HistogramDistribution[RandomVariate[NormalDistribution[], 10 ^ 3]], x]//Evaluate, {x, -3, 3}, Filling -> Axis]

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

Wolfram Language code: PDF[KernelMixtureDistribution[RandomVariate[GammaDistribution[1, 2], 10 ]], x]

Plot of the PDF of a bivariate smooth kernel distribution:

Wolfram Language code: Plot3D[PDF[SmoothKernelDistribution[RandomVariate[BinormalDistribution[1 / 3], 30]], {x, y}]//Evaluate, {x, -3, 3}, {y, -3, 3}, PlotRange -> {0, 0.4}]

Derived Distributions  (10)

Product of independent distributions:

Wolfram Language code: pdf = PDF[ProductDistribution[TriangularDistribution[{2, 4}], TriangularDistribution[{1, 7}]], {x, y}]
Wolfram Language code: Plot3D[pdf, {x, 1, 5}, {y, 0, 8}, PlotRange -> All]

Component mixture distribution:

Wolfram Language code: pdf = PDF[MixtureDistribution[{1, 4}, {NormalDistribution[a, b], NormalDistribution[c, d]}], x]
Wolfram Language code: Plot[pdf /. {a -> 0, b -> 1, c -> 6, d -> 3 / 2}, {x, -2, 10}, Filling -> Axis]

Quadratic transformation of a discrete distribution:

Wolfram Language code: PDF[TransformedDistribution[x ^ 2, xPoissonDistribution[2]], y]
Wolfram Language code: DiscretePlot[%, {y, 0, 50}, PlotRange -> {0, 0.3}]

Censored distribution:

Wolfram Language code: PDF[CensoredDistribution[{-2, 4}, CauchyDistribution[0, 1]], x]
Wolfram Language code: Integrate[%, {x, -Infinity, Infinity}]

Truncated distribution:

Wolfram Language code: PDF[TruncatedDistribution[{2, 3}, TriangularDistribution[{1, 4}]], x]
Wolfram Language code: Plot[{PDF[TriangularDistribution[{1, 4}], x], %}, {x, 1, 5}, Filling -> Axis]

Parameter mixture distribution:

Wolfram Language code: PDF[ParameterMixtureDistribution[PoissonDistribution[μ], μUniformDistribution[{2, 3}]], x]

Copula distribution:

Wolfram Language code: PDF[CopulaDistribution[{"Frank", 3}, {ExponentialDistribution[2], ExponentialDistribution[5]}], {x, y}]
Wolfram Language code: NIntegrate[%, {x, -Infinity, Infinity}, {y, -Infinity, Infinity}]

Formula distribution defined by its PDF:

Wolfram Language code: PDF[ProbabilityDistribution[(Sqrt[2] / Pi)(1 / (1 + x ^ 4)), {x, -Infinity, Infinity}], x]

Defined by its CDF:

Wolfram Language code: PDF[ProbabilityDistribution[{"CDF", Piecewise[{{-2 + x, 2 ≤ x ≤ 3}, {1, x > 3}}, 0]}, {x, -Infinity, Infinity}], x]

Defined by its survival function:

Wolfram Language code: PDF[ProbabilityDistribution[{"SF", Piecewise[{{1 - 2(-2 + x) ^ 2, 2 ≤ x ≤ 5 / 2}, {2(3 - x) ^ 2, 5 / 2 < x ≤ 3}, {1, x < 2}}, 0]}, {x, -Infinity, Infinity}], x]

Marginal distribution:

Wolfram Language code: PDF[MarginalDistribution[ ProbabilityDistribution[1 / (E ^ (y ^ 2 / 2)(Pi ^ (3 / 2)(1 + x ^ 4))), {x, -Infinity, Infinity}, {y, -Infinity, Infinity}], 2], y]

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

Wolfram Language code: 𝒟 = NormalDistribution[Quantity[4, "Meters"], Quantity[1 / 2, "Meters"]]
Wolfram Language code: PDF[𝒟, x]

This allows for direct quantity substitution:

Wolfram Language code: % /. x -> Quantity[387., "Centimeters"]

Compare with the direct use of the quantity argument:

Wolfram Language code: PDF[𝒟, Quantity[387., "Centimeters"]]

Random Processes  (4)

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

Wolfram Language code: PDF[PoissonProcess[μ][2], x]
Wolfram Language code: DiscretePlot[Evaluate[% /. μ -> 2], {x, 0, 15}, ExtentSize -> 0.5]

A continuous-state random process:

Wolfram Language code: PDF[WienerProcess[][2], x]
Wolfram Language code: Plot[%, {x, -3, 3}, Filling -> Axis]

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

Wolfram Language code: PDF[PoissonProcess[μ][{2, 3}], {x, y}]
Wolfram Language code: DiscretePlot3D[Evaluate[% /. μ -> 2], {x, 0, 10}, {y, 0, 10}, ExtentSize -> 0.5]

A multi-slice for a continuous-state process:

Wolfram Language code: PDF[WienerProcess[][{2, 3}], {x, y}]
Wolfram Language code: Plot3D[%, {x, -3, 3}, {y, -3, 3}]

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

Wolfram Language code: PDF[StationaryDistribution[QueueingProcess[λ, μ, 2]], x]//FullSimplify
Wolfram Language code: DiscretePlot[Evaluate[% /. {μ -> 3, λ -> 2.9}], {x, 0, 10}, ExtentSize -> 0.5]

Find the slice distribution for time :

Wolfram Language code: PDF[WienerProcess[1, 1][t], x]
Wolfram Language code: Plot3D[%, {x, -3, 8}, {t, 1, 5}, AxesLabel -> Automatic, PlotRange -> All]

Applications  (10)

Visualizing PDFs  (5)

Plot a continuous PDF:

Wolfram Language code: Plot[PDF[NormalDistribution[0, 1], x], {x, -3, 3}]

Plot a discrete PDF:

Wolfram Language code: DiscretePlot[PDF[PoissonDistribution[10], x], {x, 0, 30}]

Plot a continuous bivariate PDF:

Wolfram Language code: Plot3D[PDF[DirichletDistribution[{3, 2, 5}], {x, y}], {x, 0, 1}, {y, 0, 1}, AxesLabel -> Automatic, PlotRange -> All, Exclusions -> None]

Plot a discrete bivariate PDF:

Wolfram Language code: DiscretePlot3D[PDF[MultivariatePoissonDistribution[1, {2, 3}], {x, y}], {x, 0, 10}, {y, 0, 10}, PlotRange -> All]
Wolfram Language code: DiscretePlot3D[PDF[MultivariatePoissonDistribution[1, {2, 3}], {x, y}], {x, 0, 10}, {y, 0, 10}, PlotRange -> All, ExtentSize -> Full, PlotStyle -> Lighter[Blue, 0.5]]

Plot a family of univariate continuous PDFs:

Wolfram Language code: Plot3D[PDF[NormalDistribution[0, σ], x], {σ, 1 / 2, 2}, {x, -3, 3}, AxesLabel -> Automatic]

Computing the CDF  (1)

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

Wolfram Language code: cdf[x] /. DSolve[{cdf'[x] == PDF[NormalDistribution[], x], cdf[0] == 1 / 2}, cdf, x][[1]]
Wolfram Language code: CDF[NormalDistribution[], x]
Wolfram Language code: FullSimplify[% - %%]

Confidence Intervals  (1)

Plot a confidence interval for a standard normal distribution:

Wolfram Language code: pdf = PDF[NormalDistribution[], x]

Compute boundaries of the 70% confidence interval:

Wolfram Language code: {xl, xr} = Function[α, Quantile[NormalDistribution[], {(1 - α/2.0), (1 + α/2.0)}]][Quantity[70, "Percent"]]
Wolfram Language code: Show[Plot[pdf, {x, -1.7, 1.7}, Filling -> Axis, AxesOrigin -> {0, 0}, RegionFunction -> (Not[xl < # < xr]&)], Plot[pdf, {x, xl, xr}], PlotRange -> {0, 0.4}, Ticks -> {Automatic, None}]

Mode of a Distribution  (1)

Compute the mode of a distribution from its PDF:

Wolfram Language code: 𝒟 = ProbabilityDistribution[6 / 125(-x ^ 2 + x + 6), {x, -2, 3}];
Wolfram Language code: pdf = PDF[𝒟, x]
Wolfram Language code: Plot[pdf, {x, -4, 5}, Filling -> Axis]
Wolfram Language code: mode = Maximize[pdf, x]

Affine Transformations  (1)

Compute the PDF after an affine transformation:

Wolfram Language code: PDF[TransformedDistribution[{-2 x - 3 y, 5 x - 7 y}, {x, y}DirichletDistribution[{12, 3, 14}]], {a, b}]

Poisson Approximation to Binomial  (1)

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

Wolfram Language code: n = 10000;p = 0.0002;
Wolfram Language code: pdf1 = PDF[PoissonDistribution[n p], x]
Wolfram Language code: pdf2 = PDF[BinomialDistribution[n, p], x]
Wolfram Language code: Table[pdf1, {x, 0, 5}]
Wolfram Language code: Table[pdf2, {x, 0, 5}]

Properties & Relations  (9)

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

Wolfram Language code: Integrate[PDF[GammaDistribution[α, β], x], {x, 0, Infinity}, Assumptions -> α > 0 && β > 0]
Wolfram Language code: Sum[PDF[GeometricDistribution[p], k], {k, 0, Infinity}]

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

Wolfram Language code: Integrate[PDF[ExponentialDistribution[λ], ξ], {ξ, -∞, x}, Assumptions -> x∈Reals && λ > 0]
Wolfram Language code: CDF[ExponentialDistribution[λ], x]
Wolfram Language code: FullSimplify[%% - %, λ > 0]

The CDF is the integral of the PDF ; :

Wolfram Language code: 𝒟 = DirichletDistribution[{1, 2, 3}];
Wolfram Language code: int = Integrate[PDF[𝒟, {ξ, ψ}], {ξ, -∞, x}, {ψ, -∞, y}, Assumptions -> {x, y}∈Reals];
Wolfram Language code: cdf = CDF[𝒟, {x, y}];
Wolfram Language code: FullSimplify[int - cdf, {x, y}∈Reals]

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

Wolfram Language code: Sum[PDF[GeometricDistribution[p], m], {m, -∞, Floor[n]}]//FullSimplify
Wolfram Language code: CDF[GeometricDistribution[p], n]
Wolfram Language code: FullSimplify[% - %%, Im[n] == 0]

The survival function is the integral of the PDF ; :

Wolfram Language code: Integrate[PDF[ExponentialDistribution[λ], ξ], {ξ, x, ∞}, Assumptions -> x∈Reals && λ > 0]
Wolfram Language code: SurvivalFunction[ExponentialDistribution[λ], x]
Wolfram Language code: FullSimplify[%% - %, λ > 0]

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

Wolfram Language code: 𝒟 = ChiSquareDistribution[ν];
Wolfram Language code: Simplify[Subsuperscript[∫, 0, ∞]x^2 PDF[𝒟, x]ⅆx, ν > 0]
Wolfram Language code: Expectation[x^2, x𝒟]

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

Wolfram Language code: 𝒟 = PoissonDistribution[μ];
Wolfram Language code: Subsuperscript[∑, ξ = 0, ∞]ξ^2PDF[𝒟, ξ]
Wolfram Language code: Expectation[ξ ^ 2, ξ𝒟]

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

Wolfram Language code: Probability[x == 5, xPoissonDistribution[m]]
Wolfram Language code: PDF[PoissonDistribution[m], 5]

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

Wolfram Language code: HazardFunction[NormalDistribution[], x]
Wolfram Language code: PDF[NormalDistribution[], x] / SurvivalFunction[NormalDistribution[], x]

Possible Issues  (3)

Symbolic closed forms do not exist for some distributions:

Wolfram Language code: PDF[StableDistribution[0, 1.8, -0.5, 1, 2], x]

Numerical evaluation works:

Wolfram Language code: PDF[StableDistribution[0, 1.8, -0.5, 1, 2], 0.3]

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

Wolfram Language code: PDF[CauchyDistribution[2, 3], x] /. {x -> I}

Passing it as an argument will generate correct results:

Wolfram Language code: PDF[CauchyDistribution[2, 3], I]

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:

Wolfram Language code: 𝒟 = TransformedDistribution[x y, {xUniformDistribution[{0, 1}], yDiscreteUniformDistribution[{0, 1}]}];

The result of the PDF is not normalized:

Wolfram Language code: PDF[𝒟, x]

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

Wolfram Language code: Probability[x == 0, x𝒟]

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

Wolfram Language code: cdf = CDF[𝒟, x]
Wolfram Language code: Plot[cdf, {x, -0.1, 1}, ExclusionsStyle -> {Directive[Thick, Red], Directive[PointSize[Large], Red]}, Filling -> Axis]

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

Wolfram Language code: Expectation[Log[1 + x], x𝒟]
Wolfram Language code: Log[1 + RandomVariate[𝒟, 10 ^ 5]]//Mean

Neat Examples  (3)

PDF for a truncated binormal distribution:

Wolfram Language code: 𝒟 = TruncatedDistribution[{{-∞, 1 / 2}, {-∞, ∞}}, BinormalDistribution[1 / 7]];
Wolfram Language code: Plot3D[{PDF[𝒟 , {x, y}], PDF[BinormalDistribution[(1/7)], {x, y}]}//Evaluate, {x, -3, 3}, {y, -3, 3}, PlotRange -> All, PlotPoints -> 35]

Isosurfaces for a trivariate normal distribution:

Wolfram Language code: Σ = With[{σ1 = 1, σ2 = 2, σ3 = 1, ρ23 = 0, ρ13 = 0}, {{σ1 ^ 2, σ1 σ2 ρ12, σ1 σ3 ρ13}, {σ1 σ2 ρ12, σ2 ^ 2, σ2 σ3 ρ23}, {σ1 σ3 ρ13, σ2 σ3 ρ23, σ3 ^ 2}}]; μ = {0., 0, 0};
Wolfram Language code: Block[{ρ12 = 1 / 2}, ContourPlot3D[PDF[MultinormalDistribution[μ, Σ], {x, y, z}]//Evaluate, {x, -3, 3}, {y, -3, 3}, {z, -3, 3}, Mesh -> None, Contours -> 4, ContourStyle -> {Red, Yellow, Green, Blue}, RegionFunction -> Function[{x, y, z}, x < 0 || y > 0], PlotLabel -> ρ12, PlotRange -> Full]]

Isosurfaces for PDF when varying a correlation coefficient:

Wolfram Language code: Σ = With[{σ1 = 1, σ2 = 2, σ3 = 1, ρ23 = 0, ρ13 = 0}, {{σ1 ^ 2, σ1 σ2 ρ12, σ1 σ3 ρ13}, {σ1 σ2 ρ12, σ2 ^ 2, σ2 σ3 ρ23}, {σ1 σ3 ρ13, σ2 σ3 ρ23, σ3 ^ 2}}]; μ = {0., 0, 0}; DistributeDefinitions[μ, Σ];
Wolfram Language code: ParallelTable[ ContourPlot3D[PDF[MultinormalDistribution[μ, Σ], {x, y, z}]//Evaluate, {x, -3, 3}, {y, -3, 3}, {z, -3, 3}, Mesh -> None, Contours -> {0.01}, PlotLabel -> ρ12, PlotRange -> Full], {ρ12, {-0.95, -0.75, -0.5, -0.25, 0, 0.25, 0.5, 0.75, 0.95}}]

See Also

CDF  SurvivalFunction  HazardFunction  Quantile  Probability  Expectation  ProbabilityDistribution  Mean  BinCounts  Histogram  RarerProbability

Tech Notes

    ▪
  • Discrete Distributions
  • ▪
  • Continuous Distributions

Related Guides

    ▪
  • Descriptive Statistics
  • ▪
  • Statistical Distribution Functions
  • ▪
  • Random Variables
  • ▪
  • Fourier Analysis
  • ▪
  • Probability & Statistics

Related Links

  • An Elementary Introduction to the Wolfram Language : Creating Websites and Apps

History

Introduced in 2007 (6.0) | Updated in 2010 (8.0)

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

CMS

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2026_pdf, organization={Wolfram Research}, title={PDF}, year={2010}, url={https://reference.wolfram.com/language/ref/PDF.html}, note=[Accessed: 01-September-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • AI Access
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English