Grocer Function

NAME

bino_rnd - binomial random draws

CALLING SEQUENCE

[rnd]=bino_rnd(N,p,r,c)

PARAMETERS

Input

Output

DESCRIPTION

Random sampling from a binomial distribution.

NOTE: mean = a/(a+b), variance = ab/((a+b)*(a+b)*(a+b+1))

EXAMPLES

1) x= bino_rnd(15,0.25,4,3)
2) x= bino_rnd(15,0.25)

Example 1 provides a (4x3) matrix of random draws from the binomial(5,15) law. Example 2 provides a scalar drawn for the same law.

AUTHOR

Eric Dubois 2002