# Probability Density Functions

• Oct 26th 2009, 09:18 PM
xuyuan
Probability Density Functions
Hi, sorry need help on a second problem. I've figured out the probability here as

0.68 by integrating from 1 to 1.2 for 2-x and add to integration from 0.8 to 1 for x but I'm not sure if I'm using the distribution function or th probability density

Question

f(x) x for 0<x<1
2-x for 1<=x<2
0 elsewhere

Find P(0.8<X<1.2) using
a. The probability density
b. the distribution function

The way I did it I think seems to have used the distribution function. How would I find the same result with the probability density?
• Oct 27th 2009, 03:45 AM
galactus
$\displaystyle F(x)=\int_{0}^{x}xdx, \;\ 0 \;\ to \;\ 1$

$\displaystyle F(x)=\int_{0}^{1}xdx=\frac{1}{2}$

$\displaystyle F(x)=\int_{1}^{2}(2-x)dx$

$\displaystyle \frac{1}{2}+\int_{1}^{x}(2-x)dx=2x-\frac{x^{2}}{2}-1$

$\displaystyle F(x)=\begin{Bmatrix}0, \;\ x\leq 0\\ \frac{x^{2}}{2}, \;\ 0<x<1\\ 2x-\frac{x^{2}}{2}-1, \;\ 1\leq x<2\\ 1, \;\ 2\leq x\end{Bmatrix}$

$\displaystyle P(.8 < x < 1.2)=\int_{.8}^{1}xdx+\int_{1}^{1.2}(2-x)dx$
• Oct 27th 2009, 04:15 AM
mr fantastic
Quote:

Originally Posted by galactus
$\displaystyle F(x)=\int_{0}^{x}xdx, \;\ 0 \;\ to \;\ 1$

$\displaystyle F(x)=\int_{0}^{1}xdx=\frac{1}{2}$

$\displaystyle F(x)=\int_{1}^{2}(2-x)dx$

$\displaystyle \frac{1}{2}+\int_{1}^{x}(2-x)dx=2x-\frac{x^{2}}{2}-1$

$\displaystyle F(x)=\begin{Bmatrix}0, \;\ x\leq 0\\ \frac{x^{2}}{2}, \;\ 0<x<1\\ 2x-\frac{x^{2}}{2}-1, \;\ 1\leq x<2\\ 1, \;\ 2\leq x\end{Bmatrix}$

$\displaystyle P(.8 < x < 1.2)=\int_{.8}^{1}xdx+\int_{1}^{1.2}(2-x)dx$

Using what galactus posted to calculate $\displaystyle \Pr(0.8 < X < 1.2) = F(1.2) - F(0.8)$ is the distribution approach requested in part (b) of the question.
• Oct 27th 2009, 05:28 AM
xuyuan
Quote:

Originally Posted by mr fantastic
Using what galactus posted to calculate $\displaystyle \Pr(0.8 < X < 1.2) = F(1.2) - F(0.8)$ is the distribution approach requested in part (b) of the question.