Topics: Probability - Random Variable
(definition)
Let be a real random variable whose range is .
A density function is a function that allows us to specify the probability of being a specific value (in the discrete case) or of falling within a particular range of values (in the continuous case, though indirectly, as you’ll see below).
Discrete Random Variables
When is a discrete random variable, we define the density function of as the function as:
…and the following must hold:
The density function of a discrete random variable does tell us the probability that the random variable takes exactly a specific value.
The density function of a discrete random variable is also called a mass function.
Absolutely Continuous Random Variables
Continuous vs. Discrete Density Functions
Notice that, when the random variable takes discrete values, we can find the probability that is exactly a specific value, hence why we defined it the way we did.
We can’t do the same with absolutely continuous random variables, since there is an infinite amount of possible values in any given interval. The probability of being exactly a specific value is .
Instead, we will define the density function to be an integrable function whose integral over a given interval gives us the probability that the random variable falls within that interval.
Basically: for absolutely continuous random variables, the density function does not define the probabilities; rather, it is the area under its curve (its integral) that does.
It does not tell us the probability of being a specific value, it simply tells us, by means of its integral, the probability of being in range of values.
Indeed, its integral is basically the random variable’s distribution function.
When is an absolutely continuous random variable, we define the density function of as the function as:
…and the following must hold:
Many times, when simply saying density function, an absolutely continuous random variable is implied (with the discrete case using mass function).