Difference between revisions of "Parametric continuous distributions"

(Created page with "Category:Analytica User Guide <breadcrumbs>Analytica User Guide > Probability Distributions > {{PAGENAME}}</breadcrumbs> __TOC__ ==See Also== <footer>Custom discrete...")
 
Line 4: Line 4:
 
__TOC__
 
__TOC__
  
 +
<tip title="Tip>
 +
To produce the example graphs of distributions below, we used a sample size of 1000, equal
 +
sample probability steps, samples per PDF of 10, and we set the graph style to line. Even if you
 +
use the same options, your graphs can look slightly different due to random variation in the Monte Carlo sampling.
 +
</Tip>
  
 +
==Uniform(''min, max'')==
 +
Creates a uniform distribution between values '''min''' and '''max'''. If omitted, they default to 0 and 1. If you specify optional parameter Integer: True, it returns a discrete distribution consisting of only the integers between '''min''' and '''max''', each with equal probability. See [[Probability density and mass graphs#Uniform(min, max, Integer: True)|Uniform(min, max, Integer: True)]].
  
 +
'''When to use:''' If you know nothing about the uncertain quantity other than its bounds, a uniform distribution between the bounds is appealing. However, situations in which this is truly appropriate are rare. Usually, you know that one end or the middle of the range is more likely than the rest — that is, the quantity has a mode. In such cases, a beta or triangular distribution is a better choice.
 +
 +
'''Library:''' Distribution
 +
 +
'''Example:'''
 +
 +
<code>Uniform(5, 10) &rarr;</code>
 +
 +
[[File:Chapter15_13.png]]
 +
 +
==Triangular(min, mode, max)==
 +
Creates a triangular distribution, with minimum '''min''', most likely value '''mode''', and maximum '''max'''. '''min''' must not be greater than '''mode''', and mode must not be greater than '''max'''.
 +
 +
'''When to use:''' Use the triangular distribution when you have the bounds and the mode, but have little other information
 +
about the uncertain quantity.
 +
 +
'''Library:''' Distribution
 +
 +
'''Example:'''
 +
 +
<code>Triangular(2, 7, 10) &rarr;</code>
 +
 +
[[File:Chapter15_14.png]]
 +
 +
==Normal('''mean, stddev'')==
 +
Creates a normal or Gaussian probability distribution with '''mean''' and standard deviation '''stddev'''. The standard deviation must be 0 or greater. The range '''[mean-stddev, mean+stddev]''' encloses about 68% of the probability.
 +
 +
'''When to use:''' Use a normal distribution if the uncertain quantity is unimodal and symmetric and the upper and lower bounds are unknown, possibly very large or very small (unbounded). This distribution is particularly appropriate if you believe that the uncertain quantity is the sum or average of a large number of independent, random quantities.
 +
 +
'''Library:''' Distribution
 +
 +
'''Example:'''
 +
 +
<code>Normal(30, 5) &rarr;</code>
 +
 +
[[File:Chapter15_15.png]]
 +
 +
==Lognormal(''median, gsdev, mean, stddev'')==
 +
Creates a lognormal distribution. You can specify its median and geometric standard deviation '''gsdev''', or its mean and standard deviation '''stddev''', or any two of these four parameters. The geometric standard deviation, '''gsdev''', must be 1 or greater. It is sometimes also known as the '''''uncertainty factor''''' or '''''error factor'''''. The range ['''median/gsdev, median''' x '''gsdev'''] encloses about 68% of the probability — just like the range ['''mean''' - '''stddev''', '''mean''' + '''stddev'''] for a normal distribution with standard deviation stddev. median and gsdev must be positive.
 +
 +
If '''x''' is lognormal '''Ln(x)''' has a normal distribution with mean '''Ln(median)''' and standard deviation '''Ln(gsdev)'''.
 +
 +
'''When to use:''' Use the lognormal distribution if you have a sharp lower bound of zero but no sharp upper bound, a single mode, and a positive skew. The gamma distribution is also an option in this case. The lognormal is particularly appropriate if you believe that the uncertain quantity is the product (or ratio) of a large number of independent random variables. The multiplicative version of the central limit theorem says that the product or ratio of many independent variables tends to lognormal — just as their sum tends to a normal distribution.
 +
 +
'''Library:''' Distribution
 +
 +
'''Examples:'''
 +
<code> Lognormal(5, 2) &rarr;</code>
 +
 +
<code>Lognormal(mean: 6.358, Stddev: 5) &rarr;</code>
 +
 +
[[File:Chapter15_16.png]]
 +
 +
==Beta(x, y, ''min, max'')
 +
Creates a beta distribution of numbers between 0 and 1 if you omit optional parameters '''min''' and '''max'''. '''x''' and '''y''' must be positive. If you specify '''min''' and/or '''max''', it shifts and expands the beta distribution to so that they form the lower and upper bounds. The mean is:
 +
 +
<center><math>
 +
\frac{x}{x + y} \times (max - min) + min
 +
</math></center>
 +
 +
'''When to use:''' Use a beta distribution to represent uncertainty about a continuous quantity bounded by 0 and 1 (0% or 100%) with a single mode. It is particularly useful for modeling an opinion about the fraction (percentage) of a population that has some characteristic. For example, suppose you are trying to estimate the long run frequency of heads, h, for a bent coin about which you know nothing. You could represent your prior opinion about h as a uniform distribution:
 +
 +
Uniform(0, 1)
 +
 +
Or equivalently:
 +
 +
Beta(1, 1)
 +
 +
If you observe r heads in n tosses of the coin, your new (posterior) opinion about h, should be:
 +
 +
Beta(1 + r, 1 + n - r)
 +
 +
If the uncertain quantity has lower and upper bounds other than 0 and 1, include the lower and upper bounds parameters to obtain a '''''transformed beta''''' distribution. The transformed beta is a very flexible distribution for representing a wide variety of bounded quantities.
 +
 +
'''Library:''' Distribution
 +
 +
'''Examples:'''
 +
 +
<code>Beta(5, 10) &rarr;</code>
 +
 +
[[File:Chapter15_17.png]]
 +
 +
<code>Beta(5, 10, 2, 4) &rarr;</code>
 +
 +
[[File:Chapter15_18.png]]
 +
 +
==Exponential(r)==
 +
Describes the distribution of times between successive independent events in a Poisson process with an average rate of '''r''' events per unit time. The rate '''r''' is the reciprocal of the mean of the Poisson distribution — the average number of events per unit time. Its standard deviation is also 1/'''r'''.
 +
 +
A model with exponentially distributed times between events is said to be ''Markov'', implying that knowledge about when the next event occurs does not depend on the system’s history or how much time has elapsed since the previous event. More general distributions such as the gamma or Weibull do not exhibit this property.
 +
 +
==Gamma(a, ''b'')==
 +
Creates a gamma distribution with shape parameter '''a''' and scale parameter '''b'''. The scale parameter, '''b''', is optional and defaults to '''b'''=1. The gamma distribution is bounded below by zero (all sample points are positive) and is unbounded from above. It has a theoretical mean of <math>a \cdot b</math> and a theoretical variance of <math>a \cdot b^2</math> . When ''a > b'' , the distribution is unimodal with the mode at <math>(a - 1) \cdot b</math> . An exponential distribution results when ''a = 1'' . As <math>a \to \infty </math> , the gamma distribution approaches a normal distribution in shape.
 +
 +
The gamma distribution encodes the time required for '''a''' events to occur in a Poisson process with mean arrival time of '''b'''.
 +
 +
<tip title="Tip"
 +
Some textbooks use Rate=1/'''b''', instead of '''b''', as the scale parameter.
 +
</Tip>
 +
 +
'''When to use:''' Use the gamma distribution with '''a'''>1 if you have a sharp lower bound of zero but no sharp upperbound, a single mode, and a positive skew. The Lognormal distribution is also an option in this case. '''Gamma()''' is especially appropriate when encoding arrival times for sets of events. A gamma distribution with a large value for a is also useful when you wish to use a bell-shaped curve for a positive-only quantity.
 +
 +
'''Library:''' Distribution
 +
 +
'''Examples:''' Gamma distributions with ''mean = 1''
 +
 +
[[File:Chapter15_19.png]]
 +
 +
 +
[[File:Chapter15_20.png]]
 +
 +
==Logistic(m, s)==
 +
The logistic distribution describes a distribution with a cumulative density given by:
 +
 +
<center><math>
 +
F(x) = \frac{1}{ 1 + e^{\frac{-(x -m)}{s}}}
 +
</math></center>
  
 
==See Also==
 
==See Also==
 +
* [[Uniform]]()
 +
* [[Triangular]]()
 +
* [[Normal]]()
 +
* [[Lognormal]]()
 +
* [[Beta]]()
 +
* [[Exponential]]()
 +
* [[Gamma]]()
 +
* [[Gamma]]()
 +
* [[StudentT]]()
 +
* [[Weibull]]()
 +
* [[ChiSquared]]()
 +
 
<footer>Custom discrete probabilities / {{PAGENAME}} / Custom continuous distributions</footer>
 
<footer>Custom discrete probabilities / {{PAGENAME}} / Custom continuous distributions</footer>

Revision as of 04:32, 16 December 2015

Tip

To produce the example graphs of distributions below, we used a sample size of 1000, equal sample probability steps, samples per PDF of 10, and we set the graph style to line. Even if you use the same options, your graphs can look slightly different due to random variation in the Monte Carlo sampling.

Uniform(min, max)

Creates a uniform distribution between values min and max. If omitted, they default to 0 and 1. If you specify optional parameter Integer: True, it returns a discrete distribution consisting of only the integers between min and max, each with equal probability. See Uniform(min, max, Integer: True).

When to use: If you know nothing about the uncertain quantity other than its bounds, a uniform distribution between the bounds is appealing. However, situations in which this is truly appropriate are rare. Usually, you know that one end or the middle of the range is more likely than the rest — that is, the quantity has a mode. In such cases, a beta or triangular distribution is a better choice.

Library: Distribution

Example:

Uniform(5, 10) →

Chapter15 13.png

Triangular(min, mode, max)

Creates a triangular distribution, with minimum min, most likely value mode, and maximum max. min must not be greater than mode, and mode must not be greater than max.

When to use: Use the triangular distribution when you have the bounds and the mode, but have little other information about the uncertain quantity.

Library: Distribution

Example:

Triangular(2, 7, 10) →

Chapter15 14.png

Normal('mean, stddev)

Creates a normal or Gaussian probability distribution with mean and standard deviation stddev. The standard deviation must be 0 or greater. The range [mean-stddev, mean+stddev] encloses about 68% of the probability.

When to use: Use a normal distribution if the uncertain quantity is unimodal and symmetric and the upper and lower bounds are unknown, possibly very large or very small (unbounded). This distribution is particularly appropriate if you believe that the uncertain quantity is the sum or average of a large number of independent, random quantities.

Library: Distribution

Example:

Normal(30, 5) →

Chapter15 15.png

Lognormal(median, gsdev, mean, stddev)

Creates a lognormal distribution. You can specify its median and geometric standard deviation gsdev, or its mean and standard deviation stddev, or any two of these four parameters. The geometric standard deviation, gsdev, must be 1 or greater. It is sometimes also known as the uncertainty factor or error factor. The range [median/gsdev, median x gsdev] encloses about 68% of the probability — just like the range [mean - stddev, mean + stddev] for a normal distribution with standard deviation stddev. median and gsdev must be positive.

If x is lognormal Ln(x) has a normal distribution with mean Ln(median) and standard deviation Ln(gsdev).

When to use: Use the lognormal distribution if you have a sharp lower bound of zero but no sharp upper bound, a single mode, and a positive skew. The gamma distribution is also an option in this case. The lognormal is particularly appropriate if you believe that the uncertain quantity is the product (or ratio) of a large number of independent random variables. The multiplicative version of the central limit theorem says that the product or ratio of many independent variables tends to lognormal — just as their sum tends to a normal distribution.

Library: Distribution

Examples: Lognormal(5, 2) →

Lognormal(mean: 6.358, Stddev: 5) →

Chapter15 16.png

==Beta(x, y, min, max) Creates a beta distribution of numbers between 0 and 1 if you omit optional parameters min and max. x and y must be positive. If you specify min and/or max, it shifts and expands the beta distribution to so that they form the lower and upper bounds. The mean is:

[math]\displaystyle{ \frac{x}{x + y} \times (max - min) + min }[/math]

When to use: Use a beta distribution to represent uncertainty about a continuous quantity bounded by 0 and 1 (0% or 100%) with a single mode. It is particularly useful for modeling an opinion about the fraction (percentage) of a population that has some characteristic. For example, suppose you are trying to estimate the long run frequency of heads, h, for a bent coin about which you know nothing. You could represent your prior opinion about h as a uniform distribution:

Uniform(0, 1)

Or equivalently:

Beta(1, 1)

If you observe r heads in n tosses of the coin, your new (posterior) opinion about h, should be:

Beta(1 + r, 1 + n - r)

If the uncertain quantity has lower and upper bounds other than 0 and 1, include the lower and upper bounds parameters to obtain a transformed beta distribution. The transformed beta is a very flexible distribution for representing a wide variety of bounded quantities.

Library: Distribution

Examples:

Beta(5, 10) →

Chapter15 17.png

Beta(5, 10, 2, 4) →

Chapter15 18.png

Exponential(r)

Describes the distribution of times between successive independent events in a Poisson process with an average rate of r events per unit time. The rate r is the reciprocal of the mean of the Poisson distribution — the average number of events per unit time. Its standard deviation is also 1/r.

A model with exponentially distributed times between events is said to be Markov, implying that knowledge about when the next event occurs does not depend on the system’s history or how much time has elapsed since the previous event. More general distributions such as the gamma or Weibull do not exhibit this property.

Gamma(a, b)

Creates a gamma distribution with shape parameter a and scale parameter b. The scale parameter, b, is optional and defaults to b=1. The gamma distribution is bounded below by zero (all sample points are positive) and is unbounded from above. It has a theoretical mean of [math]\displaystyle{ a \cdot b }[/math] and a theoretical variance of [math]\displaystyle{ a \cdot b^2 }[/math] . When a > b , the distribution is unimodal with the mode at [math]\displaystyle{ (a - 1) \cdot b }[/math] . An exponential distribution results when a = 1 . As [math]\displaystyle{ a \to \infty }[/math] , the gamma distribution approaches a normal distribution in shape.

The gamma distribution encodes the time required for a events to occur in a Poisson process with mean arrival time of b.

<tip title="Tip" Some textbooks use Rate=1/b, instead of b, as the scale parameter. </Tip>

When to use: Use the gamma distribution with a>1 if you have a sharp lower bound of zero but no sharp upperbound, a single mode, and a positive skew. The Lognormal distribution is also an option in this case. Gamma() is especially appropriate when encoding arrival times for sets of events. A gamma distribution with a large value for a is also useful when you wish to use a bell-shaped curve for a positive-only quantity.

Library: Distribution

Examples: Gamma distributions with mean = 1

Chapter15 19.png


Chapter15 20.png

Logistic(m, s)

The logistic distribution describes a distribution with a cumulative density given by:

[math]\displaystyle{ F(x) = \frac{1}{ 1 + e^{\frac{-(x -m)}{s}}} }[/math]

See Also

Comments


You are not allowed to post comments.