# Deriving Density Function (pdf) from Distribution Function (cdf)

A random variable $V$ has the distribution function:

$$F(v) = \begin{cases} 0, & \text{for v<0 } \\ 1-(1-v)^A, & \text{for 0\le v\le1 } \\ 1,& \text{for v>1 } \\ \end{cases}$$

where $A>0$ is an unknown parameter. Determine the density function in the three regions and present it graphically.

### My Attempt :

For $0\le v\le1$, $f(v)=\frac{d}{dv}F(v)=\frac{d}{dv}[1-(1-v)^A]=-A(1-v)^{A-1}(-1)=A(1-v)^{A-1}$.

Hence the density function is:

$$f(v) = \begin{cases} A(1-v)^{A-1}, & \text{for 0\le v\le1 } \\ 0,& \text{otherwise } \\ \end{cases}$$

• Is this correct ?

But, I can't draw the density function. In R i have tried this but which seems to be incorrect to me:

A=2
curve(A*(1-x)^(A-1),from=0,to=1)


A=5
curve(A*(1-x)^(A-1),from=0,to=1)


• The above two curves are different for different values of $A$. Can $A$ change the shape of the density function thus?

• If $A=3$ and $x=0.123$, then $f(v) =A(1-v)^{A-1}= 2.307387$.

But, $f(v)$ is probability which lies between $0$ and $1$. Is my density wrong?

Also the graphs are showing that $f(v)$ exceed $1$ . In the second graph, it takes value $5$ also.

• Your last question is answered at stats.stackexchange.com/questions/4220/… (the top hit on a search for PDF). Given that all these distributions are supported on the interval $[0,1]$, if $A$ didn't change its shape, what else could it possibly do?
– whuber
Apr 15, 2015 at 15:31

Your calculated $f(v)$ is correct.

_ changing $A$ can change the shape of the function this way. Many random variables have parameters that drastically change the density shape (see the "beta" or "Weibull" distributions). There's nothing wrong with this change.
_$f(v)$ is not itself a probability, so it can take values over $1$. Its only requisites are being non-negaive and integrate one. Some people see useful to think about a density function as analogous to a mass function of a discrete distribution (I don't, since it might bring this kind of confussions). The latter is a probability so it must lay between $0$ and $1$. But a pdf is not, so a $5$ value like the one you saw is in fact possible.