Compute Maximum Likelihood Estimates - Maple Programming Help

Compute Maximum Likelihood Estimates

 Description Compute the maximum likelihood estimate of the parameters of a random variable.

Generate a random data set with a given distribution.

 > $N≔\mathrm{Statistics}\left[\mathrm{RandomVariable}\right]\left({\mathrm{Normal}}\left({5}{,}{1}\right)\right):$
 > $\mathrm{Statistics}\left[\mathrm{Sample}\right]\left(N,{10}\right)$
 $\left[\begin{array}{cccccccccc}\colorbox[rgb]{0,0,0}{{3.92757587200173}}& \colorbox[rgb]{0,0,0}{{4.67092212945293}}& \colorbox[rgb]{0,0,0}{{4.38290806309021}}& \colorbox[rgb]{0,0,0}{{5.21446674524529}}& \colorbox[rgb]{0,0,0}{{4.97457187195762}}& \colorbox[rgb]{0,0,0}{{6.72882128417783}}& \colorbox[rgb]{0,0,0}{{3.36514324565610}}& \colorbox[rgb]{0,0,0}{{6.57117217175430}}& \colorbox[rgb]{0,0,0}{{5.17035842141041}}& \colorbox[rgb]{0,0,0}{{6.00647840875181}}\end{array}\right]$ (1)

Compute the likelihood function of the sample.

 > $\mathrm{Statistics}\left[\mathrm{Likelihood}\right]\left({\mathrm{Normal}}\left({\mathrm{μ}}{,}{1}\right),\right)$
 ${\colorbox[rgb]{0,0,0}{{ⅇ}}}^{\colorbox[rgb]{0,0,0}{{-}}\frac{\colorbox[rgb]{0,0,0}{{1}}}{\colorbox[rgb]{0,0,0}{{2}}}\colorbox[rgb]{0,0,0}{{}}{\left(\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{3.92757587200173}}\colorbox[rgb]{0,0,0}{{+}}\colorbox[rgb]{0,0,0}{{\mathrm{μ}}}\right)}^{\colorbox[rgb]{0,0,0}{{2}}}}\colorbox[rgb]{0,0,0}{{}}{\colorbox[rgb]{0,0,0}{{ⅇ}}}^{\colorbox[rgb]{0,0,0}{{-}}\frac{\colorbox[rgb]{0,0,0}{{1}}}{\colorbox[rgb]{0,0,0}{{2}}}\colorbox[rgb]{0,0,0}{{}}{\left(\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{4.67092212945293}}\colorbox[rgb]{0,0,0}{{+}}\colorbox[rgb]{0,0,0}{{\mathrm{μ}}}\right)}^{\colorbox[rgb]{0,0,0}{{2}}}}\colorbox[rgb]{0,0,0}{{}}{\colorbox[rgb]{0,0,0}{{ⅇ}}}^{\colorbox[rgb]{0,0,0}{{-}}\frac{\colorbox[rgb]{0,0,0}{{1}}}{\colorbox[rgb]{0,0,0}{{2}}}\colorbox[rgb]{0,0,0}{{}}{\left(\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{4.38290806309021}}\colorbox[rgb]{0,0,0}{{+}}\colorbox[rgb]{0,0,0}{{\mathrm{μ}}}\right)}^{\colorbox[rgb]{0,0,0}{{2}}}}\colorbox[rgb]{0,0,0}{{}}{\colorbox[rgb]{0,0,0}{{ⅇ}}}^{\colorbox[rgb]{0,0,0}{{-}}\frac{\colorbox[rgb]{0,0,0}{{1}}}{\colorbox[rgb]{0,0,0}{{2}}}\colorbox[rgb]{0,0,0}{{}}{\left(\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{5.21446674524529}}\colorbox[rgb]{0,0,0}{{+}}\colorbox[rgb]{0,0,0}{{\mathrm{μ}}}\right)}^{\colorbox[rgb]{0,0,0}{{2}}}}\colorbox[rgb]{0,0,0}{{}}{\colorbox[rgb]{0,0,0}{{ⅇ}}}^{\colorbox[rgb]{0,0,0}{{-}}\frac{\colorbox[rgb]{0,0,0}{{1}}}{\colorbox[rgb]{0,0,0}{{2}}}\colorbox[rgb]{0,0,0}{{}}{\left(\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{4.97457187195762}}\colorbox[rgb]{0,0,0}{{+}}\colorbox[rgb]{0,0,0}{{\mathrm{μ}}}\right)}^{\colorbox[rgb]{0,0,0}{{2}}}}\colorbox[rgb]{0,0,0}{{}}{\colorbox[rgb]{0,0,0}{{ⅇ}}}^{\colorbox[rgb]{0,0,0}{{-}}\frac{\colorbox[rgb]{0,0,0}{{1}}}{\colorbox[rgb]{0,0,0}{{2}}}\colorbox[rgb]{0,0,0}{{}}{\left(\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{6.72882128417783}}\colorbox[rgb]{0,0,0}{{+}}\colorbox[rgb]{0,0,0}{{\mathrm{μ}}}\right)}^{\colorbox[rgb]{0,0,0}{{2}}}}\colorbox[rgb]{0,0,0}{{}}{\colorbox[rgb]{0,0,0}{{ⅇ}}}^{\colorbox[rgb]{0,0,0}{{-}}\frac{\colorbox[rgb]{0,0,0}{{1}}}{\colorbox[rgb]{0,0,0}{{2}}}\colorbox[rgb]{0,0,0}{{}}{\left(\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{3.36514324565610}}\colorbox[rgb]{0,0,0}{{+}}\colorbox[rgb]{0,0,0}{{\mathrm{μ}}}\right)}^{\colorbox[rgb]{0,0,0}{{2}}}}\colorbox[rgb]{0,0,0}{{}}{\colorbox[rgb]{0,0,0}{{ⅇ}}}^{\colorbox[rgb]{0,0,0}{{-}}\frac{\colorbox[rgb]{0,0,0}{{1}}}{\colorbox[rgb]{0,0,0}{{2}}}\colorbox[rgb]{0,0,0}{{}}{\left(\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{6.57117217175430}}\colorbox[rgb]{0,0,0}{{+}}\colorbox[rgb]{0,0,0}{{\mathrm{μ}}}\right)}^{\colorbox[rgb]{0,0,0}{{2}}}}\colorbox[rgb]{0,0,0}{{}}{\colorbox[rgb]{0,0,0}{{ⅇ}}}^{\colorbox[rgb]{0,0,0}{{-}}\frac{\colorbox[rgb]{0,0,0}{{1}}}{\colorbox[rgb]{0,0,0}{{2}}}\colorbox[rgb]{0,0,0}{{}}{\left(\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{5.17035842141041}}\colorbox[rgb]{0,0,0}{{+}}\colorbox[rgb]{0,0,0}{{\mathrm{μ}}}\right)}^{\colorbox[rgb]{0,0,0}{{2}}}}\colorbox[rgb]{0,0,0}{{}}{\colorbox[rgb]{0,0,0}{{ⅇ}}}^{\colorbox[rgb]{0,0,0}{{-}}\frac{\colorbox[rgb]{0,0,0}{{1}}}{\colorbox[rgb]{0,0,0}{{2}}}\colorbox[rgb]{0,0,0}{{}}{\left(\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{6.00647840875181}}\colorbox[rgb]{0,0,0}{{+}}\colorbox[rgb]{0,0,0}{{\mathrm{μ}}}\right)}^{\colorbox[rgb]{0,0,0}{{2}}}}$ (2)

Specify the range to search over, and then maximize the likelihood function of the statistic.

 > $\mathrm{Optimization}\left[\mathrm{Maximize}\right]\left(\mathrm{ln}\left(\right),{\mathrm{μ}}{=}{-}{50}{..}{50}\right)$
 $\left[\colorbox[rgb]{0,0,0}{{-}}\colorbox[rgb]{0,0,0}{{5.37775706828979}}\colorbox[rgb]{0,0,0}{{,}}\left[\colorbox[rgb]{0,0,0}{{\mathrm{μ}}}\colorbox[rgb]{0,0,0}{{=}}\colorbox[rgb]{0,0,0}{{5.10124182134982}}\right]\right]$ (3)
 Commands Used