how to improve the precision when using the cumulative density function
Show older comments
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:)
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!