Code for the Maximum likelihood esitmate for the gamma distribution , both parameters unknown
조회 수: 1 (최근 30일)
이전 댓글 표시
In the book by [Klugmann: Loss Models] "HERE IS THE BOOK: BOOK" (pleasee see also the attachment Loss.jpg) [OR Here] on the page 383 I would like to see a command for Matlab that would compute the Maximum Likelihood Estimate
for the Gamma Distribution where both parameters α and θ are unknown , please see the attachment. I would like to see a command that would output for Example 15.4 these numbers:
=2561.1 and
=0.55616 for these data
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1289015/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1289020/image.png)
[27,82,115,126,155,161,243,294,340,384,457,680,855,877,974,1193,1340,1884,2558,15743]
댓글 수: 0
답변 (1개)
Torsten
2023년 2월 8일
format long
data = [27,82,115,126,155,161,243,294,340,384,457,680,855,877,974,1193,1340,1884,2558,15743];
p = mle(data,'Distribution','Gamma')
댓글 수: 10
Torsten
2023년 2월 9일
편집: Torsten
2023년 2월 9일
sol = vpasolve([dlogfpdalpha==0,dlogfpdtheta==0],[alpha,theta],[0.5 1500])
gives theta more than 1500, namely 2561.14
Read in the documentation of "vpasolve" what the third argument given to the solver means.
Hint: It doesn't impose any constraint on the solution.
And you cannot impose any constraints on the solution.
You have a system of two equations in two unknowns. This is solved by
alpha: 0.55615779737149188594827727939715
theta: 2561.143629976936064991373664248
No way to influence these values in general.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!