Statistics[Distributions] - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Statistics and Data Analysis : Statistics Package : Distributions : Statistics/Distributions/DiscreteUniform

Statistics[Distributions]

 DiscreteUniform
 discrete uniform distribution

 Calling Sequence DiscreteUniform(a, b) DiscreteUniformDistribution(a, b)

Parameters

 a - lower bound parameter b - upper bound parameter

Description

 • The discrete uniform distribution is a discrete probability distribution with probability function given by:

$f\left(t\right)=\mathrm{piecewise}\left(t

 subject to the following conditions:

$a

 • Note that the DiscreteUniform command is inert and should be used in combination with the RandomVariable command.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$
 > $X≔\mathrm{RandomVariable}\left(\mathrm{DiscreteUniform}\left(a,b\right)\right):$
 > $\mathrm{ProbabilityFunction}\left(X,u\right)$
 ${{}\begin{array}{cc}{0}& {u}{<}{a}\\ {-}\frac{{1}}{{-}{b}{+}{a}{-}{1}}& {u}{\le }{b}\\ {0}& {\mathrm{otherwise}}\end{array}$ (1)
 > $\mathrm{ProbabilityFunction}\left(X,4\right)$
 ${{}\begin{array}{cc}{0}& {4}{<}{a}\\ {-}\frac{{1}}{{-}{b}{+}{a}{-}{1}}& {4}{\le }{b}\\ {0}& {\mathrm{otherwise}}\end{array}$ (2)
 > $\mathrm{Mean}\left(X\right)$
 $\frac{{1}}{{2}}{}{a}{+}\frac{{1}}{{2}}{}{b}$ (3)
 > $\mathrm{Variance}\left(X\right)$
 $\frac{{1}}{{12}}{}{{a}}^{{2}}{+}\frac{{1}}{{12}}{}{{b}}^{{2}}{+}\frac{{1}}{{6}}{}{b}{-}\frac{{1}}{{6}}{}{a}{}{b}{-}\frac{{1}}{{6}}{}{a}$ (4)

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.

 See Also