# Difference between revisions of "Probabilistic calculation"

m |
m (→See Also: updating formatting) |
||

Line 95: | Line 95: | ||

== See Also == | == See Also == | ||

+ | *[[Uncertainty view of a result]] | ||

+ | *[[Evaluation Modes]] | ||

+ | *[[Mid]] | ||

− | |||

− | |||

− | |||

− | |||

− | |||

<footer>Including a distribution in a definition/ {{PAGENAME}} / Uncertainty Setup dialog </footer> | <footer>Including a distribution in a definition/ {{PAGENAME}} / Uncertainty Setup dialog </footer> |

## Revision as of 01:17, 29 December 2015

Analytica can calculate the value of each variable deterministically -- generating its Mid value -- or probabilistically, generating a probability distribution -- its Prob value -- if the definition of the variable or any of its predecessors contains a probability distribution. It does probabilistic calculation as a random sample of values from the actual probability distribution for each uncertain quantity. Each probabilistic value is represented internally as a sample, an array of the sample values indexed by Run. **Run** is a system index variable that identifies each sample iteration by an integer from 1 to Samplesize.

You can display a probabilistic value using a variety of uncertainty view options — including mean, statistics, probability bands, probability density (or mass function), cumulative distribution function, and Sample view. All these views are derived or estimated from the underlying sample array, which you can see directly in the Sample view. For example, with a Samplesize = 6, here is the probabilistic value of A:

**Example**

`A := Normal(10, 2) →`

Iteration (Run) ▶ | |||||
---|---|---|---|---|---|

1 | 2 | 3 | 4 | 5 | 6 |

10.74 | 13.2 | 9.092 | 11.44 | 9.519 | 13.03 |

*.*

For each sample run, a random value is generated from each probability distribution in the model. Output variables of uncertain variables are calculated by calculating a value for each value of *Run*.

**Example**

`B := Normal(5, 1) →`

Iteration (Run) ▶ | |||||
---|---|---|---|---|---|

1 | 2 | 3 | 4 | 5 | 6 |

5.09 | 4.94 | 4.65 | 6.60 | 5.24 | 6.96 |

`C := A + B →`

Iteration (Run) ▶ | |||||
---|---|---|---|---|---|

1 | 2 | 3 | 4 | 5 | 6 |

15.83 | 18.13 | 13.75 | 18.04 | 14.76 | 19.99 |

Notice that each sample value of **C** is equal to the sum of the corresponding values of **A** and **B**.
To control the probabilistic simulation, as well as views of probabilistic results, use the Uncertainty Setup dialog.

**array-reducing function**to a probability distribution across Run, Analytica returns the distribution’s mid value.

**Example:**

`X := Beta(2, 3)`

`Mid(X) → 0.3857 and Max(X, Run) → 0.3857`

To evaluate the input parameters probabilistically and reduce across Run, use Sample().

**Example:**

`Max(Sample(X), Run) → 0.8892`

Enable comment auto-refresher