StatlectThe Digital Textbook
Index > Glossary

Probability density function

The distribution of a continuous random variable can be characterized through its probability density function (pdf). The probability that a continuous random variable takes a value in a given interval is equal to the integral of its probability density function over that interval, which in turn is equal to the area of the region in the xy-plane bounded by the x-axis, the pdf and the vertical lines corresponding to the boundaries of the interval.

For example, in the picture below the blue line is the pdf of a normal random variable and the area of the red region is equal to the probability that the random variable takes a value comprised between -2 and 2.

Probability density function of a normal distribution

Table of Contents

Definition

The following is a formal definition.

Definition The probability density function of a continuous random variable X is a function [eq1] such that[eq2]for any interval [eq3].

The set of values x for which [eq4] is called the support of X.

Example

Suppose that a random variable X has probability density function[eq5]

To compute the probability that X takes a value in the interval $left[ 1,2
ight] $, you need to integrate the probability density function over that interval:[eq6]

The probability density is not a probability

It is important to understand a fundamental difference between the probability density function, which characterizes the distribution of a continuous random variable, and the probability mass function, which characterizes the distribution of a discrete random variable (remember: a random variable is discrete if the number of values it can take is countable, while the number of values that a continuous random variable can take is uncountable). The probability mass function of a discrete variable Y is a function [eq7] that gives you, for any real number $y$, the probability that Y will be equal to $y$. On the contrary, if X is a continuous variable, its probability density function [eq8] evaluated at a given point x is not the probability that X will be equal to x. As a matter of fact, this probability is equal to zero for any x because[eq9]where [eq10] is any primitive (or indefinite integral) of [eq11].

If you are puzzled by the latter result, you are advised to read the lecture on zero-probability events.

Although it is not a probability, the value of the pdf at a given point x can be given a straightforward interpretation:[eq12]where $Delta x$ is a small increment.

Proof

The proof we are going to give is not rigorous. Rather, we are focusing on the intuition. For the sake of simplicity, we assume that the pdf is a continuous function. Strictly speaking, this is not necessary, although most of the pdfs that are encountered in practice are continuous (by definition, a pdf must be integrable; however, while all continuous functions are integrable, not all integrable functions are continuous). If the pdf is continuous and $Delta x$ is small, then [eq13] is well approximated by [eq14] for any $t$ belonging to the interval [eq15]. It follows that [eq16]

In the above approximate equality, we consider the probability that X will be equal to x or to a value belonging to a small interval near x. In particular, we consider the interval [eq17]. The probability is proportional to the length $Delta x$ of the small interval we are considering. The constant of proportionality [eq14] is the probability density function of X evaluated at x. Thus, the higher the pdf [eq14] is at a given point x, the higher is the probability that X will take a value near x.

Related concepts

Related concepts are those of:

More details

Probability density functions are discussed in more detail in the lecture entitled Random variables.

Keep reading the glossary

Previous entry: Prior probability

Next entry: Probability mass function

The book

Most of the learning materials found on this website are now available in a traditional textbook format.