Difference between revisions of "ChanceDist - Custom discrete distribution"
m (adding doc status category stub page) |
|||
Line 1: | Line 1: | ||
[[category:Distribution Functions]] | [[category:Distribution Functions]] | ||
− | [[Category:Doc Status | + | [[Category:Doc Status C]] <!-- For Lumina use, do not change --> |
− | {{ | + | = ChanceDist( P,A,I ) = |
+ | |||
+ | Creates a discrete probability distribution. A is an array of outcomes, and P is the corresponding array of probabilities. A and P must both be indexed by I. | ||
+ | |||
+ | = When to Use = | ||
+ | |||
+ | Use ChanceDist() instead of the probability table when: | ||
+ | * The array of outcomes A is multidimensional, or | ||
+ | * The outcomes and probabilities arrays are defined as other Variables; the Variables can be used in other parts of your model. | ||
+ | |||
+ | As of build 4.0.0.51, ChanceDist cannot be used within [[Random]]. This enhancement may occur in future releases. | ||
+ | |||
+ | = Example = | ||
+ | |||
+ | {| border="0" | ||
+ | | Index_b: | ||
+ | |- | ||
+ | | | ||
+ | {| border="1" | ||
+ | | Red || White || Blue | ||
+ | |} | ||
+ | |} | ||
+ | |||
+ | {| border="0" | ||
+ | | Array_1: | ||
+ | |- | ||
+ | | Index_b → | ||
+ | |- | ||
+ | | | ||
+ | {| border="1" | ||
+ | ! Red !! White !! Blue | ||
+ | |- | ||
+ | | 0.3 || 0.2 || 0.5 | ||
+ | |} | ||
+ | |} | ||
+ | |||
+ | Usage: | ||
+ | ChanceDist(Array_q,Index_b,Index_b) | ||
+ | |||
+ | = See Also = | ||
+ | |||
+ | * [[ProbTable]] | ||
+ | * [[Uniform]] |
Revision as of 23:32, 1 August 2007
ChanceDist( P,A,I )
Creates a discrete probability distribution. A is an array of outcomes, and P is the corresponding array of probabilities. A and P must both be indexed by I.
When to Use
Use ChanceDist() instead of the probability table when:
- The array of outcomes A is multidimensional, or
- The outcomes and probabilities arrays are defined as other Variables; the Variables can be used in other parts of your model.
As of build 4.0.0.51, ChanceDist cannot be used within Random. This enhancement may occur in future releases.
Example
Index_b: | |||
|
Array_1: | ||||||
Index_b → | ||||||
|
Usage:
ChanceDist(Array_q,Index_b,Index_b)
See Also
Comments
Enable comment auto-refresher