Sets a probability measure upon a set with a finite number of elements.
[0,1]
) of the first element of the set, the second element corresponds to the probability of the second element and so on.That is, we set the probability of each element of a finite set of elements.
Say we have four possible outcomes: 1
, 2
, 3
,
4
; where the probability of each outcome is: 0.25
,
0.2
, 0.30
, 0.25
respectively. Now in
order to set the probability for this case you would need to pass the
parameters as:
elementsOfSet = {1, 2, 3, 4}
probabilityMeasure = {0.25, 0.2, 0.3, 0.25}
Exception Type | Condition |
---|---|
WrongProbabilityException | Thrown if the measure of probability is not within [0,1] . |
Probability Class | WebCab.COM.Statistics.DiscretePrb Namespace | SetProbability | Gets the reference numbers used to identify the events. | Gets the probabilities of the different events taking place.