- #1
bob_johnson
- 5
- 0
Hi,
I am doing work that requires me to take the derivative of an integral over a distribution. I believe I calculated it correctly, but when I simulate the results in matlab, the plot for the integral and its derivative don't match up.
Here is the equation:
[tex]
$\int_{-\infty }^{\infty }\left[ p[1-G(p-y)]+\int_{-\infty }^{p-y}zg(z)dz\right] f(y)dy$
[/tex]
where G is the cdf of z with g the associated pdf, and F is the CDF of y with f the associated pdf.
I believe the derivative is the following:
[tex]
$\int_{-\infty }^{\infty }\left[ [1-G(p-y)]-yg(p-y)dz\right] $
[/tex]
But, when I simulate the two in MATLAB the graphs don't match up. See attached pdf.
Thanks for your help.
Any insight would be greatly appreciated.
All the best,
Bob
I am doing work that requires me to take the derivative of an integral over a distribution. I believe I calculated it correctly, but when I simulate the results in matlab, the plot for the integral and its derivative don't match up.
Here is the equation:
[tex]
$\int_{-\infty }^{\infty }\left[ p[1-G(p-y)]+\int_{-\infty }^{p-y}zg(z)dz\right] f(y)dy$
[/tex]
where G is the cdf of z with g the associated pdf, and F is the CDF of y with f the associated pdf.
I believe the derivative is the following:
[tex]
$\int_{-\infty }^{\infty }\left[ [1-G(p-y)]-yg(p-y)dz\right] $
[/tex]
But, when I simulate the two in MATLAB the graphs don't match up. See attached pdf.
Thanks for your help.
Any insight would be greatly appreciated.
All the best,
Bob
Attachments
Last edited: