ProbabilityDistribution
ProbabilityDistribution[pdf,{x,xmin,xmax}]
represents the continuous distribution with PDF pdf in the variable x where the pdf is taken to be zero for and .
ProbabilityDistribution[pdf,{x,xmin,xmax,1}]
represents the discrete distribution with PDF pdf in the variable x where the pdf is taken to be zero for and .
ProbabilityDistribution[pdf,{x,…},{y,…},…]
represents a multivariate distribution with PDF pdf in the variables x, y, …, etc.
ProbabilityDistribution[{"CDF",cdf},…]
represents a probability distribution with CDF given by cdf.
ProbabilityDistribution[{"SF",sf},…]
represents a probability distribution with survival function given by sf.
ProbabilityDistribution[{"HF",hf},…]
represents a probability distribution with hazard function given by hf.
Details and Options
- For a multivariate ProbabilityDistribution definition, all variables need to be either discrete or continuous; no mixed cases can occur.
- ProbabilityDistribution[pdf,…] is equivalent to ProbabilityDistribution[{"PDF", pdf},…].
- ProbabilityDistribution[…,Assumptions->assum] specifies the assumptions assum for parameters in the PDF or domain specification.
- The probability density function pdf in the definition of ProbabilityDistribution is assumed to be valid. In particular, it is assumed that it has been normalized to unity.
- The pdf can be normalized by setting Method->"Normalize" while defining a ProbabilityDistribution.
- ProbabilityDistribution can be used with such functions as Mean, CDF, RandomVariate, etc.
Examples
open allclose allBasic Examples (1)
Scope (13)
Distribution Specification (8)
Define a univariate continuous probability distribution:
Define a univariate discrete probability distribution:
Cumulative distribution function:
Define a multivariate continuous distribution:
Verify that the integral of the PDF over the domain of the distribution is 1:
Define a multivariate discrete distribution:
Compute the expectation for an expression in this distribution:
Formula distribution specified by its CDF:
Mean and variance for the distribution:
Formula distribution specified by its survival function:
Kurtosis for the distribution:
Compare with the value obtained by using a random sample from the distribution:
Define probability distribution by its hazard function:
Specify assumptions on a parameter in the definition of a formula distribution:
Verify that the integral of the PDF is 1 under the given assumptions:
Continuous Univariate Distributions (2)
Define a two-sided exponential distribution:
Cumulative distribution function:
Define a distribution with PDF given in terms of DiracDelta:
Discrete Univariate Distributions (1)
Continuous Multivariate Distributions (1)
Options (2)
Method (1)
Normalize a continuous probability distribution:
Verify that the PDF of the distribution is normalized to unity:
Applications (14)
Define a continuous univariate distribution using its probability density function:
Obtain the cumulative distribution function for this distribution:
Study the statistical properties of the distribution:
Find the probability of an event:
Compute a conditional expectation:
Compute the probability that a random variable is within one standard deviation from the mean:
Probability of being within two standard deviations from the mean:
Package it up as a function using NProbability:
Estimate the value of a parameter in ProbabilityDistribution:
Muth distribution is related to GompertzMakehamDistribution and has a PDF:
However, the third parameter of a GompertzMakehamDistribution is required to be positive:
A double-sided power distribution is used in economics:
Create a uniform distribution over the unit disk:
Find each MarginalDistribution:
If dist is the joint distribution of the vector {x,y}, then x and y are not independent:
In a reliability study the CDF for the lifetime distribution is given by with and . What is the mean time to failure (MTTF) for the system? MTTF is also known as the mean:
Hence the mean time to failure is:
Change point distribution is characterized by a two-value hazard function:
The probability density function is discontinuous at :
The limiting case is ExponentialDistribution:
Define a joint probability density function for two variables and :
Determine the value of the normalization factor :
The joint probability distribution is given by:
Compute the probability of an event in this distribution:
Obtain the numerical value of the probability directly:
The waiting times for buying tickets and for buying popcorn at a movie theater are independent and both follow an exponential distribution. The average waiting time for buying a ticket is 10 minutes and the average waiting time for buying popcorn is 5 minutes. Find the probability that a moviegoer waits for a total of less than 25 minutes before taking his or her seat:
Obtain the numerical value of the probability directly:
A factory produces cylindrically shaped roller bearings. The diameters of the bearings are normally distributed with mean 5 cm and standard deviation 0.01 cm. The lengths of the bearings are normally distributed with mean 7 cm and standard deviation 0.01 cm. Assuming that the diameter and the length are independently distributed, find the probability that a bearing has either diameter or length that differs from the mean by more than 0.02 cm:
Define the distribution corresponding to an electron's radial density in a hydrogen atom:
Generate random numbers from an instance of this distribution:
Compare a sample histogram to the distribution density plot:
Find the mean radius and its standard deviation:
Define a joint probability distribution on a square:
Each marginal distribution is the uniform distribution on the interval from to :
Verify that random variate is equal in distribution to the sum of independent uniforms, using characteristic functions:
This is equal to the product of characteristic functions of marginals, i.e. :
This is possible because and are uncorrelated, albeit dependent:
Compute properties for the slice distribution at time of an inhomogeneous Poisson process with intensity function :
The mean is the integral of the intensity function up to time :
Properties & Relations (3)
The first argument of ProbabilityDistribution is the PDF by default:
The integral of the PDF over the distribution domain needs to be unity:
ProbabilityDistribution decomposes into absolutely continuous and discrete parts:
PDF can be given as InterpolatingFunction:
Possible Issues (5)
Probability density function used to define the distribution is assumed to be valid:
The specified PDF is invalid since it is not non-negative and not normalized to 1:
Sampling from this distribution may generate variates outside the distribution domain:
The PDF of this distribution is not normalized to unity:
Normalization will not change the sign of the PDF:
Normalization will not be meaningful when the integral is not defined:
Use TransformedDistribution to create a discrete probability distribution with noninteger support:
Text
Wolfram Research (2010), ProbabilityDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/ProbabilityDistribution.html (updated 2015).
CMS
Wolfram Language. 2010. "ProbabilityDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/ProbabilityDistribution.html.
APA
Wolfram Language. (2010). ProbabilityDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ProbabilityDistribution.html