Density function of a continuous random variable: Intuition is not persuasive.

91 Views Asked by At

I have been studying probability and statistics. I am confronting an issue of being persuaded of "Why do we declare a density function to be zero when it is out of a range of the density variable?" My sense says that It should not exist(But not existing with a value that is zero). For example, assume the following density

$$f(x) = cx^2 \texttt{ for }0 \leq x \leq 1, f(x)= 0\texttt{ otherwise.}$$

Actually, in the otherwise part, density won't exist since the variable $x$ is not taking the value outside that range. More explanation, I feel that zero is a value rather than taking it representing the " does not exist " situation. Is anyone here has a better intuition, so that he can persuade me?

Thanks in advance.

3

There are 3 best solutions below

0
On BEST ANSWER

One of the useful things you can do with a density is to compute the probability that the observed value of a random variable is within a certain interval. For example, if the random variable $X$ has density function $f,$ then $$ P(a \leq X \leq b) = \int_a^b f(x)\,dx. $$

Now consider a variable with a probability distribution such as the one described in the question, which can take values only within the interval $[0,1].$ That is, by definition $0 \leq X \leq 1.$ Using the standard definition of a probability density function, which sets the density of this distribution to $f(x) = 0$ for $x < 0$ or $x > 1,$ we can still compute the probability that $X$ is in any interval using the same formula: $$ P(a \leq X \leq b) = \int_a^b f(x)\,dx. $$

But if $f$ is not defined outside $[0,1]$ you cannot compute $P\left(-1 \leq X \leq \frac12\right)$ in this way, because you cannot integrate $f$ over the entire interval $\left[-1,\frac12\right].$ Instead you will have to consider various special cases depending on which of the intervals $(-\infty,0),$ $[0,1],$ or $(1,\infty)$ each of the bounds $a$ and $b$ falls within.

It is even worse if you have a variable that can take values only in the set $[0,1] \cup [4,7] \cup [119,125].$ Now if $f$ is not defined outside that set, you may have to take a sum of up to three separate integrals in order to compute $P(a \leq X \leq b),$ with many special cases depending on where $a$ and $b$ fall within, between, or outside the intervals on which $f$ is defined.


On the other hand, the definition of a variable's distribution function is not the definition of the variable. The function is merely a function. The definition of the the distribution function $f$ of a variable $X$ does imply that if $\int_a^b f(x)\,dx > 0,$ then it must be possible for $X$ to take a value in the interval $[a,b].$ But if $\int_a^b f(x)\,dx = 0,$ the distribution function says nothing about whether it is possible for $X$ to have a value in $[a,b].$ You can perfectly well define a variable $X$ with distribution function $f$ that cannot take values within such an interval.

3
On

The density is the function $f$ such that $$P(X\in A) = \int_A f(x) d x$$ In your example, it predicts a $0$ probability for a set $A\subset \mathbb{R}\setminus [0,1]$, so the probability that the value is not in $[0,1]$ is zero. This is exactly what we need. Note that in probability, an event with probability $0$ is often called an impossible event.

The density function is a probability density, it is not a physical quantity. For example if we measure a temperature in Kelvin, a negative temperature has no meaning at all. But it is satisfactory to say that the probability of a negative temperature is $0$. You can see this as a numerical way to modelize impossibility.

0
On

For a single random variable you could just as well define the density only on the range of the random variable. But it is more convenient to define the density on a larger set for compatibility with other random variables that might be jointly distributed with the first one. The only way to do this consistently is to assign density zero to the points outside the range (or at least Lebesgue-almost-all of them).

This procedure is similar to defining the codomain of a bounded real-valued function to be $\mathbb{R}$ even though you could choose it to be smaller.