|
Chapter Contents |
Previous |
Next |
| RANBIN |
| Category: | Random Number |
| Tip: | If you want to change the seed value during execution, you must use the CALL RANBIN routine instead of the RANBIN function. |
| Syntax | |
| Arguments | |
| Details | |
| Comparisons | |
| See Also |
Syntax |
| RANBIN(seed,n,p) |
| Range: | seed < 231-1 |
| Note: | If seed |
| Range: | n> 0 |
| Range: | 0 < p < 1 |
| Details |
The RANBIN function
returns a variate that is generated from a binomial distribution with mean np and variance np(1-p). If n
50, np
5, or
n(1-p)
5, an inverse transform method applied to a RANUNI uniform variate is used.
If n > 50, np > 5, and n(1-p)
> 5, the normal approximation to the binomial distribution is used. In that
case, the Box-Muller transformation of RANUNI uniform variates is used.
| Comparisons |
The CALL RANBIN routine, an alternative to the RANBIN function, gives greater control of the seed and random number streams.
| See Also |
| Call routine:
|
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.