Interactive animation

Uniform distribution

Continuous uniform distribution

The uniform distribution on the segment [α, β] is best defined by it probability density function p(x) :

Because the integral of a p.d.f. is 1, one must have k = 1/(β - α).

 

 

Basic properties

 µ = (α + β)/2

 

Var = (β - α)²/12

 

 

Order statistics

We describe here the order statistics of the uniform distribution.

Estimation of the parameter θ of the uniform distribution

Sufficient statistics

           * U[0, θ]

We show here that X(n), the largest observation in a n-sample, is a sufficient statistic for θ. We'll then show that this statistic is in fact minimal sufficient, then that it is complete.

 

            * U[θ, θ + 1]

We'll identify a sufficient statistic for θ, then show that this statistic is minimal sufficient. This is an example of a minimal sufficient statistic whose dimension does not match that of the parameter to be estimated.

We'll then show that the statistic is not complete from which we'll deduce that in such a setting, θ has no complete statistic.

Unbiased estimation

           * U[0, θ]

We show here that the uniform distribution U[0, θ] does not comply with the regularity conditions needed to derive the Cramér-Rao inequality. As a consequence, we'll be able to identify an unbiased estimator of θ whose variance is smaller than the (then meaningless) Cramér-Rao "lower bound".

In fact, we show here that this estimator is the UMVUE of θ, a result that we'll then generalize by identifying the UMVUE of any differentiable function of θ.


Note, though, that we identify here a biased estimator of θ whose Mean Squared Error (MSE) is less than that of the UMVUE of θ

            * U[θ, θ + 1]

We show here that no function of θ admits a UMVUE.

Tests on θ

We build here the Likelihood Ratio Test testing the null hypothesis θ = θ0 against the alternative hypothesis θ  θ0 for the uniform distribution U[0, θ].

The same scheme may be used for testing other null and alternative hypothesis.

Discrete uniform distribution

The concept of "uniform distribution" also applies to the discrete case as well. We then have n items, and each item has the probability 1/n of being chosen during a draw. This is typically the case of a (fair !) lottery, where all the numbers have the same probability of being drawn.

The discrete uniform distribution is a special case of the multinomial distribution.

Multidimensional uniform distribution

The notion of uniform distribution extends straightforwardly to the multidimensional case. The uniform distribution in [0, 1]n is defined by its p.d.f. that is equal to :

In practice, the mutidimensional uniform distribution in [0, 1]n is simulated by the product of n independent variables, all uniformly distributed in [0, 1].

The multidimensional uniform distribution in any hyper-parallelepiped whose edges are parallel to the axes is a straightforward generalisation of this distribution.

_______________________

 

Despite its simplicity, the uniform distribution has very important applications.

________________________

Animation : the "Broken Stick" problems

Watching the build-up of the histogram of a uniform distribution is no big thrill. So, instead, we spice up the animation by illustrating four little problems involving the uniform distribution.

Here is the first one :

What is the distribution of Y ? We call it the "recursive uniform" distribution (but it is sometimes less pedantically called.the "Broken Stick" distribution, for obvious reasons).

We give the answer in the Tutorial below.

 

We calculate :
   * Here the expectation of Y  by the Theorem of Iterated Expectation.
   * Here the variance of Y  by the Theorem of Conditional Variance.

 

 

The "Book of Animations" on your computer

 

 

 

 

The Broken Stick distribution is tightly connected to the distributions of the record values of the uniform distribution : we show here that it is in fact identical to that of the first upper record of the uniform distribution.

We could envision iterating the Broken Stick approach for the purpose of identifying the distribution of the second record. Unfortunately, the calculation becomes intractable. But fortunately, this distribution, as well as that of the records of any order, can be found by a more general method that we then describe.

_______________________

 

In the same animation, we also illustrate three other distributions labeled "Short", "Long" and "Random".

As before, X is uniform in [0, 1]. But now, instead of choosing Y uniformly in the right-hand side segment [x, 1] :

We give the answer in the Tutorial below.

__________


If you solved these problems, you'll find it easy to solve these last two. They are variants of the "Random" case. After X has been drawn, the segment in which Y is going to be drawn is still selected at random. But instead of assigning a 0.5 probability to each of the segments :

        * The left-hand side segment is selected with probability x,   while

        * The right-hand side segment is selected with probability 1 - x.

In other words, each segment is assigned a probability to be selected equal to its length.
 

What is the distribution of Y ?

-----

        * The left-hand side segment is selected with probability 1 - x,   while

        * The right-hand side segment is selected with probability x.
 

What is the distribution of Y ?

---------------

We encourage you to solve these two problems, as the solutions will probably surprise you.

Product and ratio of uniform random variables

We calculate here the distributions of :

    * The product,

    * And the ratio

of two independent and uniformly distributed random variables as an illustration of the concept of "marginal distribution".

______________________________________________________

 

 

Tutorial 1

 

In this Tutorial, we establish the elementary properties of the uniform distribution. Because of the simplicity of the p.d.f., the most convenient way to calculate the moments is straight calculation from the definition of moments.

Yet, it is quite instructive to also calculate these moments with the moment generating function. Although the function itself is simple enough, it and all its derivatives are in the 0/0 form for t = 0, thus making a straightforward identification of the moments impossible. We go around this difficulty using two methods : Taylor expansion and L'Hôpital rule.

So, although the m.g.f. is not the most appropriate tool for calculating the moments of the uniform distribution, it gives us an opportunity to go over some useful mathematical techniques.

 

 

BASIC PROPERTIES OF THE UNIFORM DISTRIBUTION

Cumulative distribution function

Probability for the value of X to be in any interval

All order moments

Mean

Variance

Higher order moments

Moment generating function and moments

Moment generating function

Moments

Taylor expansion

L'Hôpital rule

TUTORIAL

______________________________________________

 

 

Tutorial 2

 

In this rather lengthy Tutorial, we go over some important applications of the uniform distribution.

We review some of the many solutions to these classical and important problems. Some demonstrations are left as exercises.

 

 

SOME APPLICATIONS OF THE UNIFORM DISTRIBUTION

The discrete uniform distribution

The "How many colors ?" problem

The problem

Ball multiplicities and number of colors

Multiplicities m(i)

Number of colors as a function of multiplicities

Estimating the number of colors

Random subsets

The notion of "random subset"

Two intuitive methods

Enumerating k-subsets

Drawing without replacement  (No demonstration)

A recursive method based on conditional probabilities

General principle

Probability for the first element to be in the k-subset

The general case

The recursive algorithm

Tree-like representation

Random permutations

Enumerating permutations

Exhaustive draw without replacement (no demonstration)

TUTORIAL

_________________________________________________________

 

 

Tutorial 3

 

We give here the solutions to the first four problems.

 

SOLUTIONS TO THE FIRST FOUR PROBLEMS

The "Broken stick" distribution

The "Short" problem

Preliminary remark

Left-hand side distribution

Right-hand side distribution

The "Long" problem

Left-hand side distribution

Right-hand side distribution

The "Random" problem

Mixture of random variables

The solution

TUTORIAL

 

______________________________________________________

 

Related readings :

Probability integral transformation

Order statistics

Record values

Monte-Carlo simulation

Download this Glossary