# Continous Random Variable

• Dec 17th 2009, 09:17 PM
zorro
Continous Random Variable
Question : A continuous random variable has a probability density function

f(x) = $\displaystyle \begin{cases} \frac{1}{b-a} & a<x<b \\ 0 & otherwise \end{cases}$

Find the cumulative distribution
find the E[X] and Var X

Solution

The random variable is a uniform distribution random variable

Cumulative Distribution function
$\displaystyle F_x (x)$ = $\displaystyle \begin{cases}0 & x<a \\ \frac{x-a}{b-a} & a \le x<b \\1 & x \ge b \end{cases}$

But i dont know how to prove the above ......

My work :

$\displaystyle F_x(x)$ = $\displaystyle \int_{ - \infty}^{a} f(t) \ dt$

=
$\displaystyle \frac{1}{b-a} . 0$ = 0 ...............Is this correct ?

E[X] =
$\displaystyle \int_{- \infty}^{\infty} x . \ f(x) dx$

= $\displaystyle \frac{1}{b-a} \int_{- \infty}^{ \infty} x \$dx .............What should i do now integrate with $\displaystyle - \infty$ and $\displaystyle \infty$ or what

And what about the Var X as well??
• Dec 17th 2009, 09:59 PM
dedust
Quote:

Originally Posted by zorro
Question : A continuous random variable has a probability density function

f(x) = $\displaystyle \begin{cases} \frac{1}{b-a} & a<x<b \\ 0 & otherwise \end{cases}$

Find the cumulative distribution
find the E[X] and Var X

Solution

The random variable is a uniform distribution random variable

Cumulative Distribution function
$\displaystyle F_x (x)$ = $\displaystyle \begin{cases}0 & x<a \\ \frac{x-a}{b-a} & a \le x<b \\1 & x \ge b \end{cases}$

But i dont know how to prove the above ......

My work :

$\displaystyle F_x(x)$ = $\displaystyle \int_{ - \infty}^{a} f(t) \ dt$

=
$\displaystyle \frac{1}{b-a} . 0$ = 0 ...............Is this correct ?

E[X] =
$\displaystyle \int_{- \infty}^{\infty} x . \ f(x) dx$

= $\displaystyle \frac{1}{b-a} \int_{- \infty}^{ \infty} x \$dx .............What should i do now integrate with $\displaystyle - \infty$ and $\displaystyle \infty$ or what

And what about the Var X as well??

for$\displaystyle t < a$
$\displaystyle F_x(x)$ = $\displaystyle \int_{ - \infty}^{x} f(t) \ dt = 0$ ( $\displaystyle f(t) = 0$ for$\displaystyle t < a$ )

for $\displaystyle a \leq t < b$
$\displaystyle F_x(x)$ = $\displaystyle \int_{ - \infty}^{x} f(t) \ dt = \int_{ - \infty}^{a} f(t) \ dt + \int_{a}^{x} f(t) \ dt = \int_{a}^{x} \frac{1}{b-a} \ dt = \frac{x - a}{b - a}$

for $\displaystyle t \geq b$
$\displaystyle F_x(x)$ = $\displaystyle \int_{ - \infty}^{x} f(t) \ dt = \int_{ - \infty}^{a} f(t) \ dt + \int_{a}^{b} f(t) \ dt + \int_{ b}^{x} f(t) \ dt = 1$

$\displaystyle E[X] = \int_{- \infty}^{\infty} x \cdot \ f(x) ~dx = \int_{a}^{b} x \cdot \ f(x) ~dx$ ($\displaystyle f(x) = 0$ outside the interval$\displaystyle (a,b)$)

$\displaystyle Var(X) = E[X^2] - {E[X]}^2$
calculate $\displaystyle E[X^2] = \int_{- \infty}^{\infty} x^2 \cdot \ f(x) ~dx$
• Dec 17th 2009, 10:04 PM
CaptainBlack
Quote:

Originally Posted by zorro
Question : A continuous random variable has a probability density function

f(x) = $\displaystyle \begin{cases} \frac{1}{b-a} & a<x<b \\ 0 & otherwise \end{cases}$

Find the cumulative distribution
find the E[X] and Var X

Solution

The random variable is a uniform distribution random variable

Cumulative Distribution function
$\displaystyle F_x (x)$ = $\displaystyle \begin{cases}0 & x<a \\ \frac{x-a}{b-a} & a \le x<b \\1 & x \ge b \end{cases}$

But i dont know how to prove the above ......

My work :

$\displaystyle F_x(x)$ = $\displaystyle \int_{ - \infty}^{a} f(t) \ dt$

=
$\displaystyle \frac{1}{b-a} . 0$ = 0 ...............Is this correct ?

E[X] =
$\displaystyle \int_{- \infty}^{\infty} x . \ f(x) dx$

= $\displaystyle \frac{1}{b-a} \int_{- \infty}^{ \infty} x \$dx .............What should i do now integrate with $\displaystyle - \infty$ and $\displaystyle \infty$ or what

And what about the Var X as well??

$\displaystyle F_X(x)=\int_{-\infty}^x f(\xi)\; d\xi$

Now if $\displaystyle x<a,\ f(x)=0$, so:

$\displaystyle F_X(x)=\int_{-\infty}^x f(\xi)\; d\xi=\int_{-\infty}^x 0\; d\xi=0$

Now if $\displaystyle a \le x<b,\ f(x)=1/(b-a)$, so:

$\displaystyle F_X(x)=\int_{-\infty}^x f(\xi)\; d\xi=\int_{-\infty}^a 0\; d\xi+\int_{a}^x \frac{1}{b-a} \; d\xi=\int_{a}^x \frac{1}{b-a} \; d\xi$

and because $\displaystyle f(x)=0$ for $\displaystyle x\ge b$ and is a pdf, for $\displaystyle x\ge b$

$\displaystyle F(x)=F(b)=1$

CB
• Dec 18th 2009, 02:25 PM
zorro
Thank u dedust and Captain black
Quote:

Originally Posted by CaptainBlack
$\displaystyle F_X(x)=\int_{-\infty}^x f(\xi)\; d\xi$

Now if $\displaystyle x<a,\ f(x)=0$, so:

$\displaystyle F_X(x)=\int_{-\infty}^x f(\xi)\; d\xi=\int_{-\infty}^x 0\; d\xi=0$

Now if $\displaystyle a \le x<b,\ f(x)=1/(b-a)$, so:

$\displaystyle F_X(x)=\int_{-\infty}^x f(\xi)\; d\xi=\int_{-\infty}^a 0\; d\xi+\int_{a}^x \frac{1}{b-a} \; d\xi=\int_{a}^x \frac{1}{b-a} \; d\xi$

and because $\displaystyle f(x)=0$ for $\displaystyle x\ge b$ and is a pdf, for $\displaystyle x\ge b$

$\displaystyle F(x)=F(b)=1$

CB

Thank u dedust and captain black for helping be solve this problem
Zorro is deeply great full......... amigo's
cheers mite
(Beer)(Beer)(Beer)(Beer)(Beer)(Beer)(Beer)(Beer)(B eer)(Drunk)