Statistics[Distributions] - Maple Programming Help

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

Statistics[Distributions]

 ProbabilityTable
 probability table

 Calling Sequence ProbabilityTable(plist)

Parameters

 plist - list of real constants in the range 0..1, summing to 1; probabilities

Description

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

$f\left(t\right)=\mathrm{piecewise}\left(t<1,0,t\le '\mathrm{nops}\left(\mathrm{plist}\right)',{\mathrm{plist}}_{\mathrm{floor}\left(t\right)},0\right)$

 subject to the following conditions, where $n$ is defined as the number of indices in plist:

${\sum }_{t=1}^{n}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}{\mathrm{plist}}_{t}=1$

$0\le {\mathrm{plist}}_{k},{\mathrm{plist}}_{k}\le 1,k=1..n$

 • The probability table distribution is defined by the sequence of integer variates 1..$n$. This distribution wrapper allows bounded discrete distributions to be easily represented in tabular form. If you would like to use a distribution that has values other than positive integers, consider using the EmpiricalDistribution, potentially with the probabilities option.
 • Note that the ProbabilityTable command is inert and should be used in combination with the RandomVariable command.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$
 > $P≔\left[\frac{1}{2},\frac{1}{4},\frac{1}{8},\frac{1}{16},\frac{1}{16}\right]$
 ${P}{≔}\left[\frac{{1}}{{2}}{,}\frac{{1}}{{4}}{,}\frac{{1}}{{8}}{,}\frac{{1}}{{16}}{,}\frac{{1}}{{16}}\right]$ (1)
 > $X≔\mathrm{RandomVariable}\left(\mathrm{ProbabilityTable}\left(P\right)\right):$
 > $\mathrm{ProbabilityFunction}\left(X,1\right)$
 $\frac{{1}}{{2}}$ (2)
 > $\mathrm{CDF}\left(X,2\right)$
 $\frac{{3}}{{4}}$ (3)
 > $\mathrm{Sample}\left(X,1000\right)$
 $\left[\begin{array}{c}{\mathrm{1 .. 1000}}{\mathrm{Vector}}{[}{\mathrm{row}}{]}\\ {\mathrm{Data Type:}}{\mathrm{float}}{[}{8}{]}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{Fortran_order}}\end{array}\right]$ (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.