how to improve the precision when using the cumulative density function
Afficher commentaires plus anciens
Dear fellows,
I am calulating the log likelihood of bivariate normal distribution using the the buillt in function mvncdf. But I always get a lot of -Inf. Is there any solution to get the precise answer? I will show you an example to make my question clear:)
Here is the code
mu = [181.665319288082,145.332255430466]; SIGMA = [2 1; 1 2]; hatmu=[25,23]; X1=[hatmu(1)-0.5 hatmu(2)-0.5]; X2=[hatmu(1)+0.5 hatmu(2)+0.5]; X = [X1, X2]; p = log(mvncdf(X1,X2,mu,SIGMA))
When I run the above code, the result I get is p=-Inf.(the answer for mvncdf(X1,X2,mu,SIGMA)) is 0 so it is not surpriising to get p=-Inf)
Appreciate any help:)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!