18
May 26

Unit 6.5. The uniform distribution

Chapter 6. Continuous Random Variables and Probability Distributions

Unit 6.5. The uniform distribution

You might want to review the definition of a uniformly distributed discrete variable in General properties of means.

Example 6.2. Take the power cable of your computer and stretch it along the real line. How would you describe the probability of the cable failing at any fixed point (plugs don't count)? Do you think this probability at some points is higher than at others?

Intuitive definition. Fix some segment $latex [a,b]$. We say that a random variable $latex U$ is uniformly distributed over $latex [a,b]$ if

(a) $latex U$ does not take values outside $latex [a,b]$ and

(b) its values inside $latex [a,b]$ are equally likely.

After having heard the motivating example and the intuitive definition most students are able to formally define the density of $latex U$.

Formal definition. $latex U$ is such a variable that its density is

(a) null outside $latex [a,b]$ and

(b) constant inside $latex [a,b]$.

Denoting

$latex {p_U}(t) = 0 \textrm{ if } t \notin [a,b],\ {p_U}(t) = c \textrm{ if } t \in [a,b].$

we can find the constant using the fact that the total density must be 1:

$latex \int\limits_{ - \infty }^{ + \infty } {{p_U}(t)dt}$ (using additivity of integrals)

$latex = \int\limits_{ - \infty }^a {{p_U}(t)dt} + \int\limits_a^b {{p_U}(t)dt} + \int\limits_b^{ + \infty } {{p_U}(t)dt}$ (using density definition)

$latex = \int\limits_a^b {c\,dt}$ (this is area of a rectangle)

$latex = c(b - a) = 1$

so $latex c = \frac{1}{{b - a}}$. The result is

$latex {p_U}(t) = 0\ \textrm{if } t \notin [a,b],\ {p_U}(t) =\frac{1}{{b - a}}\ \textrm{if } t \in [a,b]. \qquad (\textrm{Eq. 6.13})$

Important. In the interval formulas Eq. (5.16) and Eq. (6.4) the segment $latex [a,b]$ is arbitrary, whereas in the definition of $latex U$ it is fixed. To remember this, sometimes it's useful to denote $latex {U_{[a,b]}}$ the variable which is uniformly distributed over $latex [a,b]$.

Property 1. Usually students can guess that $latex E{U_{[a,b]}} = \frac{{a + b}}{2}$.

Proof. Using definitions (6.12) and (6.13) we get

$latex E{U_{[a,b]}} = \int\limits_{ - \infty }^{ + \infty } {t{p_U}(t)dt} = \int\limits_a^b {t{p_U}(t)dt} = \frac{1}{{b - a}}\int\limits_a^b {t\,dt}. \qquad (\textrm{Eq. 6.14})$

The last integral can be found using two steps from calculus (alternatively, that integral is the area of a trapezoid).

Step 1. We have to find what is called a primitive function. $latex F(x)$ is called a primitive function of $latex f(x)$ if $latex F'(x) = f(x).$ The primitive of $latex f(t) = t$ is known to be $latex F(t) = \frac{{{t^2}}}{2}$.

Step 2 is to use the primitive according to the integration rule

$latex \int\limits_a^b {f(t)dt} = F(b) - F(a).$

In our case $latex \int\limits_a^b {t\,dt} = \frac{{{b^2}}}{2} - \frac{{{a^2}}}{2} = \frac{{(b - a)(a + b)}}{2}.$ This together with Eq. (6.14) implies

$latex E{U_{[a,b]}} = \frac{1}{{b - a}}\frac{{(b - a)(a + b)}}{2} = \frac{{a + b}}{2}. \qquad (\textrm{Eq. 6.15})$

Property 2. $latex V\left( {{U_{[a,b]}}} \right) = \frac{{{{(b - a)}^2}}}{{12}}$.

Proof. There is no need to guess or remember this result. We start with the shortcut:

$latex V\left( {{U_{[a,b]}}} \right) = EU_{[a,b]}^2 - {\left( {E{U_{[a,b]}}} \right)^2}. \qquad (\textrm{Eq. 6.16})$

Here the first term is (see Example 6.1 in Mean, covariance, variance and correlation and Eq. (6.13))

$latex EU_{[a,b]}^2 = \int\limits_{ - \infty }^{ + \infty } {{t^2}{p_U}(t)dt} = \frac{1}{{b - a}}\int\limits_a^b {{t^2}dt}.$

It is well known that the primitive of $latex f(t) = {t^2}$ is $latex F(t) = t^3/3$. We can continue the previous display as

$latex EU_{[a,b]}^2 = \frac{1}{{b - a}}\left( {\frac{{{b^3}}}{3} - \frac{{{a^3}}}{3}} \right) \qquad (\textrm{Eq. 6.17})$

$latex = \frac{1}{{b - a}}\frac{{(b - a)({b^2} + ab + {a^2})}}{3} = \frac{{{b^2} + ab + {a^2}}}{3}.$

The equation $latex {b^3} - {a^3} = (b - a)({b^2} + ab + {a^2})$ we have just used can be verified directly. Combining equations (6.15), (6.16) and (6.17) yields

$latex V\left( {{U_{[a,b]}}} \right) = \frac{{{b^2} + ab + {a^2}}}{3} - {\left( {\frac{{a + b}}{2}} \right)^2} = \frac{{{b^2} - 2ab + {a^2}}}{{12}} = \frac{{{{(b - a)}^2}}}{{12}}.$

Exercise. The distribution function of $latex {U_{[a,b]}}$ is

$latex F_{U_{[a,b]}}(t) = 0\ \textrm{if } t < a,\ F_{U_{[a,b]}}(t) = \frac{t - a}{b - a}\ \textrm{if } a \le t \le b,\ F_{U_{[a,b]}}(t) =1\ \textrm{if } t > b.$


Previous: Mean, covariance, variance and correlation | Next: The normal distribution


Want the whole book (all 14 chapters, exercises, and the index) as a single PDF? Available on Lulu for $1.99.

Leave a Reply

You must be logged in to post a comment.