Is there a random variable which has a density but the distribution function is not differentiable

density functionprobabilityprobability distributionsprobability theorystochastic-calculus

I want to check or find a counterexample for the following statement

The distribution $P_X$ of a random variable $X$ has a density iff it's distribution function $F_X$ is continuously differentiable.

I could prove that if $F_X$ is continuously differentiable then $F_X'$ id the density of $X$. Now I claim that $\Rightarrow$ does not hold in general. But I somehow can not find a counterexample of a random variable which has a density but the distribution function is not differentiable.

Could someone help me finding a counterexample provided my claim is true.

Thanks for your help.

Best Answer

If $X \sim U(0,1)$ then $X$ has a density but $P_X(x)=0$ for $x \leq 0$, $x$ for $0 <x<1$ and $1 $ for $x \geq 1$. This function is not differentiable at $0$ and $1$.

Related Question