[Math] Does PDF have to be continuous

continuitydensity functionprobabilityprobability theory

I know that Cumulative Distribution Function $F_X$ of continuous random variable $X$ is continuous.

What about its Probability Density Function $f_X$? Does it have to be continuous? Why, why not?


I think it has to be continuous so I can actually integrate it to get the CDF.

However, in this example of 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}$$

I think this function has discontinuity at $x = 0$, hasn't it? Its plot:

enter image description here

But I can compute the following CDF out of it:

$$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}$$

Best Answer

A pdf is a non-negative measurable function $f$ with $\int_{-\infty} ^{\infty} f(x)dx=1$. For example $f(x)=1$ if $x \in A$ and $0$ otherwise defines a pdf for any set $A$ with Lebesgue measure $1$. So a pdf need not be continuous.

(Automatically the distribution function corresponding to any pdf is a continuous function).