Find the CDF and expected value from the given PDF.

188 Views Asked by At

Came across a question about CDF and PDF in my homework:

Click here for the question

enter image description here

a. What is the cumulative distribution function?

Knowing that pdf is the derivative of cdf, I integrated the piecewise function to: 0 if x < 0, (3/4)x if 0 ≤ x ≤ 1, 3/4 + 1/4(x-3) if 3 ≤ x ≤ 4, and 1 for 4 < x. However, I am given that the answer to 1 ≤ x ≤ 3 is 3/4, but I do not know how to find it.

b. What is P(X>1)?

I know that for P(X < u) I will sub in the value of u into the cdf function and find the answer. However, I don't think the same will work for P(X > u). Do I need to integrate the pdf from 0 to 2?

c. What is E(X)?

I know that E(X) is the integral of xf(x) from negative infinity to infinity, but since this is a piecewise function, do I need to take the integral of each interval and find their sum?

Sorry for asking so many questions at once, I am really lost in the whole CDF and PDF idea.

Thanks!

2

There are 2 best solutions below

1
On BEST ANSWER

I'll get you going on the CDF. You're correct that the derivative of the CDF is the PDF. By definition, the CDF (denote it $F(x)$) is $F(x):=P(X<x)=\int_{-\infty}^xf(x)~dx$, where $f(x)$ is the PDF. The PDF has a piecewise definition, and the support is cut up into sections. To compute the CDF we need to examine these sections in turn.

The first section is $x<0$: in this case, $f(x)=0$ so $F(x)=0$.

Now we consider $0\leq x\leq 1$: in this case, $f(x)=\frac{3}{4}$, so $$F(x)=\int_0^x\frac{3}{4}~dx$$

Now we consider $1<x<3$: in this case, $f(x)=0$, but we have to account for the stuff we already integrated over, so $$F(x)=\int_0^1\frac{3}{4}~dx+\int_1^x0~dx=\int_0^1\frac{3}{4}~dx$$

Now we consider $3\leq x\leq 4$: in this case, $f(x)=\frac{1}{4}$, so accounting for what we've already integrated over we get $$F(x)=\int_0^1\frac{3}{4}~dx+\int_1^30~dx+\int_3^x\frac{1}{4}~dx=\int_0^1\frac{3}{4}~dx+\int_3^x\frac{1}{4}~dx$$

Lastly, for $x>4$ we have integrated out the whole support of $f(x)$, so $F(x)=1$.


I will add some suggestions for the other parts.

For (b), to find $P(x>1)$, this is equal to $1-P(x\leq 1)=1-F(1)$. Do you see why?

For (c), you will need to do two integrals essentially for each segment of the support. So yes, you can integrate $xf(x)$ for $0\leq x\leq 1$ and add this to the integral of $xf(x)$ for $3\leq x\leq 4$ to obtain $E(X)$.

3
On

a)

if $x \in [1,3]$,

\begin{align}Pr(X \le x) &= \int_{-\infty}^xf(t) \, dt \\ &=\int_0^1f(t) \, dt + \int_1^x f(t) \, dt\\ &= \int_0^1 \frac34 \, dt + \int_1^x 0 \, dt \\ &= \frac34\end{align}

Geometrically just find the area under the graph of the density when $X \le x$.

The area stop increasing after $1$ and the increment continue after $3$.

b) $$P(X>1) = 1-P(X \le 1) $$ Use your answer to part $a$ to handle this.

c) Evaluate the following:$$E[X]=\int_0^1 \frac{3x}4 \, dx+\int_3^4 \frac{x}4\, dx$$