StatisticsProbabilitycompute the probability of an event Calling SequenceParametersDescriptionComputationOptionsExamplesReferences
<Text-field style="Heading 2" layout="Heading 2" bookmark="usage">Calling Sequence</Text-field> Probability(X, options)
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk0">Parameters</Text-field>
X-algebraic, relation, or set of algebraics and relations, each involving at least one random variable; an eventoptions-(optional) equation of the form numeric=value; specifies options for computing the probability density function of a random variable
<Text-field style="Heading 2" layout="Heading 2" bookmark="info">Description</Text-field> The Probability command computes the probability of the event X. The first parameter, X, is an event consisting of a relation or set of relations. An algebraic expression is interpreted as an equation set to zero. Each relation must involve at least one random variable. All random variables in X are considered independent. A set is interpreted as the intersection of the events of each of its members.
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk1">Computation</Text-field> By default, all computations involving random variables are performed symbolically (see option numeric below). For more information about computation in the Statistics package, see the Statistics[Computation] help page.
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk2">Options</Text-field> The options argument can contain one or more of the options shown below. More information for some options is available in the Statistics[RandomVariables] help page. numeric=truefalse -- By default, the probability density function is computed using exact arithmetic. To compute the probability density function numerically, specify the numeric or numeric = true option.
<Text-field style="Heading 2" layout="Heading 2" bookmark="examples">Examples</Text-field> with(Statistics): Compute the probability of the normal distribution. X := RandomVariable(Normal(0, 1)): Probability(X^2 < 1); LUkkZXJmRzYkSSpwcm90ZWN0ZWRHRiVJKF9zeXNsaWJHNiI2IywkKiQiIiMjIiIiRitGLA== Probability(X^2 < 1, 'numeric'); JCIwJzNQQFwqbyNvISM6 Compute the probability that the product of 3 independent random variables uniformly distributed on between 0 and 1 is less than t. X := [seq(RandomVariable(Uniform(0, 1)), i = 1..4)]: Y := X*X*X: Probability(Y < t); LUkqUElFQ0VXSVNFRzYkSSpwcm90ZWN0ZWRHRiVJKF9zeXNsaWJHNiI2JTckIiIhMUkidEdGJ0YqNyQsKComLUkjbG5HNiRGJUYmNiNGLCIiI0YsIiIiI0Y1RjQqJkYsRjVGMEY1ISIiRixGNTFGLEY1NyRGNTJGNUYs Compute the probability that the distance between two points randomly chosen from a 1x1 square is less than 1. Z := ((X-X)^2+(X-X)^2)^(1/2): Probability(Z < 1/2); LCYjISNIIiMnKiIiIkkjUGlHSSpwcm90ZWN0ZWRHRigjRiYiIiU=
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk3">References</Text-field> Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.
See AlsoStatisticsStatistics[Computation]Statistics[CumulativeDistributionFunction]Statistics[Distributions]Statistics[ProbabilityDensityFunction]Statistics[RandomVariables]