MATLAB: Computing the convolution of the difference between random variables

convolutionrandom variables

I have the empirical distributions of Z, and X, where Z= X + Y. I've fit pearson type 4 distribution to X and Z.
What is the best way in matlab to solve for the pdf of Y= Z-X ? I've discretized the pdf of z and x and run a double summation to come up with a vector of y's. However, the result just doesnt seem quite right..
Thanks!

Best Answer

For a first check, I'd run a Monte-Carlo simulation with the empirical CDFs of X and Z.
Best wishes
Torsten.