The probability density function helps identify regions of higher and lower probabilities for values of a random variable.
Example of a discrete PDF
For a discrete variable, the PDF gives the probability values for given x-values. 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
The probability density function (PDF) is an equation that represents the probability distribution of a continuous random variable. 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 lognormal distribution has a long right tail.