Products & Services Solutions Academia Support User Community Company

Learn more about Statistics Toolbox   

betafit - Beta parameter estimates

Syntax

phat = betafit(data)
[phat,pci] = betafit(data,alpha)

Description

phat = betafit(data) computes the maximum likelihood estimates of the beta distribution parameters a and b from the data in the vector data and returns a column vector containing the a and b estimates, where the beta cdf is given by

and B( · ) is the Beta function. The elements of data must lie in the interval (0 1).

[phat,pci] = betafit(data,alpha) returns confidence intervals on the a and b parameters in the 2-by-2 matrix pci. The first column of the matrix contains the lower and upper confidence bounds for parameter a, and the second column contains the confidence bounds for parameter b. The optional input argument alpha is a value in the range [0 1] specifying the width of the confidence intervals. By default, alpha is 0.05, which corresponds to 95% confidence intervals.

Examples

This example generates 100 beta distributed observations. The true a and b parameters are 4 and 3, respectively. Compare these to the values returned in p by the beta fit. Note that the columns of ci both bracket the true parameters.

data = betarnd(4,3,100,1);
[p,ci] = betafit(data,0.01)
p =
  3.9010  2.6193
ci =
  2.5244  1.7488
  5.2776  3.4898

References

[1] Hahn, Gerald J., and S. S. Shapiro. Statistical Models in Engineering. Hoboken, NJ: John Wiley & Sons, Inc., 1994, p. 95.

See Also

betacdf | betainv | betalike | betapdf | betarnd | betastat | mle

How To

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS