Is the probability density function unique?

Is the probability density function (pdf) unique?

For example, I've seen the pdf of the uniform distribution written in two different versions, one with strict inequality and the other is not strict. From the definition, pdf is a function $f$ such that $P(X\in B)=\int_B f$. So it seems that the value of $x$ at one particular point doesn't really matter. Am I correct?


Indeed. If two (measurable) functions coincide except on a set of measure zero, then each one is as legitimate as the other to be the density of the probability distribution of a given random variable.

For example, consider the Borel function $f$ defined on $\mathbb R$ by $f(x)=1$ for every irrational $x$ in $(0,1)$ and $f(x)=0$ otherwise. For every random variable $X$ uniformly distributed on $[0,1]$ and every Borel subset $B$ of $\mathbb R$, $\mathrm P(X\in B)=\int\limits_Bf(x)\mathrm dx$. Since this is how the density of the probability distribution of $X$ is defined, the function $f$ is indeed a density for the uniform distribution on $[0,1]$, as suitable as the functions $\mathbf 1_{[0,1]}$ or $\mathbf 1_{(0,1)}$ (of course, the latter are more common choices).