Discrete Random Variable, their expectation, variance and standard deviation were explained earlier. In general, three kinds of probability distributions – binomial, normal and Poisson (also known as rare event distribution) – govern events that are described by such random variables.
Continuous random variables are different. They can take an infinite number of values within a given interval. We cannot list out all these values simply because we cannot mark two neighboring values for a continuous variable. The curious thing is the probability of a continuous random variable taking a concrete single value could be zero. Of course, we need to overcome this situation. Let us see how.
We are now dealing with a continuous random variable. So, we shall skip the blog popularity example that we used while discussing Random Variables. The analogy gets tedious. A roulette wheel is more manageable. Suppose our continuous random variable x is allowed to take any (real) value including all the decimals in between the marked integers in a roulette wheel. So after a spin and stop, where will the roulette wheel pointer stop? Somewhere for sure. But can we predict it? That is, what is the probability that the pointer will stop at a certain (real) value? In other words, after a roulette wheel spin and stop trial, what is the probability that x will take a definite value? The answer is zero. Yep.
The roulette wheel is essentially a circle, unless it is rigged by one of those guys from the Ocean’s Eleven series. So for convenience let us divide the circle (in which the real values are marked) into fifteen equal tangible sectors. Now we know after a spin-stop trial the roulette pointer will stop in one of these sectors – assuming the dividing line is an imaginary one of zero width. Obviously, the sectors are of length each. So we can ask the question what is the probability that the roulette pointer will fall within one of these fifteen sectors (say, between x and
) and the answer would be
. That is, the probability that a continuous random variable ‘x’ would fall within a range x and
in this roulette wheel example would be
If we now reduce the , i.e., if we increase the number of sectors the roulette wheel is divided into, obviously, the probability that the pointer will fall within one of the sector will correspondingly reduce.
Extending this argument to a situation with , we would have the pointer located at x (no more a ‘range’ as
). Here, the probability as defined in the earlier equation, is zero. So as said earlier, the probability that a continuous random variable x would take a definite value is zero.
But we did end up with a definite value, which means this is not an impossible event (for which is what the probability is zero). So what did we do wrong? Just the limits.
This is where the concept of a probability density function comes in.
Assume a point P located somewhere inside a solid block, labeled with a position vector r. Let a volume V envelope the point fully and let this volume contain mass M. We shall now reduce the volume V in steps as such that the point P is still enclosed within each of these volumes. Correspondingly the mass of these volumes would also reduce to say
and so on. When the volume is reduced to zero, we would have reached point P, but with a corresponding mass M = 0. In other words, the block (or body) of a finite mass seem to be made up of an infinite number of points of zero masses.
To strike a parallel, the non-zero probability of the roulette wheel pointer would stop at any one of the roulette wheel value is a sum of the infinite number of zero probabilities that the pointer will actually stop at an exact value within the considered range.
This analogy gives rise to the probability density function. Instead of dealing with the zero mass of body points, we define the concept of a density that is non-zero even at a point.
If is the mass of the volume
within which we have the point P located at a position vector r, then the density at this point is given by the ration of the
and
as the limit of
tends to zero, written as
If the volume is small enough, we could write
. The mass M of a body occupying a volume V then would be
where the integral is performed over the volume dV.
We can borrow this concept back to our roulette wheel, continuous random variable and probability. So when dealing with continuous random variables, probability theory uses the probability density function rather the probability itself.
If f(x) is the probability density function of a continuous random variable x then it can be defined as
Here is the probability that the random variable will take a value between x and
. So if we turn around and ask for the probability that a random variable will be between say
, it is given as
Observe here if above integration is performed over the entire range of values the continuous random variable can take, it would be equal to one (the probability of a sure event). In our roulette example if we ask for the probability that the pointer will end up after a spin-stop trial in at least one of the sectors, then the above integral needs to be evaluated between 0 and and the result would obviously be equal to one. In general, if we assume a large range for the random variable we could write
Specific to our roulette example, we could observe that the probability that the pointer will stop within one sector is independent of what sector it is or the value of x itself. This simplifies the probability density function integral as
.
This is similar to the block case, when it has a uniform density so that it becomes independent of the position it is measured ). In general, the density
varies from point to point in a solid and so can a probability density function of a continuous random variable.
For completion, the expectation and variance for a continuous random variable are given by
and
.
Compare these expressions with the corresponding ones for a discrete random variable.
[Surprisingly, I couldn't find in the internet a write up on why we require a probability "density". The many sites that a google search takes me doesn't explain this. Of course they give the correct formula and even tutorials. Hence this write up. Let me know if you locate any useful links.]


