Log likelihood

Illustration
Nuchto - 2022-06-11T13:30:01+00:00
Question: Log likelihood

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 answered . 2025-11-20

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

 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!