Search for probability and statistics terms on Statlect
StatLect

Probability density function

by , PhD

The probability density function (pdf) is a function that completely characterizes the distribution of a continuous random variable.

In this page, we provide concise explanations about the meaning and interpretation of the pdf.

Table of Contents

Explanation

There are two main ways to specify the probability distribution of a random variable:

  1. assign a probability to each value that the variable can take;

  2. assign probabilities to intervals of values that the variable can take.

Method 1 is used when the set of possible values of the variable is countable (the variable is discrete).

Method 2 is applied if the set is uncountable (the variable is continuous) and Method 1 cannot be used. Method 2 involves the probability density function. Let us see why and how.

The problem of continuous variables

Method 1 cannot be employed when the set of possible values is uncountable.

This impossibility is due to a number of fundamental mathematical reasons. For example:

To circumvent this impossibility, mathematicians invented a "trick" that relies on probability density functions and integrals.

How the pdf works

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.

In turn, the integral is equal to the area of the region in the xy-plane bounded by:

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

Probability density function of a normal distribution

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]

In order to compute the probability that X takes a value in the interval $left[ 1,2
ight] $, we 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:

Remember that:

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

The lecture on zero-probability events provides further explanations about this apparently puzzling result.

Interpretation of the pdf

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:

Properties

The properties that a pdf needs to satisfy are discussed in the lecture on legitimate probability density functions.

More details, examples and solved exercises

More details about the pdf, examples and solved exercises can be found in the lecture on Random variables.

Keep reading the glossary

Previous entry: Prior probability

Next entry: Probability mass function

How to cite

Please cite as:

Taboga, Marco (2021). "Probability density function", Lectures on probability theory and mathematical statistics. Kindle Direct Publishing. Online appendix. https://www.statlect.com/glossary/probability-density-function.

The books

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