product of 2 normpdf is different to a bivariate mvnpdf with diagonal covariance matrix
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
A Mak
el 17 de Jul. de 2018
Respondida: David Goodmanson
el 19 de Jul. de 2018
I expect that the bivariate normal probability density function of two variables that are not correlated (i.e. I use a diagonal covariance matrix) should be the same as the product of two univariate normal probability density functions. To be more specific I would expect that F1 is equal to F2, but it is not
F1 = mvnpdf([10 10],[15 5],[1 2]);
F2 = normpdf(10,15,1)*normpdf(10,5,2);
I would greatly appreciate any help on whether I am missing something.
Thank you very much in advance.
0 comentarios
Respuesta aceptada
David Goodmanson
el 19 de Jul. de 2018
Hi A,
cov is specified by the covariance matrix, which in the diagonal case is simply independent variances. normpdf is specified by standard deviation. Try
F1 = mvnpdf([10 10],[15 5],[1 2])
F2 = normpdf(10,15,sqrt(1))*normpdf(10,5,sqrt(2))
F1 = 8.0962e-10
F2 = 8.0962e-10
>>
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!