Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: Conditional probability

$
0
0
"Tom Lane" <tlane@mathworks.com> wrote in message <kg8pev$l4t$1@newscl01ah.mathworks.com>...
> > 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

Thank you so much.

Viewing all articles
Browse latest Browse all 19628

Latest Images

Trending Articles



Latest Images