# Can you see what is wrong with this question? (1 Viewer)

#### tywebb

##### dangerman
There is something wrong with this example from New Senior Mathematics Advanced on pages 561-562. Can you see what it is?

(Hint 1: there is nothing wrong with the calculation.)

$\bg_white \text{Example 2}$

$\bg_white \text{A particular continuous random variable has the following probability density function:}$

$\bg_white f(x) = \begin{cases}-3(x-1)^2+2,&0\le x\le1 \\0,&\text{otherwise}\end{cases}$

$\bg_white \text{Find }P(X)\le0.7.$

$\bg_white \text{Solution}$

$\bg_white \text{Identify the bounds of integration to use: the lower bound is 0 and the upper bound is 0.7.}$

$\bg_white \text{Expand the quadratic expression:}$

\bg_white \begin{aligned}-3(x-1)^2+2&=-3(x^2-2x+1)+2\\&=-3x^2+6x-3+2\\&=-3x^2+6x-1\end{aligned}

$\bg_white \text{Find the required integral:}$

\bg_white \begin{aligned}\int_0^{0.7}(-3x^2+6x-1)\ dx&=[-x^3+3x^2-x]_0^{0.7}\\&=(-(0.7)^3+3\times(0.7)^2-0.7)-0\\&=0.427\end{aligned}

(Hint 2: you can fix it by replacing -3(x-1)2+2 with -6(x-0.5)2+1.5 in which case the answer is 0.784 - but can you see why?)

(Hint 3: without changing the function find P(X ≤ 0.1) instead.)

Last edited:

##### Well-Known Member
Idk if I'm really dumb but I can't understand what you wrote, I have no clue what you're asking or what your hints are talking about. I don't see anything wrong in the working out.

#### tywebb

##### dangerman
Idk if I'm really dumb but I can't understand what you wrote, I have no clue what you're asking or what your hints are talking about. I don't see anything wrong in the working out.
OK. Here is hint 4:

$\bg_white \text{For a function }f(x)\text{ to be a probability density function:}$

$\bg_white \bullet f(x)\ge0\text{ for all values of }x$

$\bg_white \bullet\int_{-\infty}^\infty f(x)\ dx=1,\text{ i.e., the area enclosed by the graph }y=f(x)\text{ and the }x\text{-axis is equal to 1.}$

Do you think these conditions are satisfied by the example above?

Last edited:

##### Well-Known Member
OK. Here is hint 4:

View attachment 29166

Do you think these conditions are satisfied by the example above?
Yes I found that f(x) was less than 0 from hint 3 but I don't think it mattered for the question since it asked for 0.7 and it's just an example question.

#### tywebb

##### dangerman
Yes I found that f(x) was less than 0 from hint 3 but I don't think it mattered for the question since it asked for 0.7 and it's just an example question.
That means that the function is NOT a probability density function.

If you find P(X ≤ 0.1) then you get a negative answer. So it is NOT a probability.

You can turn it into a probability density function so that it satisfies both conditions by replacing -3(x-1)2+2 with -6(x-0.5)2+1.5.

#### 大きい男

##### Active Member
That means that the function is NOT a probability density function.

If you find P(X ≤ 0.1) then you get a negative answer. So it is NOT a probability.

You can turn it into a probability density function so that it satisfies both conditions by replacing -3(x-1)2+2 with -6(x-0.5)2+1.5.
Do you think it would be necessary, in an exam, to verify that f(x) is a pdf or do you just assume that it is?

#### tywebb

##### dangerman
Do you think it would be necessary, in an exam, to verify that f(x) is a pdf or do you just assume that it is?
If this was an exam question it would be completely invalid.

An exam might ask you to verify that a function qualifies as a probability density function, in which case you show that it satisfies both conditions.

The authors of this textbook thought that it was an example of a probability density function. But it is actually an example of a function which is NOT a probability density function.

#### tywebb

##### dangerman
Have a look at Example 4 too. That is also not a pdf.

$\bg_white \text{Example 4}$

$\bg_white \text{For a particular Infant Welfare Centre the probability density function of the age of the children (}x\text{ years) brought to the centre is given by:}$

$\bg_white f(x) = \begin{cases}\frac{4}{5}x(2-x),&0\le x\le2 \\0,&\text{otherwise}\end{cases}$

$\bg_white \text{Find the following correct to three decimal places}$

$\bg_white \text{(a) mean}$

$\bg_white \text{(b) standard deviation}$

I would of course like to replace this with 2 questions

Question 1.

$\bg_white \text{Show that }f(x) = \begin{cases}\frac{4}{5}x(2-x),&0\le x\le2 \\0,&\text{otherwise}\end{cases}\text{ IS NOT A PROBABILITY DENSITY FUNCTION}$

Question 2 (a little more challenging).

What can you do to fix this question to make it a probability density function?

#### CM_Tutor

##### Moderator
Moderator
Question 1.

$\bg_white \text{Show that }f(x) = \begin{cases}\frac{4}{5}x(2-x),&0\le x\le2 \\0,&\text{otherwise}\end{cases}\text{ IS NOT A PROBABILITY DENSITY FUNCTION}$
Looks like it fails the second condition

#### idkkdi

##### Well-Known Member
Have a look at Example 4 too. That is also not a pdf.

$\bg_white \text{Example 4}$

$\bg_white \text{For a particular Infant Welfare Centre the probability density function of the age of the children (}x\text{ years) brought to the centre is given by:}$

$\bg_white f(x) = \begin{cases}\frac{4}{5}x(2-x),&0\le x\le2 \\0,&\text{otherwise}\end{cases}$

$\bg_white \text{Find the following correct to three decimal places}$

$\bg_white \text{(a) mean}$

$\bg_white \text{(b) standard deviation}$

I would of course like to replace this with 2 questions

Question 1.

$\bg_white \text{Show that }f(x) = \begin{cases}\frac{4}{5}x(2-x),&0\le x\le2 \\0,&\text{otherwise}\end{cases}\text{ IS NOT A PROBABILITY DENSITY FUNCTION}$

Question 2 (a little more challenging).

What can you do to fix this question to make it a probability density function?
integrate for q2, then stretch vertically by the factor required to make the area under the function 1.

#### idkkdi

##### Well-Known Member
There is something wrong with this example from New Senior Mathematics Advanced on pages 561-562. Can you see what it is?

(Hint 1: there is nothing wrong with the calculation.)

$\bg_white \text{Example 2}$

$\bg_white \text{A particular continuous random variable has the following probability density function:}$

$\bg_white f(x) = \begin{cases}-3(x-1)^2+2,&0\le x\le1 \\0,&\text{otherwise}\end{cases}$

$\bg_white \text{Find }P(X)\le0.7.$

$\bg_white \text{Solution}$

$\bg_white \text{Identify the bounds of integration to use: the lower bound is 0 and the upper bound is 0.7.}$

$\bg_white \text{Expand the quadratic expression:}$

\bg_white \begin{aligned}-3(x-1)^2+2&=-3(x^2-2x+1)+2\\&=-3x^2+6x-3+2\\&=-3x^2+6x-1\end{aligned}

$\bg_white \text{Find the required integral:}$

\bg_white \begin{aligned}\int_0^{0.7}(-3x^2+6x-1)\ dx&=[-x^3+3x^2-x]_0^{0.7}\\&=(-(0.7)^3+3\times(0.7)^2-0.7)-0\\&=0.427\end{aligned}

(Hint 2: you can fix it by replacing -3(x-1)2+2 with -6(x-0.5)2+1.5 in which case the answer is 0.784 - but can you see why?)

(Hint 3: without changing the function find P(X ≤ 0.1) instead.)
hint 2, subbing in the extreme values into the new equation yields 0 for f(x) at the extreme points.

However, how would you actually realise what to switch the equation to?

#### CM_Tutor

##### Moderator
Moderator
For $\bg_white f(x)$ to be a PDF, we require

$\bg_white \int_{-\infty}^{\infty} f(x) \, dx = 1$

\bg_white \begin{align*} \text{Here, we have LHS } &= \int_{-\infty}^{\infty} f(x) \, dx \\ &= \int_{-\infty}^{0} 0 \, dx + \int_{0}^{2} \frac{4}{5} x(2 - x) \, dx + \int_{2}^{\infty} 0 \, dx \\ &= 0 + \frac{4}{5} \int_{0}^{2} 2x - x^2 \, dx + 0 \\ &= \frac{4}{5} \left[\frac{2x^2}{2} - \frac{x^3}{3}\right]_{0}^{2} \\ &= \frac{4}{5} \left[\left(2^2 - \frac{2^3}{3}\right) - \left(0^2 - \frac{0^3}{3}\right)\right] \\ &= \frac{4}{5} \left(4 - \frac{8}{3} - 0 + 0\right) \\ &= \frac{16}{15} \neq 1 \\ &\neq \text{ RHS} \end{align*}

Assuming that it is otherwise suitable, and thus that $\bg_white f(x) \in [0, 1] \text{ for all } x \in \mathbb{R}$, we can form a suitable PDF $\bg_white g(x) = k.f(x) \text{, where } k \in \mathbb{R}^+$ and find $\bg_white k$ by requiring

$\bg_white \int_{-\infty}^{\infty} g(x) \, dx = 1$

and then checking that $\bg_white g(x) \in [0, 1] \text{ for all } x \in \mathbb{R}$. In this case, the latter condition will be fine so long as $\bg_white k \in (0, 1)$

\bg_white \begin{align*} \text{Now, we need } \int_{-\infty}^{\infty} g(x) \, dx &= 1 \\ \int_{-\infty}^{0} 0 \, dx + \int_{0}^{2} \frac{4k}{5} x(2 - x) \, dx + \int_{2}^{\infty} 0 \, dx &= 1 \\ 0 + \frac{4k}{5} \int_{0}^{2} 2x - x^2 \, dx &= 1 \\ \frac{4k}{5} \left[\frac{2x^2}{2} - \frac{x^3}{3}\right]_{0}^{2} &= 1 \\ \frac{4k}{5} \left[\left(2^2 - \frac{2^3}{3}\right) - \left(0^2 - \frac{0^3}{3}\right)\right] &= 1 \\ 4k \left(12 - 8 - 0 + 0\right) &= 15 \\ 16k &= 15 \\ k &= \frac{15}{16} \end{align*}