Formally, a probability distribution has density ''f''(''x'') if ''f''(''x'') is a non-negative Lebesgue-integrable function → such that the probability of the interval ''b'' is given by
:
for any two numbers ''a'' and ''b''. This implies that the total integral of ''f'' must be 1. Conversely, any non-negative Lebesgue-integrable function with total integral 1 is the probability density of a suitably defined probability distribution.
A probability density function is any function ''f''(''x'') that describes the probability density in terms of the input variable ''x'' in a manner described below.
- ''f''(''x'') is greater than or equal to zero for all values of ''x''
- The total area under the graph is 1:
::
The actual probability can then be calculated by taking the integral of the function ''f''(''x'') by the integration interval of the input variable ''x''.
For example: the variable ''x'' being within the interval {Link without Title} would have the actual probability of
:
For example, the continuous Uniform Distribution on the interval {Link without Title} has probability density ''f''(''x'') = 1 for 0 ≤ ''x'' ≤ 1 and zero elsewhere. The standard Normal Distribution has probability density
:
If a random variable ''X'' is given and its distribution admits a probability density function ''f''(''x''), then the Expected Value of ''X'' (if it exists) can be calculated as
:
Not every probability distribution has a density function: the distributions of Discrete Random Variable s do not; nor does the Cantor Distribution , even though it has no discrete component, i.e., does not assign positive probability to any individual point.
A distribution has a density function if and only if its Cumulative Distribution Function ''F''(''x'') is Absolutely Continuous . In this case, ''F'' is Almost Everywhere Differentiable , and its derivative can be used as probability density:
:
If a probability distribution admits a density, then the probability of every one-point set {''a''} is zero.
It is a common mistake to think of ''f''(''a'') as the probability of {''a''}, but this is incorrect; in fact, ''f''(''a'') will often be bigger than 1 - consider a random variable with a uniform distribution between 0 and 1/2.
Two probability densities ''f'' and ''g'' represent the same Probability Distribution precisely if they differ only on a set of Lebesgue Measure Zero .
In the field of Statistical Physics , a non-formal reformulation of the relation above between the derivative of the Cumulative Distribution Function and the probability density function is generally used as the definition of the probability density function. This alternate definition is the following:
If ''dt'' is an infinitely small number, the probability that is included within the interval {Link without Title} is equal to , or:
: |