Sampling from uniform distribution - example of convolution
For the intuition behind the uniform distribution see this post. More formally, let us fix an interval . We say that a random variable
is uniformly distributed on
if any value in this segment is equally likely and any value outside is impossible. The "equally likely" part gives a constant density value in the segment and the "impossible" part gives zero density outside the segment. Thus the density is of the form:
This is a step function divided by to make the total area under the graph equal to one. It is easy to find the distribution function of
by considering three ranges of
:
What is the density of a sum?
Suppose we have a sample of two independent observations from the same uniform distribution. This means that they have the same density:
By independence we can apply the convolution formula (see equation (5)). The sum has the density
(1)
Here is different from zero only for
(2) .
Similarly, is different from zero only for
or, equivalently, only for
(3) .
(2) and (3) show that the integrand in (1) is different from zero only for So (1) becomes
(4)
Next we consider several cases depending on the relationship between the segments

Figure 1. Relationship between segments
a) The two segments do not intersect:
b)
c) Finally,
Summarizing,
(5)


This is a triangular distribution, shown in Figure 2 from Mathematica with a=1, b=2. Note that it is smoother than the density of the uniform distribution: the density in Figure 2 is continuous and doesn't have jumps.


The density of the sum of three independent observations
It is convenient to denote
Leave a Reply
You must be logged in to post a comment.