Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Conditional probability
Posted:
Feb 22, 2013 4:54 PM


> I am having some problems in calculating conditional probability. To > explain my case, I have a normally distributed sample (say, mu = 5.0, std > = 2.0) and I would like to calculate the integrated probability of picking > two samples (x1,x2) with a difference larger than 2 (delta). > Does anyone know how to code this? Any suggestions on related MATLAB > functions or mathematical models would be appreciated.
Before you think about coding, you should be able to work out (theoretically) the distribution of the difference. You seem to say you have two values taken from a normal distribution with the same mean and standard deviation. The formula for the distribution of their difference is pretty simple. It will depend on the covariance (or correlation) between them, and if you assume they are independent then the distribution is even simpler.
Then you could use normcdf in MATLAB to get the value you need.
 Tom



