12Busingprobdensityfunctions

Using a probability density function to find probabilities of continuous random variables

If //X// is a continuous random variable with probability density function f then the probability of it falling between //x = a// and //x = b// is found by the area bounded by the density function, the x - axis and the lines //x = a// and //x = b//.

math . \qquad Pr (a < X < b)= \displaystyle{ \int\limits_{a}^{b} \; f(x) \; dx} \qquad. math

In the following example we need conditional probability. The formula below can be found on your formula sheet. It calculates the probability of A given that B has happened.

math . \qquad Pr (A|B)=\dfrac{Pr(A\cap{B})}{Pr(B)} \qquad. math


 * Example 1 **

Find (correct to 4 decimal places) ... ... ** (a) ** .. Pr (X > 0.7) ... ... ** (b) ** .. Pr (0.4 < X < 0.7) ... ... ** (c) ** .. Pr ( X > 0.7 | X > 0.4) Suppose the random variable X has a probability density function with the following rule:

math . \qquad f(x)=\Bigg\{\begin{matrix} 1.5(1-x^2)&\quad0 \leqslant {x} \leqslant 1 \qquad .\\ 0&\text{if}\quad\,x<0\quad\text{or}\quad{x}>1 \qquad. \\ \end {matrix} math

__Solution:__ math \\ . \qquad Pr (X>0.7) \\. \\ . \qquad =1.5 \displaystyle{ \int\limits_{0.7}^{1} \;1-x^2 \; dx} \\. \\ . \qquad =1.5\left[x-\dfrac{x^3}{3}\right]_{0.7}^{1}\\. \\ . \qquad =1.5\left[ \left(1-\dfrac{1}{3} \right)- \left(0.7-\dfrac{0.343}{3} \right) \right] \qquad. \\ . \\ . \qquad =0.1215 math
 * (a) **

math \\ . \qquad Pr (0.4 < X < 0.7) \\. \\ . \qquad =1.5 \displaystyle{ \int\limits_{0.4}^{0.7} \; 1-x^2 \; dx} \\. \\ . \qquad =1.5\left[x-\dfrac{x^3}{3}\right]_{0.4}^{0.7}\\. \\ . \qquad =1.5\left[ \left( 0.7-\dfrac{0.343}{3} \right)- \left(0.4-\dfrac{0.64}{3} \right) \right] \qquad. \\ . \\ . \qquad =0.3105 math
 * (b) **

math \\ . \qquad Pr (X>0.7 \; | \; X>0.4) \\. \\ . \qquad =\dfrac{Pr[(X>0.7)\cap(X>0.4)]}{Pr(X>0.4)} \qquad. \\ . \\ . \qquad =\dfrac{Pr(X>0.7)}{Pr(X>0.4)}\\. \\ . \qquad =\dfrac{0.1215}{0.4320}\\. \\ . \qquad =0.2813 math
 * (c) **

The definite integral function on the calculator could have been used to answer these questions.

Dealing with Infinity

Recall that math \\ . \qquad \begin{matrix} \lim \\ k \rightarrow \infty \\ \end{matrix} \left( \dfrac{1}{k} \right) = 0 \qquad. \\ . \\ \text{or, more simply: } \\. \\ . \qquad \dfrac{1}{\infty}=0 math

Also math \\ . \qquad \begin{matrix} \lim \\ k \rightarrow \infty \\ \end{matrix} \Big( e^{-k} \Big) = 0 \qquad. \\ . \\ \text{or, more simply: } \\. \\ . \qquad e^{-\infty} = 0 math

The textbook uses the limit notation for calculating integrals to infinity as this is more formally correct, but it is sufficient to write the integral with the infinity sign.

Consider the exponential function with rule: math . \qquad f(x)=\Bigg\{\begin{matrix} 2e^{-2x}&\quad{x>0} \qquad. \\ 0&\quad\,x \leqslant 0 \qquad. \\ \end {matrix} math
 * Example 2 **

... ... ** (a) ** ,, Sketch the graph of f(x) ... ... ** (b) ** .. Show that f(x) is a probability density function ... ... ** (c) ** .. Find Pr (X > 1) correct to 4 decimal places ... ... ** (d) ** .. Find the exact value a such that Pr ( X < a) = 0.5. __Solution:__
 * (a) ** . Sketch the graph of f(x)

... ... . Graph has a horizontal asymptote, y = 0 ... ... . It has an endpoint at (0, 2).

... ... . ** Don't forget to show the section where f(x) = 0 for x __<__ 0 **

... ... . From the graph it can be seen that math . \qquad f(x)\geqslant 0\qquad \{ \text{for all x} \} \qquad. math
 * (b) ** . Show that f(x) is a probability density function

And also math \\ . \qquad \displaystyle{ \int\limits_{0}^{\infty} \; 2e^{-2x} \; dx} \\. \\ . \qquad =\left[-e^{-2x}\right]_{0}^{\infty} \\. \\ . \qquad =(-e^{-\infty})-(-e^{0}) \qquad. \\ . \\ . \qquad = 0 + e^0 \\. \\ . \qquad =1 math

... ... hence the area under the graph equals 1

Since both properties of probability density functions have been met, f __**is**__ a probability density function.


 * (c) ** .. Find Pr(X > 1)

math \\ . \qquad Pr(X > 1) \\. \\ . \qquad = \displaystyle{ \int\limits_{1}^{\infty} \; 2e^{-2x} \; dx} \\. \\ . \qquad =\left[-e^{-2x}\right]_{1}^{\infty} \\. \\ . \qquad =(-e^{-\infty})-(-e^{-2}) \qquad. \\ . \\ . \qquad = 0 + e^{-2} \\. \\ . \qquad =0.1353 math


 * (d) ** .. Find the exact value of a such that Pr ( X < a) = 0.5.

math \\ . \qquad Pr(X < a) =0.5 \\. \\ . \qquad \displaystyle{ \int\limits_{0}^{a} \; 2e^{-2x} \; dx} = 0.5 \\. \\ . \qquad \left[-e^{-2x}\right]_{0}^{a} = 0.5 \\. \\ . \qquad (-e^{-2a})-(-e^{0}) = 0.5 \qquad. \\ . \\ . \qquad -e^{-2a}+1=0.5 \\. \\ . \qquad -e^{-2a} = -0.5 \\. \\ . \qquad e^{-2a}=0.5 math

{Using log laws}

math \\ . \qquad \log_e{0.5}=-2a \\. \\ . \qquad a=\dfrac{-\log_e{0.5}}{2} \\. \\ . \qquad a=\dfrac{-\log_e{2^{-1}}}{2} \qquad. \\ . \\ . \qquad a=\dfrac{\log_e{2}}{2} math .