From other materials that I've read, the probability density of a continuous random variable must itself be continuous. Is this correct? If it is, I don't understand why that would be so, why can't the probability change abruptly?
-
3If I recall correctly, there is a restriction to at most countable discontinuities. – Andrew Christianson May 26 '12 at 16:58
-
1At least one discontinuity is common in densities of practical importance. – André Nicolas May 26 '12 at 17:31
-
6@DrewChristianson: Perhaps you are thinking of probability distribution functions. A density function can even be everywhere discontinuous. – Nate Eldredge May 26 '12 at 18:48
-
2"Continuous" distribution means the cdf (cumulative distribution function) is continuous. This does not mean the density is continuous, or even that a density exists. – GEdgar May 27 '12 at 18:34
4 Answers
Michael Chernick asks for an example of a probability distribution with a density that is everywhere discontinuous.
As discussed in this question, there exists a measurable set $A \subset \mathbb{R}$ such that for every interval $I$, we have $0 < m(A \cap I) < m(I)$, and moreover $m(A) < \infty$. Then $f(x) = \frac{1}{m(A)} 1_A(x)$ is a nonnegative measurable function with $\int_\mathbb{R} f(x)\,dx = 1$, so it can be taken as the density of a continuous probability distribution. $f$ is nowhere continuous because every interval contains points of $A$ and $A^C$. Moreover, any function $g$ with $f=g$ a.e. is also nowhere continuous.

- 97,710
-
3(+1) More generally, a construction similar to the following should work: Let $f$ be a probability density function continuous on $\mathbb R$. Take $g = f \cdot 1_{(\mathbb R \setminus \mathbb Q)}$. – cardinal May 27 '12 at 18:43
-
1@cardinal: This works, of course, but just noting that the function in my answer is in some sense "worse", in view of my last sentence. For your function, you can modify it on a null set (which doesn't really change it as a density function) and get something everywhere continuous. For mine, no matter how much you modify it on null sets, it remains nowhere continuous. – Nate Eldredge Apr 21 '19 at 21:58
Take $f(x) = 2x$, $0\le x \le 1$, and 0 otherwise. This is a density function which is not continuous.

- 49,383
Although valid I don't think the triangular density given by ncmathsadist is a good example. The U[0.1] density is discontinuous too because of the abrupt rise at x=0 and drop at x=1.But both these densities are continuous within their domain. I think a better example would be one with a discontinuity in its domain. Consider the density f(x)=2x for 0<=x<=1/2
and f(x)=(5-2x)/16 for 1/2
Certainly a density can have many such discontinuities. But can anyone give an example of a true probability distribution with a density that is everywhere discontinuous?

- 4,639
- 2
- 19
- 24
-
2In some sense, all probability distributions that are absolutely continuous have (a version of) a density that is everywhere discontinuous on the closure of its support. – cardinal May 27 '12 at 16:26
-
@cardinal: Could you please supply a reference or post an answer to explicate your assertion? Thank you. – Hans Dec 14 '15 at 20:10
No, need not be. However, the cumulative distribution function (CDF), is always continuous (mayn't be differentiable though) for a continuous random variable. For discrete random variables, CDF is discontinuous.

- 107
-
First, CDF is not cumulative density function. CDF is cumulative distribution function. Second, question is asking about probability density functions (PDF's) not about CDF's. – Airbag Feb 15 '17 at 05:03
-