Results 1 to 5 of 5

Math Help - Prob A>B where A and B are from normal distributions

  1. #1
    Newbie
    Joined
    Oct 2011
    Posts
    3

    Prob A>B where A and B are from normal distributions

    If we have a random number A taken from a normal distribution with mean M1 and variance V1 and a number B taken from a normal distribution with mean M2 and variance V2, what is the probability that A > B?

    A link to an online answer would do fine- I'm sure its a standard problem, I just don't know how to look it up.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: Prob A>B where A and B are from normal distributions

    Quote Originally Posted by mickreiss View Post
    If we have a random number A taken from a normal distribution with mean M1 and variance V1 and a number B taken from a normal distribution with mean M2 and variance V2, what is the probability that A > B?

    A link to an online answer would do fine- I'm sure its a standard problem, I just don't know how to look it up.
    A-B has a normal distribution with mean M1-M2 and variance V1+V2, so what is the probability that A-B>0.

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Oct 2011
    Posts
    3

    Re: Prob A>B where A and B are from normal distributions

    Quote Originally Posted by CaptainBlack View Post
    A-B has a normal distribution with mean M1-M2 and variance V1+V2, so what is the probability that A-B>0.

    CB
    I have a library function cumul(x) which gives the cumulative area of a normal distribution of zero mean and unit variance where the argument is the number of standard deviations away from the centre. I.e. cumul(-infinity) = 0, cumul(0) = 0.5 and cumul(infinity) = 1. By my calculations your suggestion means the the probability of A being greater than B is:

    1 - cumul( -1 * (M1-M2)/sqrt(V1+V2) )

    As an example if M1 = 10 and M2 = 11 and V1=V2=1 then my formula says the answer is 0.24

    But doing a simulation with a large number of samples from these distributions I get an answer of 0.11

    Clearly I've made some mistake - which one is right?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: Prob A>B where A and B are from normal distributions

    Quote Originally Posted by mickreiss View Post
    I have a library function cumul(x) which gives the cumulative area of a normal distribution of zero mean and unit variance where the argument is the number of standard deviations away from the centre. I.e. cumul(-infinity) = 0, cumul(0) = 0.5 and cumul(infinity) = 1. By my calculations your suggestion means the the probability of A being greater than B is:

    1 - cumul( -1 * (M1-M2)/sqrt(V1+V2) )

    As an example if M1 = 10 and M2 = 11 and V1=V2=1 then my formula says the answer is 0.24

    But doing a simulation with a large number of samples from these distributions I get an answer of 0.11

    Clearly I've made some mistake - which one is right?
    Your MC is wrong.

    Code:
    >N=10000;
    >
    >
    >
    >A=normal(1,N)*1+10;B=normal(1,N)*1+11;
    >
    >sum(A>B)/N
           0.2407 
    >
    CB
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Oct 2011
    Posts
    3

    Re: Prob A>B where A and B are from normal distributions

    Thanks for that - just found a bug in my monte-carlo code. It seems "1 - cumul( -1 * (M1-M2)/sqrt(V1+V2) )" was correct after all.
    Cheers.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 6
    Last Post: November 14th 2009, 11:23 PM
  2. Random Variables and Prob Distributions
    Posted in the Statistics Forum
    Replies: 9
    Last Post: November 12th 2009, 06:49 AM
  3. Normal distributions
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: March 24th 2009, 01:39 PM
  4. Data Management - Prob. Distributions
    Posted in the Statistics Forum
    Replies: 4
    Last Post: December 31st 2008, 04:01 PM
  5. I need help with normal distributions...
    Posted in the Statistics Forum
    Replies: 4
    Last Post: July 28th 2008, 03:52 AM

Search Tags


/mathhelpforum @mathhelpforum