% -*- texinfo -*- % @deftypefn {Function File} {[@var{m}, @var{v}] =} nbinstat (@var{n}, @var{p}) % Compute mean and variance of the negative binomial distribution. % % @subheading Arguments % % @itemize @bullet % @item % @var{n} is the first parameter of the negative binomial distribution. The elements % of @var{n} must be natural numbers % % @item % @var{p} is the second parameter of the negative binomial distribution. The % elements of @var{p} must be probabilities % @end itemize % @var{n} and @var{p} must be of common size or one of them must be scalar % % @subheading Return values % % @itemize @bullet % @item % @var{m} is the mean of the negative binomial distribution % % @item % @var{v} is the variance of the negative binomial distribution % @end itemize % % @subheading Examples % % @example % @group % n = 1:4; % p = 0.2:0.2:0.8; % [m, v] = nbinstat (n, p) % @end group % % @group % [m, v] = nbinstat (n, 0.5) % @end group % @end example % % @subheading References % % @enumerate % @item % Wendy L. Martinez and Angel R. Martinez. @cite{Computational Statistics % Handbook with MATLAB}. Appendix E, pages 547-557, Chapman & Hall/CRC, % 2001. % % @item % Athanasios Papoulis. @cite{Probability, Random Variables, and Stochastic % Processes}. McGraw-Hill, New York, second edition, 1984. % @end enumerate % @end deftypefn