Results 1 to 11 of 11

Math Help - Sum of two independent binomial random variables.

  1. #1
    Newbie
    Joined
    Dec 2010
    Posts
    8

    Sum of two independent binomial random variables.

    Hi guys,

    Here's a description of the problem:

    Suppose we have x apples and y oranges where each apple has a probability pa to rot and each orange has a probability po to rot, then what's the pdf of the total number of fruit z being rotten.

    This pdf looks like a product of two binomial distributions on the surface. However, since z = x+y, x >= 0, y >= 0, then it is actually necessary to sum over all combinations of scenarios (i.e. 6 fruit rotten = 3 apples rotten + 3 oranges rotten or 6 fruits rotten = 1 apple rotten + 5 oranges rotten).

    By intuition, I worked out the expectation to be x*pa + y *po and it appears to be correct when I manually tested my problem on a spreadsheet. However, I am not quite sure how that expectation can be derived from this messy pdf.

    Any suggestions?

    Thanks.
    Last edited by mr fantastic; December 14th 2010 at 08:01 PM. Reason: Corrected title.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by ouiouiwewe View Post
    Hi guys,

    Here's a description of the problem:

    Suppose we have x apples and y oranges where each apple has a probability pa to rot and each orange has a probability po to rot, then what's the pdf of the total number of fruit z being rotten.

    This pdf looks like a product of two binomial distributions on the surface. However, since z = x+y, x >= 0, y >= 0, then it is actually necessary to sum over all combinations of scenarios (i.e. 6 fruit rotten = 3 apples rotten + 3 oranges rotten or 6 fruits rotten = 1 apple rotten + 5 oranges rotten).

    By intuition, I worked out the expectation to be x*pa + y *po and it appears to be correct when I manually tested my problem on a spreadsheet. However, I am not quite sure how that expectation can be derived from this messy pdf.

    Any suggestions?

    Thanks.
    I have corrected the title of your post. In fact, the title now provides a perfect search string for Google ....
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor matheagle's Avatar
    Joined
    Feb 2009
    Posts
    2,763
    Thanks
    5
    The sum of two indep binomials is only a binomial if the p's are the same.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Dec 2010
    Posts
    8
    Sorry, I am a bit confused. How is this a sum of two binomials?

    For example, if we want the probability of having 2 rotten fruits, then this probability is:

    prob of having 2 rotten apples * prob of having 0 rotten oranges
    +
    prob of having 1 rotten apple * prob of having 1 rotten orange
    +
    prob of having 0 rotten apples * prob of having 2 rotten oranges

    That doesn't really look like a sum of two binomials or maybe I am misunderstanding something.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by ouiouiwewe View Post
    Sorry, I am a bit confused. How is this a sum of two binomials?

    For example, if we want the probability of having 2 rotten fruits, then this probability is:

    prob of having 2 rotten apples * prob of having 0 rotten oranges
    +
    prob of having 1 rotten apple * prob of having 1 rotten orange
    +
    prob of having 0 rotten apples * prob of having 2 rotten oranges

    That doesn't really look like a sum of two binomials or maybe I am misunderstanding something.
    The number of rotten fruit is the sum of the number of rotten apples and the number of rotten oranges.

    The number of rotten apples is ~B(x,pa) and of rotten oranges ~B(y,po)

    CB
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Dec 2010
    Posts
    8
    I am confused...

    The pdf of my rotten fruit distribution is the product of the pdf of the apple binomial pdf and the orange binomial pdf.

    If it is instead a sum of the two pdfs, then wouldn't my rotten fruit distribution not be a well-formed distribution? For example, if there are one apple and one orange with their respective probability of rotting being both 1. Then the probability of having two rotten fruits would be 2 because we are summing their pdfs...

    Sorry for sounding like an idiot, I am not very good with stats!
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by ouiouiwewe View Post
    I am confused...

    The pdf of my rotten fruit distribution is the product of the pdf of the apple binomial pdf and the orange binomial pdf.

    If it is instead a sum of the two pdfs, then wouldn't my rotten fruit distribution not be a well-formed distribution? For example, if there are one apple and one orange with their respective probability of rotting being both 1. Then the probability of having two rotten fruits would be 2 because we are summing their pdfs...

    Sorry for sounding like an idiot, I am not very good with stats!

    No one said the pmf was the sum of two binomial pmf, but the RV was the sum of two binomial RVs

    CB
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Dec 2010
    Posts
    8
    I see.

    So I can express my distribution in this form:
    Fruit(x,y,pa,po) = Apple(x,pa) + Orange(y,po)

    then E_Fruit(x+y) = E_Apple(x) + E_Orange(y)

    and V_Fruit(x+y) = V_Apple(x) + V_Orange(y)
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by ouiouiwewe View Post
    I see.

    So I can express my distribution in this form:
    Fruit(x,y,pa,po) = Apple(x,pa) + Orange(y,po)
    No, because that is saying their pmf sum, when in fact they don't, but because they are independednt you can say:

    Fruit(x,y,pa,po) = Apple(x,pa) Orange(y,po)

    then E_Fruit(x+y) = E_Apple(x) + E_Orange(y)

    and V_Fruit(x+y) = V_Apple(x) + V_Orange(y)
    These are true.

    CB
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie
    Joined
    Dec 2010
    Posts
    8
    Thanks for the reply.

    Hmm... so I suppose if Z is a distribution that is the sum of distributions X and Y, it is then expressed as Z = X*Y?
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by ouiouiwewe View Post
    Thanks for the reply.

    Hmm... so I suppose if Z is a distribution that is the sum of distributions X and Y, it is then expressed as Z = X*Y?
    The density or mass function of a RV which is the sum of two RV is the convolution of the densities/mass functions of those two random variables. The joint distribution of the two RV's (if independent) is the product of their densities/mass functions.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. [SOLVED] Independent Random Variables
    Posted in the Discrete Math Forum
    Replies: 4
    Last Post: November 29th 2010, 08:56 PM
  2. sup of independent random variables
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: November 23rd 2010, 02:34 PM
  3. Q: Independent negative binomial random variables
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: January 24th 2010, 10:02 PM
  4. independent random variables
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: November 15th 2009, 02:55 PM
  5. Independent Random Variables
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: April 28th 2008, 05:39 PM

Search Tags


/mathhelpforum @mathhelpforum