Overview - Maple Help

Estimation Commands

 The Statistics package supports a variety of tools for manipulating likelihood functions, performing maximum likelihood estimation and deriving various properties of the likelihood function.

Available Commands

 Fisher information statistical information estimate the probability density of a data set likelihood function compute the likelihood ratio statistic log likelihood function compute the maximum likelihood estimate statistical score

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$

Calculate the likelihood, log likelihood and score function of a beta distribution

 > $\mathrm{Likelihood}\left('\mathrm{Β}'\left(a,b\right),A,\mathrm{samplesize}=1\right)$
 $\left\{\begin{array}{cc}{0}& {{A}}_{{1}}{<}{0}\\ \frac{{{A}}_{{1}}^{{a}{-}{1}}{}{\left({1}{-}{{A}}_{{1}}\right)}^{{b}{-}{1}}}{{\mathrm{Β}}{}\left({a}{,}{b}\right)}& {{A}}_{{1}}{<}{1}\\ {0}& {1}{\le }{{A}}_{{1}}\end{array}\right\$ (1)
 > $\mathrm{LogLikelihood}\left('\mathrm{Β}'\left(a,b\right),A,\mathrm{samplesize}=1\right)$
 ${\mathrm{ln}}{}\left(\frac{{{A}}_{{1}}^{{a}{-}{1}}{}{\left({1}{-}{{A}}_{{1}}\right)}^{{b}{-}{1}}}{{\mathrm{Β}}{}\left({a}{,}{b}\right)}\right)$ (2)
 > $\mathrm{Score}\left('\mathrm{Β}'\left(a,b\right),A,\mathrm{samplesize}=1\right)$
 $\left[\begin{array}{c}{\mathrm{ln}}{}\left({{A}}_{{1}}\right){-}{\mathrm{\Psi }}{}\left({a}\right){+}{\mathrm{\Psi }}{}\left({a}{+}{b}\right)\\ {\mathrm{ln}}{}\left({1}{-}{{A}}_{{1}}\right){-}{\mathrm{\Psi }}{}\left({b}\right){+}{\mathrm{\Psi }}{}\left({a}{+}{b}\right)\end{array}\right]$ (3)

Attempt to calculate the maximum likelihood estimate of a binomial distribution.

 > $S≔\mathrm{Sample}\left(\mathrm{Binomial}\left(10,0.4\right),1000\right)$
 > $\mathrm{MaximumLikelihoodEstimate}\left(\mathrm{Binomial}\left(10,\mathrm{\theta }\right),S,\mathrm{bounds}=0..1\right)$
 ${0.393299998240230}$ (4)

Calculate the same information about a normal distribution.

 > $\mathrm{Information}\left(\mathrm{Normal}\left(\mathrm{\mu },\mathrm{\sigma }\right),A,\mathrm{samplesize}=1,\mathrm{param}=\mathrm{\mu }\right)$
 ${-}\frac{{1}}{{{\mathrm{\sigma }}}^{{2}}}$ (5)
 > $\mathrm{FisherInformation}\left(\mathrm{Normal}\left(\mathrm{\mu },\mathrm{\sigma }\right),1,\mathrm{\mu }\right)$
 $\frac{{1}}{{{\mathrm{\sigma }}}^{{2}}}$ (6)

Compute the likelihood ratio statistic about a similar normal distribution.

 > $\mathrm{LikelihoodRatioStatistic}\left(\mathrm{Normal}\left(\mathrm{\mu },5\right),A,\mathrm{samplesize}=1\right)$
 $\frac{{1}}{{25}}{}{{A}}_{{1}}^{{2}}{-}\frac{{2}}{{25}}{}{{A}}_{{1}}{}{\mathrm{\mu }}{+}\frac{{1}}{{25}}{}{{\mathrm{\mu }}}^{{2}}$ (7)