# To find the probability density function

I have done this problem in two ways and I get two different answer.Which one is correct.

I provided the link to the image below.

For the probability density function $$f(x)=\begin{cases} 20x(1-x)^3, & 0 find $$P\bigl(x<\frac{1}{2}\bigr)$$.

## Method A

\begin{align} P\Bigl(x<\frac{1}{2}\Bigr) &= \int_0^{1/2} 20x(1-x^3)\,dx \\ &= 20\int_0^{1/2} (1-x)x^3\,dx \\ &= \frac{13}{16} \end{align}

## Method B

For continuous distribution $$P\bigl(x<\frac{1}{2}\bigr)=P\bigl(x\le\frac{1}{2}\bigr)$$ so \begin{align} P\Bigl(x<\frac{1}{2}\Bigr) &= f\Bigl(\frac{1}{2}\Bigr) \\ &= 20\Bigl(\frac{1}{2}\Bigr)\Bigl(1-\frac{1}{2}\Bigr)^3 \\ &= \frac{10}{8} \end{align}

• You should upload images with the provided interface, rather than linking other sites that could disappear. In this particular case it wouldn't be too difficult to add the work using MathJax. – egreg Dec 31 '18 at 14:46
• Honestly I don't know how to use mathjax.It seems complicated to me. – user218102 Jan 1 '19 at 9:41
• @user218102 I added it for you. – egreg Jan 1 '19 at 9:55
• Thanks sir. It means alot. – user218102 Jan 1 '19 at 10:00

First method is the right one. In the second method you have confused the density function $$f$$ with the cumulative distribution function $$F$$. $$P\{X\leq \frac 1 2\}=F(\frac 1 2)$$ which is not the same as $$f(\frac 1 2)$$.
• @user218102 Consider, for example, the uniform distribution on $(0,1)$. Here $f(x)=1$ for $x \leq 0$ and $0$ for other values of $x$. But $F(x)$ is $0$ for $x \leq 0$, $x$ for $0<x<1$ and $1$ for $x \geq 1$. In general, $f$ and $F$ are related by the equation $F(x)=\int_{-\infty}^{x} f(t)\, dt$. If $X$ is a random variable with this distribution then $P\{X\leq x\}=F(x)=\int_{-\infty}^{x} f(t)\, dt$. – Kavi Rama Murthy Dec 31 '18 at 8:57