MATLAB Answers

Integrate a bivariate normal distribution over y when x is fixed

21 views (last 30 days)
Apurva Patil
Apurva Patil on 18 Apr 2021 at 16:10
Edited: Paul on 18 Apr 2021 at 21:53
I have a bivariate normal distribution f(x,y). I want to integrate f(x=a, y) over y, say from y1 to y2. Is there any direct/simpler way to do this without using the integral function?
Thank you.

Accepted Answer

Paul on 18 Apr 2021 at 16:44
Edited: Paul on 18 Apr 2021 at 21:53
One simple approach is to evaluate f(a,y) for vector of y from y1 to y2 and then use cumtrapz() or trapz() on the result.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!