# Using the probability density function (PDF)

## What is the probability density function (PDF)?

The probability density function describes the likelihood of each specific value that a variable can have.

## Example of a discrete PDF

For a discrete variable, the PDF is a list containing each value that the variable can have and its associated probability. For example, a candy manufacturer produces a single type of candy in multiple colors. 30% of the candies produced are yellow, 10% are orange, 10% are red, 20% are green, and 30% are blue.

## Example of a continuous PDF

For a continuous variable, the PDF is the curve that approximates the shape when its values are displayed on a bar chart or histogram. For example, a machine that cuts corks for wine bottles produces corks with different diameters. In the following bar chart of cork diameters, each bar represents the percent of corks with that corresponding diameter.
The shape of the PDF is different for different distributions. The familiar bell-shaped curve represents the PDF for a normal distribution. While cork diameter follows a normal distribution, other measurements, such as the force it takes to pull the cork out of the wine bottle, may follow a different distribution. For example, the PDF for a log-normal distribution has a long right tail.
By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy