Statistics Toolbox | ![]() ![]() |
Beta Distribution
The following sections provide an overview of the beta distribution.
Background on the Beta Distribution
The beta distribution describes a family of curves that are unique in that they are nonzero only on the interval (0 1). A more general version of the function assigns parameters to the end-points of the interval.
The beta cdf is the same as the incomplete beta function.
The beta distribution has a functional relationship with the t distribution. If Y is an observation from Student's t distribution with degrees of freedom, then the following transformation generates X, which is beta distributed.
The Statistics Toolbox uses this relationship to compute values of the t cdf and inverse function as well as generating t distributed random numbers.
Definition of the Beta Distribution
where B( · ) is the Beta function. The indicator function I(0,1)(x) ensures that only values of x in the range (0 1) have nonzero probability.
Parameter Estimation for the Beta Distribution
Suppose you are collecting data that has hard lower and upper bounds of zero and one respectively. Parameter estimation is the process of determining the parameters of the beta distribution that fit this data best in some sense.
One popular criterion of goodness is to maximize the likelihood function. The likelihood has the same form as the beta pdf. But for the pdf, the parameters are known constants and the variable is x. The likelihood function reverses the roles of the variables. Here, the sample values (the x's) are already observed. So they are the fixed constants. The variables are the unknown parameters. Maximum likelihood estimation (MLE) involves calculating the values of the parameters that give the highest likelihood given the particular set of data.
The function betafit
returns the MLEs and confidence intervals for the parameters of the beta distribution. Here is an example using random numbers from the beta distribution with a = 5 and b = 0.2.
r = betarnd(5,0.2,100,1); [phat, pci] = betafit(r) phat = 4.5330 0.2301 pci = 2.8051 0.1771 6.2610 0.2832
The MLE for parameter a is 4.5330, compared to the true value of 5. The 95% confidence interval for a goes from 2.8051 to 6.2610, which includes the true value.
Similarly the MLE for parameter b is 0.2301, compared to the true value of 0.2. The 95% confidence interval for b goes from 0.1771 to 0.2832, which also includes the true value. Of course, in this made-up example we know the "true value." In experimentation we do not.
Example and Plot of the Beta Distribution
The shape of the beta distribution is quite variable depending on the values of the parameters, as illustrated by the plot below.
The constant pdf (the flat line) shows that the standard uniform distribution is a special case of the beta distribution.
![]() | Overview of the Distributions | Binomial Distribution | ![]() |