How to write maximum likelihood score in Mathematica?

I am new to Mathematica and still can understand the core team. I need help writing a maximum likelihood rating function. I want to find the MLE of a binomial distribution with two parameters: n and p. I know that it is quite simple, and in fact I can get the answer manually, which I did. But I need to know how to write this in Mathematica in order to get the same answer. Thanks!

+4
source share
1 answer
data = RandomVariate[BinomialDistribution[2, .3], 1000]; EstimatedDistribution[data, BinomialDistribution[n, p], ParameterEstimator -> {"MaximumLikelihood"}] (* -> BinomialDistribution[2, 0.3155] *) 
+6
source

Source: https://habr.com/ru/post/1433373/


All Articles