Maximum Likelihood Estimation
Introduction
Theory
Load Packages
Generate Data Set of Random Numbers
Maximizing the Likelihood Function
Histogram
The likelihood function describes how closely a probability distribution describes a data set. This application will demonstrate how to:
Generate a data set according to a Weibull distribution with a specified scale and shape parameter.
Backsolve the scale and shape parameters for this data set by maximizing the likelihood function using the Global Optimization Toolbox.
Compare the resulting probability distribution against a histogram of the data set.
The Weibull probability distribution has the following density function:
where α and β are the scale and shape parameters. The likelihood that a data set fits this distribution is:
Taking the log of this gives:
Hence we derive the following expression describing the likelihood function:
Number of random numbers to generate
Define the desired scale and shape parameters for the data set.
Generate a sample of random numbers according to a Weibull distribution
The probability density of a Weibull distribution
The likelihood function
Find the values of α and β that maximize the likelihood function with the Global Optimization Toolbox
These values match those used to generate the data set.
You can also match moments to find the shape and scale parameters
In the above plot, the red line corresponds to the estimated parameters based on the sample population and the black line corresponds to the desired sample parameters.
Download Help Document