# Thread: PDF, CDF, Mean, Var Question

1. ## PDF, CDF, Mean, Var Question

PDF question

The question is from a past paper with no solutions, so I am trying to complete them and confirm with you guys if this is correct.

a) Finding k, I solved for
$1 = k \left[ \int_{-1}^{0} (x+2)\ dx + \int_{0}^{1} (1-x^2)\ dx\ \right]$
for which I get $k=\frac{6}{13}$

b) the CDF, I just took the integrals of all the terms so it should look like

0 if $x < -1$
$\frac{x^2}{2} + 2x$ if $-1 \leq x \leq 0$
$x - \frac{x^3}{3}$ if $0 \leq x \leq 1$
0 if $x > 1$

c) Expected value of X
I want to confirm this before calculating the variance, because I am getting a negative mean of $-\frac{5}{26}$

I am attempting to calculate it as follows:
$E[X] = \frac{6}{13} \left[ \int_{-1}^{0} x(x+2)\ dx + \int_{0}^{1} x(1-x^2)\ dx \right]$

e) Find the probability that $X>0$
It is greater than 0 if it is between [0,1], so I've taken the integral:
$\frac{6}{13} \int_{0}^{1} (1-x^2)\ dx = \frac{4}{13}$

Apologies the question is long, but they are related.

2. First, you went to all that trouble to find 6/13. Why did you discard it for the CDF?

CDF needs a LOT of work and there appears to be quite a bit of understanding missing. You studied indefinite integrals for a reason. You seem to have forgotten what they are.

$\frac{6}{13}\cdot\int x+2\;dx\;=\;\frac{6}{13}\cdot\left(\frac{x^{2}}{2} + 2x\right) + C$. You absolutely must NOT ignore that arbitrary constant.

Your task is to find the value of C such that $\frac{6}{13}\cdot\left(\frac{(-1)^{2}}{2} + 2(-1)\right) + C = 0$ You tell me why.

Similarly, you must find the value of D, such that $\frac{6}{13}\cdot\left((1) - \frac{(1)^{3}}{3}\right) + D = 1$ Again, where did that come from?

3. Originally Posted by TKHunny
You tell me why.
Because the cdf is a non-decreasing function between [0,1]. Thank you!
Throughout the semester so far, we've only had cdf -> pdf questions, so this was new to me.

Sorry about the missing k, I was meant to draw that up in front of the cdf per the original question.

The revised CDF should be with the same limits as above:
0
$\frac{6}{13}(\frac{x^2}{2} + 2x) + \frac{9}{13}$
$\frac{6}{13}(x-\frac{x^3}{3}) + \frac{9}{13}$
0

Would this be correct?

4. Better. [-1,0] still is not correct. Why would the two constants be the same? They might be the same, but I would not expect it.

Unless there is a probability mass in the middle, you should also demonstrate continuity, [-1,0] ends where [0,1] starts.

5. ## Re: PDF, CDF, Mean, Var Question

Thank you TKHunny, for the tips!
I have had to review the definitions of a CDF, and understand why I have to demonstrate continuity.

It turned out the two constants are the same for this question.

6. ## Re: PDF, CDF, Mean, Var Question

Right. Since the only questionable continuity is at x = 0, equality is requried. Good work.