Statistics - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Statistics and Data Analysis : Statistics Package : Estimation : Statistics/MaximumLikelihoodEstimate

Statistics

  

MaximumLikelihoodEstimate

  

compute the maximum likelihood estimate

 

Calling Sequence

Parameters

Description

Options

Notes

Examples

Compatibility

Calling Sequence

MaximumLikelihoodEstimate(R, V, options)

Parameters

R

-

algebraic; a random variable or distribution

V

-

name or rtable; data sample

options

-

(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

Description

• 

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).

Options

  

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 data 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.

Notes

• 

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.

Examples

withStatistics:

Calculate the maximum likelihood estimate of the probability parameter in the Binomial distribution for a general sample.

MaximumLikelihoodEstimateBinomial10,θ,A,samplesize=4

140A1+140A2+140A3+140A4

(1)

Perform the same calculation except with a specific sample.

SSampleBinomial10,0.4,1000:

MaximumLikelihoodEstimateBinomial10,θ,S,bounds=0..1

0.393199998195490

(2)

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.

MaximumLikelihoodEstimateNormalμ,σ,A,samplesize=2

μ=12A1+12A2,σ=12A2+12A1,μ=12A1+12A2,σ=12A212A1

(3)

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.

S0.33,1.96,0.23,3.37,0.79

S:=0.331.960.233.370.79

(4)

resultsMaximumLikelihoodEstimateNormalμ,σ,S,bounds=σ=0..∞

results:=μ=0.144000000000000,σ=1.78217395335023

(5)

sampleStandardDeviationStandardDeviationS

sampleStandardDeviation:=1.99253105371033

(6)

evalσ,results,evalfsampleStandardDeviation45

1.78217395335023,1.78217395295189

(7)

Compatibility

• 

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.

See Also

Statistics

Statistics[Computation]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam