Click or drag to resize

BinomialSample(Random, Double, Int32) Method

Samples a binomially distributed random variable.

Namespace: Altaxo.Calc.Distributions
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static int Sample(
	Random rnd,
	double p,
	int n
)

Parameters

rnd  Random
The random number generator to use.
p  Double
The success probability (p) in each trial. Range: 0 ≤ p ≤ 1.
n  Int32
The number of trials (n). Range: n ≥ 0.

Return Value

Int32
The number of successes in n trials.
See Also