Question
Hi! I was wondering how to compute in Matlab the log likelihood. I think which the "fitdist" function includes "likelihood" function(e.g. normlike, gamlike and wbllike, etc). However, the result of likelihood value is not same result which I was using "Weilbull" distribution. The "Weibull" and "fitdist(data,'weibull') -> PD.NLogL" were not same value.
Expert Answer
John Williams
PhD Expert
Answered Aug 25, 2026
It's not clear to me what fails to match with what. These match:
>> x = -5*log(rand(100,1)); >> pd = fitdist(x,'weibull'); >> format compact >> negloglik(pd) ans = 267.1545 >> sum(-log(pdf(pd,x))) ans = 267.1545 >> wbllike(pd.ParameterValues,x) ans = 267.1545
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related likelihood Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →