Computing the probability density function of a continuous random variable

In the previous section, we saw how to calculate the pmf of a discrete random variable. In this section, we will calculate the probability density function (pdf) of a continuous random variable.

In order to understand pdf better, we will look at a toy example. Let us take a scenario where we are considering John—a student—and his time of arrival for a class.

In the previous section, we looked at a discrete scenario—John could be early to class or late to class. In this section, we will be considering the magnitude of how early to class or late to class John may arrive in minutes. So, we will translate the problem set from a discrete outcome (late or early) to a continuous outcome (magnitude of minutes that he was early to class).

Computationally, to go from discrete to continuous we simply replace sums with integrals.

This can be visually represented in charts, as follows:

Let's say we would like to calculate the area of the shaded region in the left chart from a to the b on the x axis.

The area calculation can be achieved by breaking down the larger shaded region on the left chart into rectangles that have very small widths on the x axis. Thus, the area of the shaded region now becomes:

In the preceding scenario, the function f(x) is called a probability density function if it satisfies the following conditions:

  • f(x)>0—that is, f is non-negative
  • ∫f(x) dx = 1 (this is equivalent to P(−∞ < X < ∞) = 1)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset