# Notation for probability density

On one of my other questions here, I was criticized (and rightly so, as it was the source of my mistake) for using this notation for a continuous random variable $X$ with pdf $f(x)$: $$\mathbb{P}\{X\in dx\} = f(x) \mathop{dx} .$$ I was taught this notation by my teacher. The purpose of this notation is to stress the fact that technically, $\mathbb{P}\{X=x\}=0$ if $X$ is continuous. I believe the notation is shorthand for $\mathbb{P}\{X\in [x, x+dx)\} = f(x) \mathop{dx}$.

As I am only familiar with this notation and didn't know that other people did not use it, I would really appreciate it if someone could give me a better sense of what notation is more accepted/used. Is the $f$ and $F$ notation of pdf and cdf respectively widely used?

Given a pdf $f(x)$ for a continuous random variable $X$, its cdf is $F(x)=\int_{-\infty}^x f(t)dt=\mathbb{P}\{X<x\}$ (thanks for catching the typo, André!), which corresponds to the discrete case where $F(x) = \sum_{k=0}^x f(x) = \mathbb{P}\{X\le x\}$. Is there just no continuous analog for the discrete expression of $\mathbb{P}\{X=x\}=f(x)$? One piece of advice that I was given by another user was to deal primarily with cdfs and not with pdfs.

Thank you in advance, and apologies if this was not the right place to ask this question.

-
You will be dealing with density functions a lot, there is no reason to avoid them. Just avoid thinking in terms of $\Pr(X=x)$. The remark about interval from $x$ to $x+dx$ is informally fine. And in answer to your question, yes, the notations $f(x)$, $F(x)$, or $f_X(x)$, $F_X(x)$ are standard for density, cdf. By the way, $F_X(x)=\int_{-\infty}^x f_X(t)\,dt$. –  André Nicolas Jan 8 '13 at 22:17
It doesn't make any difference for continuous random variables, but for consistency of notation, I would suggest that you always use $P\{X \leq x\}$ as the value of $F_X(x)$, and so write $$F_X(x) = \int_{-\infty}^x f_X(t)\,\mathrm dt = P\{X\leq x\}$$ instead of $$F_X(x) = \int_{-\infty}^x f_X(t)\,\mathrm dt = P\{X< x\}$$ as you have it. –  Dilip Sarwate Jan 9 '13 at 0:02
Also, $P\{X \in [x, x+\Delta x)\}$ is approximately equal to $f_X(x)\Delta x$ not exactly equal the way you have it (the approximation improving as $\Delta x$ approaches $0$), and you should include the proviso that the result holds only if $f_X(x)$ is continuous at $x$. –  Dilip Sarwate Jan 9 '13 at 0:07
It was useful . –  AmirHosein SadeghiManesh Jan 9 '13 at 8:10

The notation $\mathbb P(X\in\mathrm dx)=f_X(x)\mathrm dx$ is odd, even as a shorthand, since $\mathrm dx$ can only mean an infinitesimal interval near $0$ and one wants to indicate an interval at $x$ or around $x$. The notation $\mathbb P(X=x)=f_X(x)$ is of course absurd since $\mathbb P(X=x)=0$ when $f_X$ exists. The notation $\mathbb P(X\in(x,x+\mathrm dx))=f_X(x)\mathrm dx$ is fine (and widely used). Personally I would not be too picky about using $(x,x+\mathrm dx)$ or $[x,x+\mathrm dx)$ as the infinitesimal interval here, since, anyhow, these are just semi-rigorous shorthands.

-
For my benefit, could you clarify what exactly $\mathbb{P}(X\in(x,x+dx))$ means? Does it not mean anything on its own? Is it just used for shorthand in equalities, for example, is $\mathbb{P}(X\in(x,x+dx))=g(x)dx$ shorthand for $$\mathbb{P}(X\in(a,b))=\int_a^bg(x)dx$$ for any $a<b$? –  jkn Sep 5 '13 at 15:25
@jkn Your interpretation is fine. –  Did Sep 5 '13 at 15:30
Thanks for the reply. –  jkn Sep 5 '13 at 15:32

The notation $F_X$ is very widely used to represent the cumulative distribution function (cdf) of a random variable $X$, and is defined as $F_X(x)=P[X\le x]$. This is valid whether or not $X$ is absolutely continuous. The probability density function, $f_X$, is only well-defined when $X$ is absolutely continuous, in which case $F_X$ is differentiable and $f_X=F'_X$. In this case only, your shorthand is legitimate, because $$f(x)=F'(x)=\lim_{\Delta x\rightarrow 0}\frac{F(x+\Delta x)-F(x)}{\Delta x}=\lim_{\Delta x\rightarrow 0}\frac{1}{\Delta x}P[X > x \wedge X\le x+\Delta x].$$ In terms of the cdf, the probability that $X$ takes on a particular value $x$ is $$P[X=x]=P[X\le x]-\lim_{y\rightarrow x-}P[X\le y]=F_X(x)-F_X(x-),$$ i.e., the difference between $F_X$'s value at $x$ and its limiting value approaching $x$ from below. Of course, this can only be nonzero if $F_X$ has a discrete component.

-
That $X$ is absolutely continuous does not make $F_X$ differentiable hence the displayed series of identities involving $F'(x)$ needs qualification. –  Did Jan 9 '13 at 6:35
@did: You're right; absolutely continuous only means differentiable almost everywhere. So $f_X=F'_X$ where $F_X$ is differentiable, and can be assigned any value (say, $0$) at the remaining points, which have measure $0$. –  mjqxxxx Jan 9 '13 at 7:43
What about correcting your post accordingly? –  Did Jan 9 '13 at 11:20