Compute mean and variance of the gamma distribution.
a and b must be of common size or one of them must be scalar
- a is the first parameter of the gamma distribution. a must be positive
- b is the second parameter of the gamma distribution. b must be positive
- m is the mean of the gamma distribution
- v is the variance of the gamma distributiona = 1:6; b = 1:0.2:2; [m, v] = gamstat (a, b) [m, v] = gamstat (a, 1.5)
- Wendy L. Martinez and Angel R. Martinez. Computational Statistics Handbook with MATLAB. Appendix E, pages 547-557, Chapman & Hall/CRC, 2001.
- Athanasios Papoulis. Probability, Random Variables, and Stochastic Processes. McGraw-Hill, New York, second edition, 1984.