MATLAB: Calculate the probability of comparation of two variables

exponentially distributed

X and Y are two independent variables and they are both exponentially distributed with parameter m and n respectively, how can I use matlab to calculate the probability that prob{X>Y} ( you can set m and n for any value) should I use joint probability or any other methods?

Best Answer

If f1(x) is the probability density of one distribution and f2(y) a second one, and if they are independent, the probability that x>=y can be computed by the double integral of f1(x)*f2(y) with respect to x and y with these variables ranging over the domain in which x>=y.