Finding a cdf of a random variable X given it's pdf

643 Views Asked by At

A random variable $X$ is given with pdf $f(x) =\Bigg\{cxe^\frac{-x}{10}$ if $x\geq0$ and $0$ otherwise

(a) find c to make this pdf correct

(b) find the cdf F(x)

For (a) I used integration by parts for $\int_0^\infty cxe^\frac{-x}{10}dx$ to get the answer $-10cxe^\frac{-x}{10} - 100ce^\frac{-x}{10}$. Since the total integral of the pdf must equal 1, I found that $c = \frac{1}{100}$

For (b) integrated $\int_0^\infty \frac{1}{100}xe^\frac{-x}{10}dx$ and came out with

$$F(x) = \begin{cases} -\frac{1}{10}xe^\frac{-x}{10} - e^\frac{-x}{10} & \text{if } x\geq0, \\0 & \text{otherwise} \end{cases} $$

Obviously this must be wrong because the values of the cdf would be negative for all $x\geq0$. Can anyone help me out?

3

There are 3 best solutions below

0
On

Your value for $c$ is correct.

For the cdf, you don't integrate to infinity, you integrate up to $x$. And you have the correct formula except for a $+ 1$ from evaluating the second integration by parts at the limit $x=0$.

0
On

\begin{align} \text{For } x\ge0, \\[8pt] F(x) = {} & \int_0^x \left( \frac u {10} \right) e^{-u/10} \, \frac{du}{10} = \int_0^{x/10} v \Big( e^{-v} \, dv\Big) \\[8pt] = {} & \int v\, dw = vw - \int w\,dv \\[8pt] = {} & \Big[{-v}e^{-v} \Big]_0^{x/10} - \int_0^{x/10}-e^{-v} \, dv \\[8pt] = {} & - \frac x {10} e^{-x/10} + \Big[ {-e}^{-v} \Big]_0^{x/10} \\[8pt] = {} & -\frac x {10} e^{-x/10} -e^{-x/10} + 1. \\[8pt] & \begin{cases} =0 & \text{when } x=0, \\ >0 & \text{when } x>0, \\ \to1 & \text{as } x\to+\infty. \end{cases} \end{align}

0
On

You have the indefinite integral correct: $$\int c x \mathrm e^{-x/10}\mathrm d x = -10c\,(x+10)\,\mathrm e^{-x/10}$$

Therefore you evaluate $c=1/100$ correctly because the positive infinte limit of the cummulative distribution function shall be 1. $~$ $\lim\limits_{x\to\infty} F(x)=1$ $$\begin{align}1&=\int_0^\infty c x\mathrm e^{-x/10}\mathrm d x \\&= \left[-10c\,(x+10)\,\mathrm e^{-x/10}\right]_{x=0}^\infty\\&=(0)-(-100c)\\&=100 c\end{align}$$


To find the Cummulative Distribution Function you simply do not integrate all the way to the infinite:

$$\begin{align}F(x)&=\mathbf 1_{0\leqslant x}~\int_0^x 10^{-2} s\mathrm e^{-s/10}\mathrm d s \\&= \mathbf 1_{0\leqslant x}~\left[-10^{-1}\,(s+10)\,\mathrm e^{-s/10}\right]_{s=0}^x\\&=((-10^{-1}(x+10)\mathrm e^{-x/10})-(-1))~\mathbf 1_{0\leqslant x}\\[2ex]&=(1-10^{-1}(x+10)\mathrm e^{-x/10})~\mathbf 1_{0\leqslant x}\end{align}$$