Take the 2-minute tour ×

Consider a random variable X that always takes a single value, c. I would think that a valid PDF for X would be $$f(x) = \begin{cases} 1/c & x = c \\ 0 & \text{Otherwise}\end{cases}$$

However, I know the PDF is supposed to be the derivative of the CDF, and in this case derivative of F(x) would be 0, both when $x<c$ and when $x\geq c$

What am I missing ?

share|improve this question
In this case the derivative of F at x would be zero for every x different of c and would not exist at x=c. // Not every random variable has a pdf, for example Dirac ones have not. –  Did Aug 15 '11 at 22:06
add comment

4 Answers

up vote 7 down vote accepted

What you're looking for is the Dirac delta "function"; specifically

$$f(x) = \delta(x-c).$$

I've put "function" in scare quotes above, since the Dirac delta is not actually a real function, although it can in many cases be treated as one.

Informally, you can visualize $\delta(x)$ as a function which has an infinitely tall peak at $x=0$ and is zero everywhere else; specifically, the "infinitely tall peak" needs to be just tall enough to have the area under it integrate to $1$. Of course, no actual real-valued function can have such a peak, but it turns out that, if you simply pretend that such a function exists and don't ask any hard questions about what its value at $x=0$ actually is, many calculations will just work as if nothing odd was going on.

Formally, the Dirac delta can be defined as a generalized function, specifically as a distribution. (And no, the similarity of the name with "probability distribution" is not a coincidence.)

share|improve this answer
add comment

Your $f$ is not a valid PDF, since $$ \int_{ - \infty }^\infty {f(x)\,dx} = 0 \neq 1. $$

share|improve this answer
Moreover, consider the case $c \leq 0$... –  Shai Covo Aug 15 '11 at 22:16
But isn't the integral of f(x) = 1 at the exact point (x = c) and 0 everywhere else, integrating to 1 in total? –  Jand Aug 15 '11 at 22:18
No. Since the integral of the zero function is $0$, so is the integral of $f$: changing a function on a set of measure $0$ does not affect the integral. –  Shai Covo Aug 15 '11 at 22:22
add comment

A PDF (probability density function) is only for a continuous distribution - more precisely, a distribution that is absolutely continuous with respect to Lebesgue measure. Your distribution is discrete, not continuous, so it does not have a PDF, it has a PMF (probability mass function). There are also singular continuous distributions (but nobody talks about them in elementary courses), and mixtures of the three types.

share|improve this answer
add comment

The answer to the question in the subject line is yes.

Specifically: $$ f(x) = \begin{cases} 1 & \text{if }x=c \\ 0 & \text{otherwise} \end{cases} $$

The is a probability density with respect to counting measure on the real line.

share|improve this answer
He/she is looking for a continuous distribution. –  Unreasonable Sin Aug 15 '11 at 23:29
The answer to the question in the subject line is definitely no. –  Did Aug 16 '11 at 7:27
Sorry, "Unreasonably", but that's exactly wrong. The poster was asking for a discrete distribution, since that's what a distribution would be if it's concentrated at one point. This is a density with respect to counting measure. @Didier_Piau: You're quite mistaken. –  Michael Hardy Aug 19 '11 at 17:52
@Michael: Glad to know (that I am quite mistaken). Care to explain why? (Unrelated: your comment was not signaled to me, please use the @ thing in a more conventional way, that is, if you want your comments to reach their target.) –  Did Aug 30 '11 at 11:32
Suuure... How clever... I guess that next time, when somebody asks if the indicator function of $\mathbb Q$ in $\mathbb R$ is continuous, your answer will be yes (for the discrete topology, haha). –  Did Dec 15 '11 at 7:20
show 1 more comment

Your Answer


