## Continuous Uniform Distribution

The continuous uniform distribution is the simplest probability distribution where all the values belonging to its support have the same probability density. It is also known as rectangular distribution.

This tutorial will help you understand how to solve the numerical examples based on continuous uniform distribution.

## Definition of Uniform Distribution

A continuous random variable $X$ is said to have a Uniform distribution (or rectangular distribution) with parameters $\alpha$ and $\beta$ if its p.d.f. is given by $$\begin{equation*} f(x)=\left\{ \begin{array}{ll} \dfrac{1}{\beta - \alpha}, & \hbox{\alpha \leq x\leq \beta;} \\ 0, & \hbox{Otherwise.} \end{array} \right. \end{equation*}$$

## Distribution Function

The distribution function of uniform distribution $U(\alpha,\beta)$ is

$$\begin{equation*} F(x)=\left\{ \begin{array}{ll} 0, & \hbox{x<\alpha;}\\ \dfrac{x-\alpha}{\beta - \alpha}, & \hbox{\alpha \leq x\leq \beta;} \\ 1, & \hbox{x>\beta;} \end{array} \right. \end{equation*}$$

## Mean of Uniform Distribution

The mean of uniform distribution is $E(X) = \dfrac{\alpha+\beta}{2}$.

## Variance of Uniform Distribution

The variance of uniform distribution is $V(X) = \dfrac{(\beta - \alpha)^2}{2}$.

## Example 1

The waiting time at a bus stop is uniformly distributed between 1 and 12 minute.

a. What is the probability density function?

b. What is the probability that the rider waits 8 minutes or less?

c. What is the expected waiting time?

d. What is standard deviation of waiting time?

### Solution

Let $X$ denote the waiting time at a bust stop. The waiting time at a bus stop is uniformly distributed between 1 and 12 minute. That is $X\sim U(1,12)$.

a. The probability density function of $X$ is

\begin{aligned} f(x) & = \frac{1}{12-1},\; 1\leq x \leq 12\\ & = \frac{1}{11},\; 1\leq x \leq 12. \end{aligned}

b. The probability that the rider waits 8 minutes or less is

\begin{aligned} P(X\leq 8) & = \int_1^8 f(x) \; dx\\ & = \frac{1}{11}\int_1^8 \; dx\\ & = \frac{1}{11} \big[x \big]_1^8\\ &= \frac{1}{11}\big[ 8-1\big]\\ &= \frac{7}{11}\\ &= 0.6364. \end{aligned}

c. The expected wait time is $E(X) =\dfrac{\alpha+\beta}{2} =\dfrac{1+12}{2} =6.5$

d. The variance of waiting time is $V(X) =\dfrac{(\beta-\alpha)^2}{12} =\dfrac{(12-1)^2}{12} =10.08$.

## Example 2

Assume the weight of a randomly chosen American passenger car is a uniformly distributed random variable ranging from 2,500 pounds to 4,500 pounds.

a. What is the mean and standard deviation of weight of a randomly chosen vehicle?

b. What is the probability that a vehicle will weigh less than 3,000 pounds?

c. More than 3,900 pounds?

d. Between 3,000 and 3,800 pounds?

### Solution

Let the random variable $X$ denote the weight of randomly chosen American passenger car. It is given that $X\sim U(2500, 4500)$. That is $\alpha=2500$ and $\beta=4500$

The probability density function of $X$ is \begin{aligned} f(x)&=\frac{1}{4500- 2500},\quad2500 \leq x\leq 4500\\ &=\frac{1}{2000},\quad 2500 \leq x\leq 4500 \end{aligned} and the distribution function of $X$ is \begin{aligned} F(x)&=\frac{x-2500}{4500- 2500},\quad 2500 \leq x\leq 4500\\ &=\frac{x-2500}{2000},\quad 2500 \leq x\leq 4500. \end{aligned} a. The mean weight of a randomly chosen vehicle is

\begin{aligned} E(X) &=\dfrac{\alpha+\beta}{2}\\ &=\dfrac{2500+4500}{2} =3500 \end{aligned} The standard deviation of weight of randomly chosen vehicle is
\begin{aligned} sd(X) &= \sqrt{V(X)}\\ &=\sqrt{\dfrac{(\beta-\alpha)^2}{12}}\\ &=\sqrt{\dfrac{(4500-2500)^2}{12}}\\ &=577.35 \end{aligned}

b. The probability that a vehicle will weigh less than $3000$ pounds is

\begin{aligned} P(X< 3000) &=F(3000)\\ &=\dfrac{3000 - 2500}{2000}\\ &=\dfrac{500}{2000}\\ &=0.25 \end{aligned}

c. The probability that a vehicle will weigh more than $3900$ pounds is

\begin{aligned} P(X>3900) &=1-P(X\leq 3900)\\ &=1-F(3900)\\ &=1-\dfrac{3900 - 2500}{2000}\\ &=1-\dfrac{1400}{2000}\\ &=1-0.7\\ &=0.3\\ \end{aligned}

d. The probability that a vehicle will weight between $3000$ and $3800$ pounds is

\begin{aligned} P(3000< X<3800) &= F(3800) - F(3000)\\ &=\frac{3800-2500}{2000}- \frac{3000-2500}{2000}\\ &= \frac{1300}{2000}-\frac{500}{2000}\\ &= 0.65-0.25\\ &= 0.4. \end{aligned}