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{Φ}≔x→\mathrm{CDF}\left(\mathrm{NormalRandomVariable}\left(0,1\right),x\right)$
 ${\mathrm{Φ}}{≔}{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{Φ}\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}}_{15}\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)$
 $\left[\begin{array}{ccccccccccc}{x}& {0.}& {0.01}& {0.02}& {0.03}& {0.04}& {0.05}& {0.06}& {0.07}& {0.08}& {\mathrm{...}}\\ {0.}& {0.500000000000000}& {0.503989356314631}& {0.507978313716902}& {0.511966473414112}& {0.515953436852831}& {0.519938805838372}& {0.523922182654107}& {0.527903170180521}& {0.531881372013987}& {\mathrm{...}}\\ {0.1}& {0.539827837277029}& {0.543795312542317}& {0.547758426020584}& {0.551716786654561}& {0.555670004805907}& {0.559617692370243}& {0.563559462891433}& {0.567494931675039}& {0.571423715900901}& {\mathrm{...}}\\ {0.2}& {0.579259709439103}& {0.583166163482442}& {0.587064422648215}& {0.590954115142006}& {0.594834871697796}& {0.598706325682924}& {0.602568113201760}& {0.606419873198040}& {0.610261247555797}& {\mathrm{...}}\\ {0.3}& {0.617911422188953}& {0.621719521822019}& {0.625515834723320}& {0.629300018940654}& {0.633071736036028}& {0.636830651175619}& {0.640576433217991}& {0.644308754800547}& {0.648027292424163}& {\mathrm{...}}\\ {0.4}& {0.655421741610324}& {0.659097026227677}& {0.662757273151750}& {0.666402179404542}& {0.670031446339406}& {0.673644779712080}& {0.677241889749652}& {0.680822491217444}& {0.684386303483777}& {\mathrm{...}}\\ {0.5}& {0.691462461274013}& {0.694974269102481}& {0.698468212453034}& {0.701944034605124}& {0.705401483784302}& {0.708840313211654}& {0.712260281150973}& {0.715661150953676}& {0.719042691101435}& {\mathrm{...}}\\ {0.6}& {0.725746882249926}& {0.729069096216994}& {0.732371106531017}& {0.735652707884323}& {0.738913700307139}& {0.742153889194135}& {0.745373085328664}& {0.748571104904690}& {0.751747769546430}& {\mathrm{...}}\\ {0.7}& {0.758036347776927}& {0.761147931910013}& {0.764237502220749}& {0.767304907699103}& {0.770350002835209}& {0.773372647623132}& {0.776372707562401}& {0.779350053657351}& {0.782304562414267}& {\mathrm{...}}\\ {0.8}& {0.788144601416603}& {0.791029912128398}& {0.793891946414187}& {0.796730608171932}& {0.799545806739550}& {0.802337456877308}& {0.805105478748192}& {0.807849797896304}& {0.810570345223288}& {\mathrm{...}}\\ {\mathrm{:}}& {\mathrm{:}}& {\mathrm{:}}& {\mathrm{:}}& {\mathrm{:}}& {\mathrm{:}}& {\mathrm{:}}& {\mathrm{:}}& {\mathrm{:}}& {\mathrm{:}}& {"41 × 11 Matrix"}\end{array}\right]$ (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.0..2.0,0.5\right)\right]\right)$
 $\left[\begin{array}{ccccccccccc}{x}& {0.}& {0.01}& {0.02}& {0.03}& {0.04}& {0.05}& {0.06}& {0.07}& {0.08}& {\mathrm{...}}\\ {0.}& {0.500000000000000}& {0.503989356314631}& {0.507978313716902}& {0.511966473414112}& {0.515953436852831}& {0.519938805838372}& {0.523922182654107}& {0.527903170180521}& {0.531881372013987}& {\mathrm{...}}\\ {0.5}& {0.691462461274013}& {0.694974269102481}& {0.698468212453034}& {0.701944034605124}& {0.705401483784302}& {0.708840313211654}& {0.712260281150973}& {0.715661150953676}& {0.719042691101435}& {\mathrm{...}}\\ {1.0}& {0.841344746068543}& {0.843752354978746}& {0.846135769627265}& {0.848494997211656}& {0.850830049669019}& {0.853140943624104}& {0.855427700336090}& {0.857690345644061}& {0.859928909911231}& {\mathrm{...}}\\ {1.5}& {0.933192798731142}& {0.934478287911084}& {0.935744512181064}& {0.936991635536022}& {0.938219823288188}& {0.939429241997941}& {0.940620059405207}& {0.941792444361447}& {0.942946566762246}& {\mathrm{...}}\\ {2.0}& {0.977249868051821}& {0.977784405570569}& {0.978308306232353}& {0.978821730357328}& {0.979324837133930}& {0.979817784594296}& {0.980300729590623}& {0.980773827772483}& {0.981237233565062}& {\mathrm{...}}\\ {}& {}& {}& {}& {}& {}& {}& {}& {}& {}& {"6 × 11 Matrix"}\end{array}\right]$ (6)

To return the Poisson probability distribution table with no headers:

 > $\mathrm{ProbabilityTable}\left('\mathrm{Poisson}',\mathrm{noheaders}\right)$
 $\left[\begin{array}{cccccc}{0.904837419310858}& {0.818730755210460}& {0.740818221928623}& {0.670320057435336}& {0.606530663148124}& {0.548811652302281}\\ {0.995321159857736}& {0.982476905826056}& {0.963063688133138}& {0.938448064954231}& {0.909795993004440}& {0.878098618717414}\\ {0.999845346947915}& {0.998851518808299}& {0.996400506858332}& {0.992073668637082}& {0.985612322203996}& {0.976884713214339}\\ {0.999996153166307}& {0.999943159760493}& {0.999734188851740}& {0.999223748644883}& {0.998248377616914}& {0.996641931203537}\\ {0.999999923321986}& {0.999997741809471}& {0.999984214960698}& {0.999938756673628}& {0.999827884377788}& {0.999605514034163}\\ {0.999999998725101}& {0.999999925091456}& {0.999999216528461}& {0.999995957317555}& {0.999985835062999}& {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.904837419310858}& {0.818730755210460}\\ {1.}& {0.995321159857736}& {0.982476905826056}\\ {2.}& {0.999845346947915}& {0.998851518808299}\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(\left[{5.}{=}\left[\begin{array}{ccccc}{\mathrm{x\p}}& {0.1}& {0.2}& {0.3}& {0.4}\\ {1.}& {0.918540000001650}& {0.737280000005323}& {0.528220000009558}& {0.336959999993173}\\ {2.}& {0.991440000021870}& {0.942080000147982}& {0.836920000416658}& {0.682560000811037}\\ {3.}& {0.999540000000009}& {0.993280000000136}& {0.969220000000624}& {0.912960000001763}\end{array}\right]{,}{4.}{=}\left[\begin{array}{ccccc}{\mathrm{x\p}}& {0.1}& {0.2}& {0.3}& {0.4}\\ {1.}& {0.947700000066772}& {0.819200000230828}& {0.651700000444676}& {0.475199999393309}\\ {2.}& {0.996300000004724}& {0.972800000034726}& {0.916300000106860}& {0.820800000228786}\\ {3.}& {0.999900000000002}& {0.998400000000031}& {0.991900000000158}& {0.974400000000500}\end{array}\right]\right]\right)$ (10)
 > 

Compatibility

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