Calculates the probability of a number of independent events occurring when the probability of each event is known.
Before this method is called the set of events and the corresponding probabilities of each event must be set using SetProbability, or SetProbability.
If the probabilities of a number of events is p = {0.2, 0.3, 0.3, 0.1, 0.1}
,
respectively then the probability of the 1st and 2nd events, identified by
theEvent = {0, 1}
, is 0.5
.
Exception Type | Condition |
---|---|
IncompatibleEventException | Thrown if the event is not correctly defined. |
ProbabilityNotSetException | Thrown if the probability measure has not been set using SetProbability(int[], double[]) or SetProbability(int, int[]). |
Probability Class | WebCab.Libraries.Statistics.DiscretePrb Namespace | Probability.GetProbability Overload List | Used to set the events with corresponding probabilities. | Used to set the events with corresponding probabilities.