Oct-28-2018, 02:32 PM
Greetings,
I am trying to numerically calculate a double integral over probability distributions (beta distributions), see picture.
I want to approximate the integrals as sums, taking samples according to the distributions.
I know I can sample from the beta function via beta.rvs(a,b), but since my second integration goes only from 0 to theta1, I can only use samples that are < theta1 there.
How can I solve this problem efficiently?
![[Image: 61202905bd3405a6695708e4d4c5bcc2821e0d27...247c8e.jpg]](https://serving.photos.photobox.com/61202905bd3405a6695708e4d4c5bcc2821e0d272ab397871c122f7117cc3ac64b247c8e.jpg)
Regards!
I am trying to numerically calculate a double integral over probability distributions (beta distributions), see picture.
I want to approximate the integrals as sums, taking samples according to the distributions.
I know I can sample from the beta function via beta.rvs(a,b), but since my second integration goes only from 0 to theta1, I can only use samples that are < theta1 there.
How can I solve this problem efficiently?
![[Image: 61202905bd3405a6695708e4d4c5bcc2821e0d27...247c8e.jpg]](https://serving.photos.photobox.com/61202905bd3405a6695708e4d4c5bcc2821e0d272ab397871c122f7117cc3ac64b247c8e.jpg)
Regards!