Uniform Random Variables
The continuous uniform distribution is the probability distribution of random number selection from the continuous interval between a and b. Its density function is defined by the following equation
\[ f(x) = \begin{cases} \frac{1}{b-a} , & \quad\mbox{when} \quad a \le x \le b , 0 , & \quad\mbox{otherwise.} \end{cases} \]
Here is R code to select ten random numbers between one and five:

 [1] 1.784369 1.746213 4.291362 2.145651 3.703616 1.986017 1.449424 1.513132 4.585961
[10] 3.108796

The following functions provide information about the uniform distribution on the interval from min to max: dunif gives the density, punif gives the distribution function qunif gives the quantile function and runif generates random deviates. Iheir usage is demostrated below:

If min or max are not specified, they assume the default values of 0 and 1 respectively. The uniform distribution has density \[ f(x) = \frac{1}{\mbox{max} - \mbox{min}} . \]