5

Let $f$ be a probability density function (PDF) with domain $D$. How do you think about the codomain (range) of $f$? I'm only able to make sense of this when considering $f$ on an interval; $\int f(x) \newcommand{\dx}{\,\mathrm{d}x}\dx$ makes sense, but $f(x)$ does not. Is this the quirk that defining distributions/generalized functions solves? This is the mental block I've hit trying to make the leap from a discrete random variable to a continuous random variable.

For example, if your random variable is height in inches and $\int_{(a,b)} f(x) \dx$ gives you the proportion of people in your sample with a height in inches between $a$ and $b$, then the units on $f(x)$ must be something like percent per inch, and I can't wrap my head around that.

Mike Pierce
  • 19,406
  • 1
    This answer is related, but basically concludes one should not think of a PDF as a function in the first place :) – Mike Pierce Jul 16 '21 at 18:43
  • If it helps, I do think of $[units\ of\ f(x)] = [units\ of\ x]^{-1}$, and the values that $f$ returns are unitless, just like $2$, or $\pi$. – JonathanZ Jul 16 '21 at 21:33
  • @JonathanZsupportsMonicaC Wait that didn't quite make sense. Do you think of $f(x)$ or $\int f(x) ,\mathrm{d}x$ as unitless? I.e. is your PDF or your CDF returning unitless quantities? – Mike Pierce Jul 16 '21 at 21:37
  • I think the term "probability density" is actually fairly descriptive. If you want to know the mass of a metal rod from $x$ and $x + \Delta x$, you multiply the linear density $\rho(x)$ by $\Delta x$. If you want to know the probability that a random variable $X$ is between $x$ and $x + \Delta x$, you multiply the probability density $f(x)$ by $\Delta x$. – littleO Jul 16 '21 at 23:16

1 Answers1

4

If the units of $X$ are $u$, then the units of $f(x)$ are $u^{-1}$. This is because the units of $\int f(x)\,dx$ are (units of $f(x))\times$(units of $dx$) on the one hand, and on the other hand $\int f(x)\,dx$ must be unitless, since it is a probability.

The fact that $f(x)$ has units $u^{-1}$ has some mathematical meaning. Suppose $X$ is the random weight of a newborn in kg, with pdf $f_X(x)$, and $X'=1000X$ is the weight of the same newborn in grams, with pdf $g_{X'}(x)$. Note $$g_{X'}(x)=\frac1{1000} f_X\left(\frac{x}{1000}\right).$$ That is, when we change units in a manner that increases the values of $X$ by a factor of $1000$,, the outputs of $f_X(x)$ are decreased by a factor of $1000$, showing $f(x)$ has the opposite units of $X$.

Mike Pierce
  • 19,406
Mike Earnest
  • 84,902