Function File: [m, v] = betastat (a, b)

Compute mean and variance of the beta distribution.

Arguments

  • a is the first parameter of the beta distribution. a must be positive
  • b is the second parameter of the beta distribution. b must be positive

a and b must be of common size or one of them must be scalar

Return values

  • m is the mean of the beta distribution
  • v is the variance of the beta distribution

Examples

a = 1:6;
b = 1:0.2:2;
[m, v] = betastat (a, b)

[m, v] = betastat (a, 1.5)

References

  1. Wendy L. Martinez and Angel R. Martinez. Computational Statistics Handbook with MATLAB. Appendix E, pages 547-557, Chapman & Hall/CRC, 2001.
  2. Athanasios Papoulis. Probability, Random Variables, and Stochastic Processes. McGraw-Hill, New York, second edition, 1984.

Package: statistics