WebCab Probability and Statistics for COM v3.3 Demo

Probability.GetProbViaParam Method 

Calculates the probability of a number of independent events occurring when the probability of each event is known.

public double GetProbViaParam(
   int[] theEvent
);

Parameters

theEvent
An array of integers identifying the event for which the probability occurrence is evaluated.

Remarks

Before this method is called the set of events and the corresponding probabilities of each event must be set using SetProbability, or SetProbability.

Example

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.

Exceptions

Exception TypeCondition
IncompatibleEventExceptionThrown if the event is not correctly defined.
ProbabilityNotSetExceptionThrown if the probability measure has not been set using SetProbability or SetProbability.

See Also

Probability Class | WebCab.COM.Statistics.DiscretePrb Namespace | SetProbability | SetProbability