Skip to content

What Is Probability Density Function (PDF)?

Last Updated on 2024-08-05 by Clay

The probability density function (PDF) is a fundamental concept in probability theory and statistics, describing the probability distribution of a random variable across its range of values.


Definition

For a continuous random variable X , its probability density function f(x) satisfies the following conditions:

  1. Non-negativity: The probability value is not negative, for all x , f(x) \ge 0
  2. Normalization: The integral over the entire domain is 1 (the total probability is 1), i.e.:

\int_{-\infty}^{\infty}f(x)dx=1

  1. Interval Probability: The probability that the random variable X lies within the interval [a, b] can also be obtained through integration:

P(a \le X \le b) = \int_{a}^{b}f(x)dx


Applications

1. Calculating the Expected Value of a Random Variable

The expected value of a random variable is the weighted average of its values, with the weights being the probabilities of each value. This is called the weighted average rather than just the average because the probabilities of the variable's values are not necessarily equal.

For example, if we consider a fair six-sided die, the probability of each side appearing is equal. In this case, the expected value is the arithmetic mean of the variable's values. Specifically:

\displaystyle E(X) = \sum_{i=1}^{6} i \cdot P(X=i) \newline = \sum_{i=1}^{6} i \cdot \frac{1}{6} \newline = \frac{1}{6}(1+2+3+4+5+6) \newline = \frac{1}{6} \cdot 21 \newline = 3.5

However, if we consider a pond filled with different types of fish and calculate the expected value of catching a carp, the probabilities are weighted by the different types of fish and their respective probabilities.

  • Number of carps n_1=30 , value v_1 = 100 currency units
  • Number of goldfish n_2=50 , value v_2 = 20 currency units
  • Number of other fish n_3=20 , value v_3 = 10 currency units

The total number of fish is n_1 + n_2 + n_3 = N , which is 100 fish. We can then calculate the probability of catching each type of fish:

  • Probability of catching a carp P(Carp) = \frac{n_1}{N} = \frac{30}{100} = 0.3
  • Probability of catching a goldfish P(Goldfish) = \frac{n_2}{N} = \frac{50}{100} = 0.5
  • Probability of catching other fish P(Others)=\frac{n_3}{N}=\frac{20}{100}=0.2

Expected value E(X)=v_1\cdot P(Carp) + v_2 \cdot P(Goldfish) + v_3\cdot P(Others)

= 100 \times 0.3 + 20 \times 0.5 + 10 \times 0.2

= 30 + 10 + 2 = 42

Thus, the expected value of catching a fish is 42 currency units.



2. Calculating the Variance of a Random Variable

The variance measures the degree of dispersion around the mean. Simply subtracting the mean from each data point can result in positive and negative errors canceling each other out. Taking the absolute value is less convenient for integration and differentiation. Instead, squaring the differences is more convenient and amplifies the effect of larger deviations.

E(X)=\int_{-\infty}^{\infty}xf(x)dx

\displaystyle Var(X) = E\left [ (X-E(X))^2 \right ] \newline = \int_{-\infty}^{\infty}(x-E(X))^2 \cdot f(x) \, dx


References


Read More

Tags:

Leave a Reply