Hello everyone,

I have a question about integration of two density function
Intuitively, I think the value after integration should be 1, but they are
not. Am I missing something here ?

> t=function(y){dnorm(y, mean=3)*dnorm(y/2, mean=1.5)}
> integrate(t, -Inf, Inf)
0.3568248 with absolute error < 4.9e-06


Also, is there any R function or package could do multivariate integration ?

Thanks for any suggestions!

Carrie

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to