BinomDist(Successes: Integer; Trials: Integer; Probability: Double; Cumulative: Boolean): Double;
Successes. Number of succeeded trials.
Trials. Number of independent trials.
Probability. Success probability for each trial. This value should meet the following constraint: 0 <= Probability <= 1.
Cumulative. Boolean value that defines function form. If this argument is True, the BinomDist function returns integral function of distribution: that is, probability that the number of successful trials is not smaller than value of the Successes argument; if this argument is False, the distribution function is returned: that is, probability that the number of successful trials exactly equals to value of the Successes argument.
The BinomDist method returns a separate value for binomial distribution.
The function is used to solve problems involving a fixed number of tests or trials, when the result of any trial can be success or failure only, trials are independent and the success probability is constant for the entire experiment period.
Sub UserProc;
Var
st: Statistics;
d0: Double;
Begin
st := New Statistics.Create;
d0 := st.BinomDist(6, 10, 0.5, False);
Debug.WriteLine("Binomial distribution: " + d0.ToString);
End Sub UserProc;
Executing this example displays the value of binomial distribution in the console window:
Module execution started
Binominal distribution: 0.20507812499583292
Module execution finished
See also: