Student[Statistics] - Maple Programming Help

Home : Support : Online Help : Education : Student Packages : Statistics : Student/Statistics/ProbabilityTable

Student[Statistics]

 ProbabilityTable
 return the probability distribution table for a given distribution

 Calling Sequence ProbabilityTable( distribution ) ProbabilityTable( distribution, options ) ProbabilityTable( Normal, x )

Parameters

 distribution - name; name of the distribution chosen from Normal, Binomial, or Poisson x - (optional) numeric; single value lookup from the standard normal distribution table options - one or more keyword options as described below

Options

 • x : list; list of values for the rows
 • parameter1 : list; list of parameter values for the columns
 • parameter2 : list; list of parameter values for the number of tables to return
 • noheaders : truefalse; specifies if column and row header information is included. By default this is set to false.
 • output : identical( matrix, embed ); controls the output of the resulting matrix. If output = embed, then a datatable component containing the matrix of values is returned. By default, output is set to matrix, and a matrix is returned.

Description

A probability distribution table returns values for the probability that a value is less than or equal to a value x. This is analogous to computing the CDF for a given distribution at the point x.

For example, the table for the cumulative standard normal distribution gives

$\mathrm{\Phi }\left(x\right)=\frac{{\int }_{-\mathrm{\infty }}^{x}{ⅇ}^{-\frac{{t}^{2}}{2}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆt}{\sqrt{2\mathrm{\pi }}}$

For $x<0$, values of $\mathrm{\Phi }\left(x\right)$ can be obtained from $\mathrm{\Phi }\left(-x\right)=1-\mathrm{\Phi }\left(x\right)$.

 • The ProbabilityTable command returns the probability distribution table as a matrix. If embed = true, then a datatable component containing the matrix of values is returned.

Examples

 > $\mathrm{with}\left(\mathrm{Student}:-\mathrm{Statistics}\right):$

The values of the cumulative standard normal distribution table can be found directly from the CDF of the standard normal distribution:

 > $\mathrm{\Phi }≔x↦\mathrm{CDF}\left(\mathrm{NormalRandomVariable}\left(0,1\right),x\right)$
 ${\mathrm{\Phi }}{≔}{x}{↦}{\mathrm{Student}}{:-}{\mathrm{Statistics}}{:-}{\mathrm{CDF}}{}\left({\mathrm{Student}}{:-}{\mathrm{Statistics}}{:-}{\mathrm{NormalRandomVariable}}{}\left({0}{,}{1}\right){,}{x}\right)$ (1)
 > $\mathrm{evalf}\left(\mathrm{\Phi }\left(1.04\right)\right)$
 ${0.850830049669019}$ (2)

The ProbabilityTable command can return the Standard Normal distribution table, which assumes that the parameters of the Normal distribution, the mean and standard deviation, are equal to $\mathrm{\mu }=0$ and $\mathrm{\sigma }=1$ respectively. In this case, this table is dependent on only one parameter, x. It is possible to query for singular values of x by entering a numeric value as the second argument of the ProbabilityTable command. Note that all other probability distributions require that the x parameter is specified as a keyword option, namely x = value.

 > $\mathrm{ProbabilityTable}\left('\mathrm{Normal}',1.04\right)$
 ${0.850830049669019}$ (3)

The ProbabilityTable command numerically computes the values for the standard normal distribution table using the above CDF. In contrast to traditional printed tables of values in text books, this can return the results with any level of precision, and also makes it possible to return more accurate results in cases where one would otherwise need to interpolate values for entries that are not in the table.

 > $\mathrm{evalf}\left[15\right]\left(\mathrm{ProbabilityTable}\left('\mathrm{Normal}',-1.04\right)\right)$
 ${0.149169950330981}$ (4)

To return the cumulative standard normal distribution table as a matrix:

 > $\mathrm{ProbabilityTable}\left('\mathrm{Normal}'\right)$
 ${{\mathrm{_rtable}}}_{{18446884628593792174}}$ (5)

To return a sub-matrix of values from the cumulative standard normal distribution table:

 > $\mathrm{ProbabilityTable}\left('\mathrm{Normal}',x=\left[\mathrm{seq}\left(0...2.0,0.5\right)\right]\right)$
 ${{\mathrm{_rtable}}}_{{18446884628593780006}}$ (6)

To return the Poisson probability distribution table with no headers:

 > $\mathrm{ProbabilityTable}\left('\mathrm{Poisson}',\mathrm{noheaders}\right)$
 $\left[\begin{array}{cccccc}0.9048374193108583& 0.8187307552104597& 0.740818221928623& 0.6703200574353364& 0.6065306631481238& 0.5488116523022815\\ 0.9953211598577356& 0.9824769058260561& 0.9630636881331385& 0.9384480649542314& 0.9097959930044404& 0.8780986187174141\\ 0.9998453469479154& 0.9988515188082995& 0.9964005068583325& 0.9920736686370825& 0.9856123222039963& 0.9768847132143389\\ 0.9999961531663065& 0.9999431597604932& 0.9997341888517398& 0.9992237486448827& 0.9982483776169139& 0.9966419312035367\\ 0.9999999233219856& 0.9999977418094707& 0.9999842149606979& 0.9999387566736275& 0.9998278843777885& 0.9996055140341626\\ 0.9999999987251014& 0.9999999250914556& 0.9999992165284609& 0.9999959573175546& 0.9999858350629991& 0.999961143924463\end{array}\right]$ (7)

The output option can be used to create a datatable for any of the probability distribution tables:

 > $\mathrm{ProbabilityTable}\left('\mathrm{Poisson}',\mathrm{output}=\mathrm{embed}\right)$
 ${\mathrm{DT}}$ (8)

The probability distribution table for the Poisson distribution depends on one parameter, lambda, as well as a list of values for x. It is also possible to return a sub-matrix for a given distribution by including lists for the value ranges and parameters:

 > $\mathrm{ProbabilityTable}\left('\mathrm{Poisson}',x=\left[0,1,2\right],\mathrm{parameter1}=\left[0.1,0.2\right]\right)$
 $\left[\begin{array}{ccc}\mathrm{x\lambda}& 0.1& 0.2\\ 0.& 0.9048374193108583& 0.8187307552104597\\ 1.& 0.9953211598577356& 0.9824769058260561\\ 2.& 0.9998453469479154& 0.9988515188082995\end{array}\right]$ (9)

The binomial distribution is dependent on two parameters, n and p, and can return multiple tables:

 > $\mathrm{ProbabilityTable}\left('\mathrm{Binomial}',x=\left[\mathrm{seq}\left(1..3\right)\right],\mathrm{parameter1}=\left[\mathrm{seq}\left(0.1..0.4,0.1\right)\right],\mathrm{parameter2}=\left[4,5\right]\right)$
 ${\mathrm{table}}{}\left({\mathrm{%id}}{=}{18446884628553676702}\right)$ (10)
 > 

Compatibility

 • The Student[Statistics][ProbabilityTable] command was introduced in Maple 2015.