UniformRandomVariable - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

Student[Statistics]

 UniformRandomVariable
 uniform (rectangular) random variable

 Calling Sequence UniformRandomVariable(a, b)

Parameters

 a - lower bound parameter b - upper bound parameter

Description

 • The uniform distribution is a continuous probability random variable with probability density function given by:

$f\left(t\right)=\left\{\begin{array}{cc}0& t

 subject to the following conditions:

$a

 • The uniform variate is related to the unit parameter Beta variate by Uniform(0,1) ~ Beta(1,1).
 • The uniform variate is related to the unit parameter Power variate by Uniform(0,1) ~ Power(1,1).

Examples

 > $\mathrm{with}\left({\mathrm{Student}}_{\mathrm{Statistics}}\right):$
 > $X≔\mathrm{UniformRandomVariable}\left(a,b\right):$
 > $\mathrm{PDF}\left(X,u\right)$
 $\left\{\begin{array}{cc}{0}& {u}{<}{a}\\ \frac{{1}}{{b}{-}{a}}& {u}{<}{b}\\ {0}& {\mathrm{otherwise}}\end{array}\right\$ (1)
 > $\mathrm{PDF}\left(X,0.5\right)$
 $\left\{\begin{array}{cc}{0.}& {0.5}{<}{a}\\ \frac{{1}}{{b}{-}{1.}{}{a}}& {0.5}{<}{b}\\ {0.}& {\mathrm{otherwise}}\end{array}\right\$ (2)
 > $\mathrm{Mean}\left(X\right)$
 $\frac{{a}}{{2}}{+}\frac{{b}}{{2}}$ (3)
 > $\mathrm{Variance}\left(X\right)$
 $\frac{{\left({b}{-}{a}\right)}^{{2}}}{{12}}$ (4)
 > $Y≔\mathrm{UniformRandomVariable}\left(-1,1\right):$
 > $\mathrm{PDF}\left(Y,x,\mathrm{output}=\mathrm{plot}\right)$
 > $\mathrm{CDF}\left(Y,x\right)$
 $\left\{\begin{array}{cc}{0}& {x}{<}{-1}\\ \frac{{1}}{{2}}{+}\frac{{x}}{{2}}& {x}{<}{1}\\ {1}& {\mathrm{otherwise}}\end{array}\right\$ (5)
 > $\mathrm{CDF}\left(Y,0.5,\mathrm{output}=\mathrm{plot}\right)$

References

 Evans, Merran; Hastings, Nicholas; and Peacock, Brian. Statistical Distributions. 3rd ed. Hoboken: Wiley, 2000.
 Johnson, Norman L.; Kotz, Samuel; and Balakrishnan, N. Continuous Univariate Distributions. 2nd ed. 2 vols. Hoboken: Wiley, 1995.
 Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.

Compatibility

 • The Student[Statistics][UniformRandomVariable] command was introduced in Maple 18.
 • For more information on Maple 18 changes, see Updates in Maple 18.

 See Also