Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Joint hipergeometric and binomial probability?

  1. Aug 30, 2011 #1
    Have an example:

    the sample space is 0..9
    row 1 can pick 6 numbers out of which 2 are repeated
    row 2 can pick 6 numbers out of which 3 by 3 are repeated

    I want to know what is the real probability that row 1 will match with 2 distinct numbers numbers row 2, and a repeated number (which is one of those first two distinct numbers if they match row 2). Warning, the 6th number is not obligated to match one of those two numbers.

    The chance that row 1 matches row 2 with 2 numbers is:

    The chance that row 1 repeated number matches row 2 numbers is:

    how to combine these two probabilities to find out the real probability?

    can I multiply them like this? 10/45 x 25/45 = 5/81? The result seems to low in comparison.

    But if I calculate like this I got a different answer:
    1/10 x 1/9 x 1/8 x 1/7 x 1/6 x 1/10?
    final probabilty: 5/126

    How to calculate?

    I've refined the first calculation of the repeated unit probability.

    The logic is: the one repeated number can only match in 4 ways with the 2 distinct row2 numbers, or, the 4 distinct row1 numbers can match in 1 way (the repeated number), with the row2 2 distinct numbers.

    The math is:

    The question remains, the total row1 row2 match probability is (10/45) x (24/45) ?
    Last edited: Aug 30, 2011
  2. jcsd
  3. Sep 1, 2011 #2
    Problem solved experimentally, but need to find an elegant combinatorial formula for approximating the result instead.
    Also need verification of the solution below.

    Problem data is:
    sample space is numbers from 0 to 9
    lottery picks 6 numbers, but only 2 are distinct (Example: 111444)
    player picks 6 numbers, 5 distinct numbers and a bonus ball that repeats with one of the 5 distinct (Example: 012344)

    What is the probability that the player will match the lottery with 3 numbers?
    Note that this means that the player matches the lottery with the bonus ball, the number it repeats and a distinct number.

    Match example:
    Match:1, 4, 4


    There are C(10,5)=252 ways to select the 5 distinct numbers;
    There are 252 x 5 = 1260 ways to select 5 distinct numbers with another number (say onus ball) that repeats with one of them ;
    There are 45 x 1260 = 56700 ways to select the lottery and player;
    There are 11340 ways from 56700 to select only the ones where the lottery has a match with B;
    Note that 56700/11340=5;
    There are 5040 ways from 11340 to select only the ones where the lottery has a match with B and a distinct number of the player;

    The chance that this player matches the lottery so that they match 3 numbers is 1/5040
    The chance that the player doesn't match the lottery so that they match 3 numbers is 1/56700-5040=1/51660

    What is the formula that approximates the 1/5040 probability?
  4. Sep 1, 2011 #3
    I didn't calculate the probability right in the last part, it's 5040/56700, which is 0.0(8), or 4/45.


    Where did I go wrong:
    C(5,2)C(10-5,0)/C(10,2)=10/45 for the hipergeometric part, then, because the repeated unit can only be one of those first two that matched, it has 2/10 chance to match them. The total probability becomes:

    In actuality, the repeated units can only repeat with the other 5 distinct numbers (in 5 ways - row 1, the player) and it has 2 chances to match the other row 2 distinct numbers (row 2, the lottery) . This means 2/5 probability. Since the hypergeometric distribution probability is an independent event from the repeated unit and it's probability, because the repeated unit doesn't reduce the set w/o repetition when it's picked it can be multiplied with 2/5, the repeated unit probability.

    This matches this solution:
    Powerballs And Bonus Balls
    The general formula for B matching balls in a N choose K lottery with zero bonus ball from the N pool of balls is: {N-K-K+B\over N-K}{K\choose B}{N-K\choose K-B}\over {N\choose K}
    With the twist that the there's 2 attempts when picking the repeated number, the two distinct numbers from row 2, the lottery.
    Last edited: Sep 1, 2011
  5. Sep 2, 2011 #4
    Well, that wiki bit was inspiring, even if it that formula I posted is wrong for this problem because it's for no replacement balls.

    I should've posted this one instead perhaps:

    The general formula for B matching balls in a N choose K lottery with one bonus ball from a separate pool of P balls is: {1\over P}{K\choose B}{N-K\choose K-B}\over {N\choose K}

    ...though it doesn't add up:
    which is almost 4/45, which can be if I put up 1/4 instead, but
    the truth is that the ball that repeats, it does so with 5 distinct numbers not 4
  6. Sep 7, 2011 #5
    This is a conditional probability actually.

    was calculated as 4/45
    experiment sais 0.0659658333
    3/45 is very close: 0.0(6)

    Anyone knows how to calculate this probability properly?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Similar Threads for Joint hipergeometric binomial
I About binomial statistics