# What is missing in my solution of “from PDF to CDF and $P(X > 0.5)$”?

The continuous random variable $$X$$ is described with the following probability density function (pdf):

$$f_X(x) = \begin{cases} \frac{1}{9}\big(3 + 2x - x^2 \big) \; : 0 \leq x \leq 3 \\ 0 \; \;: x < 0 \; \lor \; x > 3\end{cases}$$

Find cumulative distribution function $$F_X$$ and probability $$P(X > 0.5)$$.

The task is started by verifying if the pdf is in fact correct pdf. I am checking two conditions:

1. Is the pdf nonnegative on all of its domain? Yes, hence we can write:

$$\forall_{x \in \mathbb{R}}\;f_X(x) \geq 0$$

1. The pdf has to be integrable and its total area under the curve has to be equal $$1$$:

\begin{align*} &\int_{\mathbb{R}}f_X = 1 \\ &\color{red}{\int_{-\infty}^{\infty}f_X(x)dx = 1} \\ \end{align*}

(for now assume the condition is true)

PDF plot:

Computing CDF which is defined as:

$$F_X(x) = \int_{-\infty}^{x}f_X(t)dt$$

Therefore:

If $$x < 0$$:

$$F_X(x) = \int_{-\infty}^{x} 0dt = 0$$

If $$x \geq 0 \; \land \; x \leq 3$$:

\begin{align*}F_X(x) &= \int_{-\infty}^{0}0dt + \int_{0}^{x}\frac{1}{9}\big(3 + 2t - t^2\big)dt = \\ &= 0 + \frac{1}{9}\Big(3t + t^2 - \frac{1}{3}t^3 \Big)\Bigg|^{x}_0 = \\ &= \frac{1}{9} \Big(3x + x^2 - \frac{1}{3}x^3 \Big)\end{align*}

If $$x \geq 3$$:

\begin{align*} F_X(x) &= \int_{-\infty}^{0}0dt + \int_{0}^{3}\frac{1}{9}\Big(3 + 2t - t^2 \Big)dt + \int_{3}^{x}0dt \\ &= 0 + \frac{1}{9}\Big(3t + t^2 - \frac{1}{3}t^3 \Big)\Bigg|^3_0 + 0 = \\ &= 1 \end{align*}

(this implicitly confirms the $$\color{red}{\text{red}}$$ condition)

Finally the CDF is defined as:

$$F_X(x) = \begin{cases} 0 \; \; : x < 0 \\ \frac{1}{9} \Big(3x + x^2 - \frac{1}{3}x^3 \Big) \; \; : x \geq 0 \; \land \; x \leq 3 \\ 1 \; \; : x > 3 \end{cases}$$

The CDF result agrees with:

$$\lim_{x \to \infty}F_X(x) = 1 \; \land \; \lim_{x \to -\infty}F_X(x) = 0$$

Also the function is non-decreasing and continuous.

CDF plot:

## Calculating $$P(X > 0.5)$$:

\begin{align*}P(X > 0.5) &= \int_{0.5}^{\infty}f_X(x)dx = \\ &= \int_{0.5}^{3}\frac{1}{9}(3+2x-x^2)dx + \int_{3}^{\infty}0dx = \\ &= \frac{1}{9} \Big(3x + x^2 - \frac{1}{3}x^3 \Big)\Bigg|^3_{0.5} + 0 = \\ &= \frac{175}{216} \approx 0.81\end{align*}

This probability solution does not agree with the book's solution.

The book says $$P(X > 0.5) = 1 - F_X(0.5) = \frac{41}{216} \approx 0.19$$, so it's my solution "complemented".

## My questions:

• Which final probability solution is correct?
• Is this any special kind of probability distribution, e.g. Poisson or Chi Square (well, not these)?
• Can you please point out all minor or major mistakes I have made along the way? (perhaps aside from plots that are not perfect). This is the most important for me.
• What have I forget to mention or calculate for my solution to make more sense? Especially something theoretical, perhaps e.g. definition for $$X$$.
• Looks like the book have a bug. – kludg Nov 30 '19 at 18:04

## My questions:

• Which final probability solution is correct?

Yours answer is right and the book's isn't. They presumably have mistakenly computed $$\mathbb P(X < 0.5)$$ instead of $$\mathbb P(X > 0.5)$$.

• Is this any special kind of probability distribution, e.g. Poisson or Chi Square (well, not these)?

Not a common one, no. I found this page on "U-quadratic distributions" (a term I've never heard before), and this would be the vertical inverse of one of these described in the "related distributions" section, but I don't think this is a particularly common term or distribution.

EDIT: Whoops, this isn't even quite the vertical inverse of a U-quadratic distribution, is it? Such a distribution would apparently not truncate the left side of the parabola as this one does. The better answer to your question is: "No, this distribution is neither named nor important."

• Can you please point out all minor or major mistakes I have made along the way? (perhaps aside from plots that are not perfect). This is the most important for me.

I'd love to, but I didn't find any!

• What have I forget to mention or calculate for my solution to make more sense? Especially something theoretical, perhaps e.g. definition for $$X$$.

I didn't spot any holes or anything that needs to be improved.

EDIT: One thing you could do to clean this up a bit: when you compute $$\mathbb P(X > 0.5)$$, you're redoing the integration you already did in your CDF. Instead, you could just use that result that you already obtained: $$\mathbb P(X > 0.5) = 1 - \mathbb P(X \leq 0.5) = 1 - F_X(0.5) = 3(0.5) + (0.5)^2 - \frac{1}{3}(0.5)^3 = \dots$$ That said, your answer isn't wrong, it's just a bit inefficient.

• So the efficient way is to compute the CDF at $x=0.5$ and subtract the result from $1.$ It seems likely that whoever wrote the answer key forgot to subtract. I likewise did not find any mistake in the calculations in the question. – David K Nov 30 '19 at 18:30
• Can I write:$$f_X: \; \mathbb{R} \longrightarrow \left[0, \frac{4}{9} \right]$$ where $\frac{4}{9}$ denotes mode of PDF? And also, $$F_X : \; \mathbb{R} \longrightarrow \left[0,1\right]$$ for the CDF? Thanks for help. I will accept today. – weno Dec 1 '19 at 4:56
• @weno Sure - both those statements are true, though the first is questionably useful and the second is trivially true for all CDFs. – Aaron Montgomery Dec 1 '19 at 4:58