Download Statistics Toolbox User's Guide
Transcript
nbinrnd Purpose Syntax nbinrnd Random matrices from a negative binomial distribution. RND = nbinrnd(R,P) RND = nbinrnd(R,P,m) RND = nbinrnd(R,P,m,n) Description RND = nbinrnd(R,P) is a matrix of random numbers chosen from a negative binomial distribution with parameters R and P. The size of RND is the common size of R and P if both are matrices. If either parameter is a scalar, the size of RND is the size of the other parameter. RND = nbinrnd(R,P,m) generates random numbers with parameters R and P. m is a 1-by-2 vector that contains the row and column dimensions of RND. RND = nbinrnd(R,P,m,n) generates random numbers with parameters R and P. The scalars m and n are the row and column dimensions of RND. The negative binomial models consecutive trials each having a constant probability, P, of success. The parameter, R, is the number of successes required before stopping. Example Suppose you want to simulate a process that has a defect probability of 0.01. How many units might Quality Assurance inspect before finding 3 defective items? r = nbinrnd(3,0.01,1,6) + 3 r = 496 See Also 142 420 396 851 178 nbincdf, nbininv, nbinpdf, nbinstat 2-131