Probability Distributions
The Statistics package contains 37 probability distributions as well as providing functionality for creating new distributions and manipulating random variables.

1 Continuous Probability Distributions


The Statistics package includes 28 continuous probability distributions along with commands for manipulating and creating continuous random variables. Continuous probability distributions are defined by a continuous probability density function along a section of the real line.
>


Consider a chi square random variable. The chi square random variable takes a single parameter which represents the number of degrees of freedom. When the random variable is created using the RandomVariable constructor, it generates a new name for the random variable data structure and returns it.
>


 (1.1) 
The probability density function, as well as all other distribution commands, accepts either a random variable or probability distribution as its first parameter. The 'mainbranch' option can be used to return only the main branch of the distribution.
>


 (1.2) 
>


 (1.3) 
>


 (1.4) 
Combinations of probability distributions can be generated by performing operations on a set of random variables. For example, consider the product of a uniform random variable and a normal (gaussian) random variable.
>


 (1.5) 
>


 (1.6) 
>


 (1.7) 
>


 (1.8) 
>


 (1.9) 


2 Discrete Probability Distributions


The Statistics package includes 9 discrete probability distributions and commands for manipulating and creating discrete random variables.
>


Consider a binomial random variable. Unlike continuous random variables, discrete random variables are defined by their probability function rather than their probability density function.
>


 (2.1) 
>


 (2.2) 
>


 (2.3) 
>


 (2.4) 
>


 (2.5) 
>


 (2.6) 
The Statistics package also allows for both numeric and symbolic manipulation of random variables and distributions. Consider the negative binomial distribution with symbolic parameters.
>


 (2.7) 
>


 (2.8) 
>


 (2.9) 
>


 (2.10) 
>


 (2.11) 
>


 (2.12) 
Further, the Statistics package supports the probability table. This distribution is used to associate probabilities with the integers 1..n, for any n. Consider a case of n = 5.
>


>


 (2.13) 
>


 (2.14) 
The Statistics package also supports the empirical distribution, which is effectively a probability distribution built around a data sample. The probability of each element is equal to its frequency in the data sample.
>


>


 (2.15) 
>


 (2.16) 
>


 (2.17) 
>


 (2.18) 


3 Random Sample Generation


All probability distributions provide optimized hardwarelevel random number generators capable of generating very large pseudorandom samples quickly.
>


Generate a sample from a Binomial distribution.
>


 (3.1) 
Generate a sample from a probability table distribution.
 (3.2) 
Sample a noncentral chi square distribution and plot the histogram of the output against the probability density function.


4 Custom Random Variables


The Statistics package includes the Distribution constructor, which can be used to create custom random variables.
>


A distribution that is occasionally used in statistics is the halfnormal distribution, named so because it is a normal distribution that has been cropped at all negative values.
>


 (4.1) 
>


 (4.2) 
Create a distribution module using the half normal PDF.
>


 (4.3) 
>


 (4.4) 
>


Compute the characteristics of this distribution.
>


 (4.5) 
>


 (4.6) 
>


 (4.7) 

Return to Index for Example Worksheets

Download Help Document
Was this information helpful?