Creating a Dashboard-Specified Discrete Distribution
This model illustrates how an arbitrary discrete distribution can be specified by entering values and probabilities in a dashboard. This cannot otherwise be done using a discrete distribution Stochastic Element.
Values and probabilities for the discrete distribution are stored in two vector Data Elements. Both Data Elements are dashboard-controlled so that values and probabilities can be entered from the dashboard. An Interrupt Element is triggered if the specified probabilities do not sum to 1. On each realization, a Stochastic Element samples a uniform distribution to retrieve a random value between 0 and 1. A Script Element then identifies and outputs the appropriate discrete distribution value based on this sampled value. A Result Distribution accumulates these values (over the specified number of realizations) and generates a probability distribution.
Download the model file
Screen Captures of the Model
Probabilities and values can be specified in a dashboard to generate a discrete distribution.