WebCab Probability and Statistics for .NET v3.3 Demo

Probability.SetProbability Method (Int32, Int32[])

Sets a probability measure upon a finite set of events when the frequency of each event is known.

public void SetProbability(
   int numberOfEvents,
   int[] occurrences
);

Parameters

numberOfEvents
The number of (distinct) events within the set of events (which occur during the associated experiment).
occurrences
An array of integers where the k-th term corresponds to the number of occurrences of the k-th event during the experiment.

Remarks

Example

Say we have four possible outcomes: 1, 2, 3, 4; and the number of occurrences of these outcomes was found to be: 5, 4, 6, 5 respectively. Now in order to set the probability measure reflecting these events we need to pass the parameters:

  1. numberOfEvents = 5 + 4 + 6 + 5 = 20
  2. occurrences = {5, 4, 6, 5}

See Also

Probability Class | WebCab.Libraries.Statistics.DiscretePrb Namespace | Probability.SetProbability Overload List | Sets the probability measure when the frequency of each event is known. | Gets the reference numbers used to identify the events. | Gets the probabilities of the different events taking place.