Random.Binomial Method

Generates a random integer N according to the binomial law
public static int Binomial( 
int ntot
double prob 
)
This language is not supported or no code example is available.
public:  
static int Binomial( 
int ntot
double prob 
)
This language is not supported or no code example is available.
public static function Binomial( 
ntot : int
prob : double 
) : int;
This language is not supported or no code example is available.

Parameters

ntot
int

prob
double

Return Value

int
Remarks
 
Coded from Los Alamos report LA-5061-MS  
 
N is binomially distributed between 0 and ntot inclusive with mean prob*ntot. prob is between 0 and 1.  
 
Note: This function should not be used when ntot is large (say >100). The normal approximation is then recommended instead (with mean =*ntot+0.5 and standard deviation sqrt(ntot*prob*(1-prob)).  
 
Author: Rene Brun, root.cern.ch

In this article

Definition