Statistics Toolbox    
betafit

Parameter estimates and confidence intervals for beta distributed data

Syntax

Description

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

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

[phat,pci] = betafit(x,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.

Example

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. Note that the columns of ci both bracket the true parameters.

Reference

[1]  Hahn, Gerald J., & Shapiro, Samuel, S. Statistical Models in Engineering. John Wiley & Sons, New York. 1994. p. 95.

See Also
betalike, mle


  betacdf betainv