Log likelihood

Nuchto · Jun 11, 2022 · 1.9K views
Question
Hi!   I was wondering how to compute (which function to use) in Matlab the log likelihood but when the data is not normally distributed.   Thanks!
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Aug 15, 2026

If you have the most recent release of the Statistics Toolbox:

 

>> x = poissrnd(4,20,1);
>> pd = fitdist(x,'poisson');
>> pd.NLogL
ans =
   39.0221

If you do not:

>> mu = poissfit(x);
>> -sum(log(poisspdf(x,mu)))
ans =
   39.0221

 

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

Get a Free Consultation or a Sample Assignment Review!