# Probability Density Function

## Solved Problems

Click or tap a problem to see the solution.

### Example 5

Let X be a normal random variable with the mean μ = 20 and the variance σ² = 25. Find the probability that the random variable X falls in the range [15, 30].

### Example 6

IQ tests are designed to follow the distribution law N(100, 15). What is the percentage of individuals with an IQ-score higher than 120?

### Example 7

A random variable $$X$$ is defined by the linear $$PDF$$ in the form $f\left( x \right) = kx$ on the interval $$\left[ {0,10} \right].$$

1. Find the value of $$k$$;
2. Determine the mean value $$\mu$$ of $$X$$;
3. Calculate the probability $$P\left( {2 \le X \le 5} \right).$$

### Example 8

A random variable $$X$$ is defined by the quadratic $$PDF$$ in the form $f\left( x \right) = k{x^2}$ on the interval $$\left[ {0,3} \right].$$

1. Find the value of $$k$$;
2. Determine the mean value $$\mu$$ of $$X$$;
3. Calculate the probability $$P\left( {1 \le X \le 2} \right).$$

### Example 9

The $$PDF$$ of a random variable $$X$$ is defined by $f\left( x \right) = \begin{cases} {\frac{k}{{{x^2}}}}, & \text{if } {x \ge 1} \\ 0, & \text{if } x \lt 1 \end{cases}.$

1. Calculate the value of $$k$$;
2. Find the mean value $$\mu$$ of $$X.$$

### Example 10

Let $$X$$ be a continuous random variable with $$PDF$$ given by $f\left( x \right) = \begin{cases} {\frac{k}{{1 + {x^2}}}}, & \text{if } {x \ge 0} \\ 0, & \text{if } x \lt 0 \end{cases}.$

1. Find the value of $$k$$;
2. Graph the $$PDF;$$
3. Calculate the probability $$P\left( {0 \le X \le 1} \right);$$
4. Determine the mean value $$\mu$$ of $$X.$$

### Example 5.

Let $$X$$ be a normal random variable with the mean $$\mu = 20$$ and the variance $${\sigma ^2} = 25.$$ Find the probability that the random variable $$X$$ falls in the range $$\left[ {15,30} \right].$$

Solution.

We compute the probability by the formula

$P\left( {a \le X \le b} \right) = P\left( {\frac{{a - \mu }}{\sigma } \le Z \le \frac{{b - \mu }}{\sigma }} \right).$

Substituting $$\mu = 20,$$ $$\sigma = 5,$$ $$a = 15,$$ $$b = 30,$$ we have

$P\left( {15 \le X \le 30} \right) = P\left( {\frac{{15 - 20}}{5} \le Z \le \frac{{30 - 20}}{5}} \right) = P\left( { - 1 \le Z \le 2} \right) = P\left( {z = 2} \right) - P\left( {z = - 1} \right).$

Using a $$Z-$$table, we find that

$P\left( {z = 2} \right) = 0.9772,\;\;\; P\left( {z = - 1} \right) = 0.1587$

Hence,

$P\left( {15 \le X \le 30} \right) = 0.9772 - 0.1587 = 0.8185$

### Example 6.

$$IQ$$ tests are designed to follow the distribution law $$N(100,15).$$ What is the percentage of individuals with an $$IQ$$-score higher than $$120?$$

Solution.

We need to calculate the $$Z-$$score. Using the formula

$P\left( {a \le X \le b} \right) = P\left( {\frac{{a - \mu }}{\sigma } \le Z \le \frac{{b - \mu }}{\sigma }} \right),$

where $$X \sim N\left( {100,15} \right),$$ we get

$P\left( {120 \le X \le \infty } \right) = P\left( {\frac{{120 - 100}}{{15}} \le Z \le \frac{{\infty - 100}}{{15}}} \right) = P\left( {\frac{4}{3} \le Z \le \infty } \right) = P\left( {Z \ge \frac{4}{3}} \right).$

From a $$Z-$$table, we find that

$P\left( {z = \frac{4}{3}} \right) \approx P\left( {z = 1.33} \right) = 0.9082 \approx 90.8\%$

Thus, about $$9.2\%$$ of the population have an $$ID-$$score greater than $$120.$$

### Example 7.

A random variable $$X$$ is defined by the linear $$PDF$$ in the form $f\left( x \right) = kx$ on the interval $$\left[ {0,10} \right].$$

1. Find the value of $$k$$;
2. Determine the mean value $$\mu$$ of $$X$$;
3. Calculate the probability $$P\left( {2 \le X \le 5} \right).$$

Solution.

1. To find the value of $$k,$$ we integrate the $$PDF$$ on the interval from $$0$$ to $$10$$ and equate it to $$1:$$
$\int\limits_0^{10} {f\left( x \right)dx} = 1,\;\; \Rightarrow \int\limits_0^{10} {kxdx} = 1,\;\; \Rightarrow \left. {k\frac{{{x^2}}}{2}} \right|_0^{10} = 1,\;\; \Rightarrow \frac{k}{2}\left( {100 - 0} \right) = 1,\;\; \Rightarrow 50k = 1,\;\; \Rightarrow k = \frac{1}{{50}}.$

So, the probability distribution is given by the function $$f\left( x \right) = \frac{x}{{50}}.$$

2. Calculate the mean value $$\mu$$ of the distribution:
$\mu = \int\limits_0^{10} {xf\left( x \right)dx} = \int\limits_0^{10} {\frac{{{x^2}}}{{50}}dx} = \frac{1}{{50}}\int\limits_0^{10} {{x^2}dx} = \frac{1}{{50}}\left. {\frac{{{x^3}}}{3}} \right|_0^{10} = \frac{{1000}}{{150}} = \frac{{20}}{3}.$
3. Find the probability $$P\left( {2 \le X \le 5} \right):$$
$P\left( {2 \le X \le 5} \right) = \int\limits_2^5 {f\left( x \right)dx} = \frac{1}{{50}}\int\limits_2^5 {xdx} = \left. {\frac{{{x^2}}}{{100}}} \right|_2^5 = \frac{1}{{100}}\left( {25 - 4} \right) = 0.21$

### Example 8.

A random variable $$X$$ is defined by the quadratic $$PDF$$ in the form $f\left( x \right) = k{x^2}$ on the interval $$\left[ {0,3} \right].$$

1. Find the value of $$k$$;
2. Determine the mean value $$\mu$$ of $$X$$;
3. Calculate the probability $$P\left( {1 \le X \le 2} \right).$$

Solution.

1. Since the integral of $$PDF$$ over the domain must equal one, we have
$\int\limits_0^3 {f\left( x \right)dx} = 1,\;\; \Rightarrow \int\limits_0^3 {k{x^2}dx} = 1,\;\; \Rightarrow \left. {k\frac{{{x^3}}}{3}} \right|_0^3 = 1,\;\; \Rightarrow \frac{k}{3}\left( {27 - 0} \right) = 1,\;\; \Rightarrow k = \frac{1}{9}.$

Hence, the $$PDF$$ is given by the function $$f\left( x \right) = \frac{{x^2}}{{9}}.$$

2. We can easily find the mean value $$\mu$$ of the probability distribution:
$\mu = \int\limits_0^3 {xf\left( x \right)dx} = \int\limits_0^3 {\frac{{{x^3}}}{9}dx} = \frac{1}{9}\int\limits_0^3 {{x^3}dx} = \frac{1}{9}\left. {\frac{{{x^4}}}{4}} \right|_0^3 = \frac{{81}}{{36}} = \frac{9}{4}.$
3. The probability $$P\left( {1 \le X \le 2} \right)$$ is also determined through integration:
$P\left( {1 \le X \le 2} \right) = \int\limits_1^2 {f\left( x \right)dx} = \frac{1}{9}\int\limits_1^2 {{x^2}dx} = \left. {\frac{{{x^3}}}{{27}}} \right|_1^2 = \frac{1}{{27}}\left( {8 - 1} \right) = \frac{7}{{27}} \approx 0.26$

### Example 9.

The $$PDF$$ of a random variable $$X$$ is defined by $f\left( x \right) = \begin{cases} {\frac{k}{{{x^2}}}}, & \text{if } {x \ge 1} \\ 0, & \text{if } x \lt 1 \end{cases}.$

1. Calculate the value of $$k$$;
2. Find the mean value $$\mu$$ of $$X.$$

Solution.

1. We determine the value of $$k$$ from the condition
$\int\limits_1^\infty {f\left( x \right)dx} = 1.$

Then

$\int\limits_1^\infty {\frac{k}{{{x^2}}}dx} = 1,\;\; \Rightarrow \left. {\left( { - \frac{k}{x}} \right)} \right|_1^\infty = 1,\;\; \Rightarrow k\lim\limits_{b \to \infty } \left( { - \frac{1}{b} + 1} \right) = 1,\;\; \Rightarrow k = 1.$
2. To find $$\mu,$$ we take the integral
$\mu = \int\limits_1^\infty {xf\left( x \right)dx} = \int\limits_1^\infty {\frac{{\cancel{x}dx}}{{{x^{\cancel{2}}}}}} = \int\limits_1^\infty {\frac{{dx}}{x}} = \left. {\ln x} \right|_1^\infty = \infty .$

As you can see, the probability density function $$f\left( x \right) = \frac{1}{{{x^2}}}$$ defined on the domain $$\left[ {1,\infty } \right)$$ has no mean.

### Example 10.

Let $$X$$ be a continuous random variable with $$PDF$$ given by $f\left( x \right) = \begin{cases} {\frac{k}{{1 + {x^2}}}}, & \text{if } {x \ge 0} \\ 0, & \text{if } x \lt 0 \end{cases}.$

1. Find the value of $$k$$;
2. Graph the $$PDF;$$
3. Calculate the probability $$P\left( {0 \le X \le 1} \right);$$
4. Determine the mean value $$\mu$$ of $$X.$$

Solution.

This is a variation of the well-known Cauchy distribution.

1. We integrate the given $$PDF$$ and equate it to $$1:$$
$\int\limits_{ - \infty }^\infty {f\left( x \right)dx} = 1,\;\; \Rightarrow \int\limits_0^\infty {\frac{{kdx}}{{1 + {x^2}}}} = 1,\;\; \Rightarrow k\int\limits_0^\infty {\frac{{dx}}{{1 + {x^2}}}} = 1,\;\; \Rightarrow k\left. {\arctan x} \right|_0^\infty = 1,\;\; \Rightarrow k\left[ {\frac{\pi }{2} - 0} \right] = 1,\;\; \Rightarrow k = \frac{2}{\pi }.$

Hence, the $$PDF$$ has the form

$f\left( x \right) = \begin{cases} {\frac{2}{\pi\left({1 + {x^2}}\right)}}, & \text{if } {x \ge 0} \\ 0, & \text{if } x \lt 0 \end{cases}.$
2. The $$PDF$$ is sketched in Figure below:
3. Compute the probability $$P\left( {0 \le X \le 1} \right):$$
$P\left( {0 \le X \le 1} \right) = \int\limits_0^1 {f\left( x \right)dx} = \frac{2}{\pi }\int\limits_0^1 {\frac{{dx}}{{1 + {x^2}}}} = \frac{2}{\pi }\left. {\arctan x} \right|_0^1 = \frac{2}{\pi }\left( {\frac{\pi }{4} - 0} \right) = \frac{1}{2}.$
4. Find the mean value $$\mu:$$
$\mu = \int\limits_{ - \infty }^\infty {xf\left( x \right)dx} = \frac{2}{\pi }\int\limits_0^\infty {\frac{{xdx}}{{1 + {x^2}}}} = \frac{1}{\pi }\int\limits_0^\infty {\frac{{d\left( {1 + {x^2}} \right)}}{{1 + {x^2}}}} = \frac{1}{\pi } \lim\limits_{b \to \infty } \int\limits_0^b {\frac{{d\left( {1 + {x^2}} \right)}}{{1 + {x^2}}}} = \frac{1}{\pi } \lim\limits_{b \to \infty } \left[ {\left. {\ln \left| {1 + {x^2}} \right|} \right|_0^\infty } \right] = \frac{1}{\pi } \lim\limits_{b \to \infty } \left[ {\ln \left( {1 + {b^2}} \right) - \ln 1} \right] = \infty .$