How does the Probability Density Function work?

In this Answer, we look at how a Probability Density Function (PDF) works. We learn about continuous and discrete variables, and their connection with PDFs. Then, we run an example to gain a better understanding of the concepts explored.

Probability Density Functions (PDFs)

We use PDFs to find the probability of a variable occurring within a range of values. The densities appear on the yy-axis, and the values on the xx-axis. A value or a range of values in the graph has a specific density, which is what we look for. PDFs only work for continuous variables.

Continuous variables

continuous variable has a specific value that presents accuracy, and not oneness or a stand-alone status. We can't count it, but just measure it. It's similar to a scale for values that have decimal points and a degree of precision.

For example, the heights of students in a class are continuous variables. Heights can have values, such as 5.4, 5.5, 5.9, 6.1, and 6.5 ft. We can't count these variables, but need instruments to measure them.

Discrete variables

To counter a continuous variable, we have the discrete variable. We can count and present this variable, and don't need any instruments.

An example of discrete variables would be the number of students whose heights we have to measure. This means that discrete is represented in integers and uses something known as the PMF (Probability Mass Function)This calculates the sum of densities present to calculate probability..

How does a PDF work?

A PDF is a function that takes a variable and then tells its probability:

Here, xx lies between aa and bb. We can plug this value in the function to then find the probability of its occurrence. Because a PDF works on continuous variables, it uses this measure to calculate the value.

For discrete variables, however, we use an addition function because it is about counting. Hence, we use the PMF:

Here, f(x)f(x) is any function that presents the output of a variable XX. X=xX = x because the XX variable must have a value equal to xx. Once we find xx, we simply call the function that counts the probability of it occurring.

Let's demonstrate this concept through the example below.

Example

Let's suppose we have to find a car with a specific turning radius.

Let's first make a density graph of some turning radius values between 34 and 35.

Now, let's find the probability of a car with a turning radius between 34.4 and 34.5:

So, we can write the probability as follows:

Once we calculate the area shaded in red, we see the probability of a car having a turning radius between 34.4 and 34.5.

Let's suppose that the function is as follows:

Note: This function may not represent the curve line above in the graph.

So, if we find 34.4 and 34.5 in this range, we have to take the integral as follows:

Once we perform the integration result, we get the following:

Let's denote the PP (statement) as yy. The equation then becomes the following:

We get the answer as follows:

So, the probability that a car has a turning radius between 34.4 and 34.5 is 0.001451379820.00145137982.

Free Resources

Copyright ©2024 Educative, Inc. All rights reserved