7 Population Models

7.4 The Uniform Distribution

For purposes of computing probabilities with ease, the uniform distribution is handy. Suppose that X is a continuous random variable with p.d.f. f(x). We say X has a uniform distribution if there are real numbers a and b, with a<b, such that

f(x)={1b-aif axb0otherwise.

We say that X is uniformly distributed between a and b, and our shorthand notation for this distribution will be XU(a,b).


Notes:

  • In graphing the uniform distribution, over the interval [a,b], draw a rectangle of height 1/(b-a) as shown in Figure 7.7.

    Figure 7.7: Uniform Distribution U(a,b)
  • If an X is randomly generated, it will be between a and b, i.e., it won’t be less than a or greater than b.

  • Since the total area must be 1, the height of the box is 1/(b-a).

  • By symmetry, the mean μ of XU(a,b) is the midpoint of the interval [a,b], i.e., it is the average of the two endpoints. In symbols,

    μ=a+b2.

    Knowing this is handy in interpreting some simulations.2929It turns out that if XU(a,b), then the variance of X is σ2=(b-a)2/12. This too can be handy for some simulations.

  • Computing probabilities amounts to computing areas of rectangular boxes, as illustrated in the next example.

Example 7.4.1.

Suppose XU(-1,2). The graph of the p.d.f. is shown in Figure 7.8.

Figure 7.8: Uniform Distribution U(-1,2)

To illustrate computing probabilities, let’s compute P(X>0.75). The area is illustrated in Figure 7.9.

Figure 7.9: P(X>0.75)

The width of the box is 2-0.75=1.25, while the height of the box is 1/3. Thus,

P(X>0.75)=1.2513=5120.4167.

Note that the mean of XU(-1,2) is μ=(-1+2)/2=0.5.

Exercises

  1. 1.

    Suppose XU(5,15). Sketch the distribution, labeling the axes appropriately, sketch and compute P(2<X<10), and compute the mean μ of X.

  2. 2.

    Suppose XU(-10,40). Sketch the distribution, labeling the axes appropriately, sketch and compute P(X<12), and compute the mean μ of X.