compute the maximum likelihood estimate
MaximumLikelihoodEstimate(R, V, options)
MLE(R, V, options)
algebraic; a random variable or distribution
name or rtable; data sample
(optional) equation(s) of the form option=value where option is one of bounds, samplesize, params, ignore, output, or weights; specify options for the MaximumLikelihoodEstimate function
The MaximumLikelihoodEstimate function computes the maximum likelihood estimate of a random variable R evaluated on a data set V.
The first parameter R can be a distribution (see Statistics[Distribution]), a random variable, or an algebraic expression involving random variables (see Statistics[RandomVariable]).
The second parameter V can be an Array of data samples or a symbol representing an Array of data samples (in which case the option samplesize must be specified).
The abbreviation MLE is provided as an alias.
The options argument can contain one or more of the options shown below.
samplesize = deduce or posint -- If set to 'deduce' (default) the function uses the number of data samples provided in V. This parameter must be specified if the number of samples in V is not immediately detectable.
bounds = none or range or list(name = range) -- This option is only used when numeric solutions are computed. In this case, if the option specifies a range, then the function will attempt to calculate the maximum likelihood estimate such that all estimated parameters fall within the given bounds. If the option specifies a list of equations, then the left hand sides of these equations should be names of parameters to be estimated; the computed values will then fall within the right hand side bounds. The default range for each parameter is −∞..∞. It is highly recommended to specify finite ranges for all parameters when numeric solutions are required; Maple uses NLPSolve for the numeric case and it performs much better when given these ranges.
For symbolic solutions, the bounds option is ignored. Maple uses solve for this case.
params = list(name=realcons) -- This option specifies parameters that should be evaluated prior to calculating the maximum likelihood estimate.
ignore = truefalse -- This option is used to specify how to handle non-numeric data. If ignore is set to true all non-numeric items in V will be ignored.
output = equation or deduce or value -- If output = equation is given, then every solution will be returned as a list of equations, one equation for each parameter to be estimated. If output = value is supplied, which is only valid if there is only one parameter to be estimated, then every solution will be returned as just the value of that parameter. If output = deduce is specified (the default), then Maple will act as output = equation if there are multiple parameters to be estimated and as output = value if there is only one. If there are multiple solutions, then they are returned in a sequence.
weights = rtable -- Vector of weights (one-dimensional rtable). If weights are given, the MaximumLikelihoodEstimate function will scale each data point to have given weight. Note that the weights provided must have type realcons and the results are floating-point, even if the problem is specified with exact values. Both the data array and the weights array must have the same number of elements.
Note that for numeric solutions this function uses NLPSolve which is not sensitive to assumptions made with the assume command. For symbolic solutions this function uses solve instead and ignores the bounds option.
Calculate the maximum likelihood estimate of the probability parameter in the Binomial distribution for a general sample.
Perform the same calculation except with a specific sample.
S ≔ Sample⁡Binomial⁡10,0.4,1000:
Compute the maximum likelihood estimate of the mean and standard deviation of a normal distribution. If there are multiple solutions, as in this example, they are returned as a sequence.
The above example illustrates that the maximum likelihood estimate of σ is the population standard deviation, not the sample standard deviation. We show this for a concrete example below.
S ≔ −0.33,1.96,0.23,−3.37,0.79
results ≔ MaximumLikelihoodEstimate⁡Normal⁡μ,σ,S,bounds=σ=0..∞
sampleStandardDeviation ≔ StandardDeviation⁡S
The V parameter was updated in Maple 16.
The output option was introduced in Maple 16.
The bounds option was updated in Maple 16.
For more information on Maple 16 changes, see Updates in Maple 16.
Download Help Document