| Statistics Toolbox | Search  Help Desk |
| nbinstat | Examples See Also |
Mean and variance of the negative binomial distribution.
Syntax
[M,V] = nbinstat(R,P)
Description
[M,V] = nbinstat(R,P) returns the mean and variance of the negative binomial distibution with parameters R and P.
For the negative binomial distribution:
Example
p = 0.1:0.2:0.9;
r = 1:5;
[R,P] = meshgrid(r,p);
[M,V] = nbinstat(R,P)
M =
9.0000 18.0000 27.0000 36.0000 45.0000
2.3333 4.6667 7.0000 9.3333 11.6667
1.0000 2.0000 3.0000 4.0000 5.0000
0.4286 0.8571 1.2857 1.7143 2.1429
0.1111 0.2222 0.3333 0.4444 0.5556
V =
90.0000 180.0000 270.0000 360.0000 450.0000
7.7778 15.5556 23.3333 31.1111 38.8889
2.0000 4.0000 6.0000 8.0000 10.0000
0.6122 1.2245 1.8367 2.4490 3.0612
0.1235 0.2469 0.3704 0.4938 0.6173
See Also
nbincdf, nbininv, nbinpdf, nbinrnd