Difference between revisions of "Probabilistic calculation"
Line 5: | Line 5: | ||
Analytica performs probabilistic evaluation of probability distributions through simulation — by computing a random sample of values from the actual probability distribution for each uncertain quantity. The result of evaluating a distribution is represented internally as an array of the sample values, indexed by Run. Run is an index variable that identifies each sample iteration by an integer from 1 to '''''Samplesize'''''. | Analytica performs probabilistic evaluation of probability distributions through simulation — by computing a random sample of values from the actual probability distribution for each uncertain quantity. The result of evaluating a distribution is represented internally as an array of the sample values, indexed by Run. Run is an 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''''' | + | You can display a probabilistic value using a variety of '''''[[uncertainty view options]]''''' — the mean, statistics, probability bands, probability density (or mass function), and cumulative distribution function. All these views are derived or estimated from the underlying sample array, which you can inspect using the last uncertainty view, Sample. |
'''Example''' | '''Example''' | ||
− | + | <code>A:= Normal(10, 2) →</code> | |
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | ! | + | !! colspan="6" style="text-align: left;" | Iteration (Run) ▶ |
+ | |- | ||
!1 | !1 | ||
!2 | !2 | ||
Line 21: | Line 21: | ||
!6 | !6 | ||
|- | |- | ||
− | |||
|10.74 | |10.74 | ||
|13.2 | |13.2 | ||
Line 30: | Line 29: | ||
|} | |} | ||
− | '''Tip: '''''The values in a sample are generated at random from the distribution; if you try this example and display the result as a table, you might see values different from those shown here. To reproduce this example, reset the random number seed to 99 and use the default sampling method and random number method (see | + | '''Tip: '''''The values in a sample are generated at random from the distribution; if you try this example and display the result as a table, you might see values different from those shown here. To reproduce this example, reset the random number seed to 99 and use the default sampling method and random number method (see “[[Uncertainty Setup dialog]]”''. |
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''. | 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''. | ||
Line 36: | Line 35: | ||
'''Example''' | '''Example''' | ||
− | + | <code>B:= Normal(5, 1) →</code> | |
− | |||
{| class="wikitable" | {| class="wikitable" | ||
− | ! | + | !! colspan="6" style="text-align: left;" | Iteration (Run) ▶ |
+ | |- | ||
!1 | !1 | ||
!2 | !2 | ||
Line 48: | Line 47: | ||
!6 | !6 | ||
|- | |- | ||
− | |||
|5.09 | |5.09 | ||
|4.94 | |4.94 | ||
Line 57: | Line 55: | ||
|} | |} | ||
− | + | <code>C:= A + B →</code> | |
− | |||
− | + | {| class="wikitable" | |
− | + | !! colspan="6" style="text-align: left;" | Iteration (Run) ▶ | |
− | + | |- | |
!1 | !1 | ||
!2 | !2 | ||
Line 70: | Line 67: | ||
!6 | !6 | ||
|- | |- | ||
− | |||
|15.83 | |15.83 | ||
|18.13 | |18.13 | ||
Line 79: | Line 75: | ||
|} | |} | ||
− | Notice that each sample value of C is equal to the sum of the corresponding values of A and B. | + | 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 | + | To control the probabilistic simulation, as well as views of probabilistic results, use the [[Uncertainty Setup dialog]]. |
− | '''Tip: '''''If you try to apply an '''array-reducing function''' | + | '''Tip: '''''If you try to apply an '''[[array-reducing function]]''' to a probability distribution across Run, |
Analytica returns the distribution’s mid value.'' | Analytica returns the distribution’s mid value.'' | ||
'''Example:''' | '''Example:''' | ||
− | + | <code>X:= Beta(2, 3)</code> | |
− | + | <code>Mid(X) → 0.3857 and Max(X, Run) → 0.3857</code> | |
− | To evaluate the input parameters probabilistically and reduce across Run, use Sample( | + | To evaluate the input parameters probabilistically and reduce across Run, use [[Sample]](). |
'''Example:''' | '''Example:''' | ||
− | + | <code>Max(Sample(X), Run) → 0.8892</code> | |
== See Also == | == See Also == | ||
<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 05:59, 7 December 2015
Analytica performs probabilistic evaluation of probability distributions through simulation — by computing a random sample of values from the actual probability distribution for each uncertain quantity. The result of evaluating a distribution is represented internally as an array of the sample values, indexed by Run. Run is an 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 — the mean, statistics, probability bands, probability density (or mass function), and cumulative distribution function. All these views are derived or estimated from the underlying sample array, which you can inspect using the last uncertainty view, Sample.
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 |
Tip: The values in a sample are generated at random from the distribution; if you try this example and display the result as a table, you might see values different from those shown here. To reproduce this example, reset the random number seed to 99 and use the default sampling method and random number method (see “Uncertainty Setup dialog”.
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.
Tip: If you try to apply an 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