PDA

View Full Version : probability of getting AA

Jake (The Snake)
12-02-2004, 02:51 PM
whats the probability of getting AA 6 times in a 150 hands stretch? Also, showing the math involved would be cool. Thanks.

uuDevil
12-02-2004, 03:26 PM
[ QUOTE ]
whats the probability of getting AA 6 times in a 150 hands stretch? Also, showing the math involved would be cool. Thanks.

[/ QUOTE ]

For exactly 6 times, you can do this in Excel with the binomdist function. Enter the following in a cell and hit enter:

=binomdist(6,150,1/221,false)

This is equivalent to B(x;n,p)=C(n,x)*p^x*(1-p)^(1-x)
where x is the number of successes, n the number of trials, p the probability of success, and C(n,x)= n!/((n-x)!*x!), i.e. the number of ways of choosing x items from n items when the order does not matter.

The result I get is 6.3866E-05, or odds of 15657:1.

gaming_mouse
12-02-2004, 03:33 PM
Chance is 1/221 of getting dealt AA. So chance of EXACTLY 6 in 150 is:

(150 choose 6) * (1/221)^6 * (220/221)^144 = .0000638

About 6 in 100,000. The chance of AT LEAST 6 will be slightly greater, but I don't think significantly.

By the way, I just discovered you can paste the above expression (up to and including the "=" sign) into google to get the calculation.

gm

Jake (The Snake)
12-02-2004, 03:39 PM
I'm not sure what the difference between the two responses is, but if it helps I'm looking for the chance of getting it at least 6 times.

gaming_mouse
12-02-2004, 03:43 PM
There is no difference. We both came up with the same answer, which was for EXACTLY six times. I'm writing a program to calculate AT LEAST six times right now...

gm

Jake (The Snake)
12-02-2004, 03:51 PM
my fault

By the way, thanks a lot for going through this for me. It's very appreciated.

gaming_mouse
12-02-2004, 05:05 PM
My guess was right: the difference between exactly 6 and at least 6 is negligible. This is because the events exactly 7, exactly 8, etc, are all extremely unlikely.

gm

Quick and dirty java code follows:

<font class="small">Code:</font><hr /><pre>
package test;

import java.math.BigDecimal;

public class Test {

public static void main(String[] args) {

Test test = new Test();
BigDecimal ans = new BigDecimal("0").setScale(50);
for (int i=6; i&lt;=150; i++) {
}
System.out.println(ans);
}

public BigDecimal exactly(int n, int r, double p) {
BigDecimal ans = new BigDecimal("1").setScale(50);
BigDecimal n1 = new BigDecimal(new Integer(n).toString() ).setScale(50);
BigDecimal r1 = new BigDecimal(new Integer(r).toString() ).setScale(50);
BigDecimal p1 = new BigDecimal(new Double(p).toString() ).setScale(50);
BigDecimal q1 = new BigDecimal(new Double(1-p).toString() ).setScale(50);
ans = choose(n,r);
int pCount = r;
int qCount = n-r;
while (pCount-- &gt; 0)
ans = ans.multiply(p1);
while (qCount-- &gt; 0)
ans = ans.multiply(q1);
return ans;
}

public BigDecimal choose( int n, int r) {
BigDecimal one = new BigDecimal("1").setScale(50);
BigDecimal ans = new BigDecimal("1").setScale(50);
BigDecimal n1 = new BigDecimal(new Integer(n).toString() ).setScale(50);
BigDecimal r1 = new BigDecimal(new Integer(r).toString() ).setScale(50);
while (r1.compareTo(one) &gt;= 0) {
ans = ans.multiply(n1.divide(r1, BigDecimal.ROUND_HALF_UP));
n1 = n1.subtract(one);
r1 = r1.subtract(one);
}
return ans;
}
}

</pre><hr />

uuDevil
12-02-2004, 06:00 PM
For those of us too lazy to write programs, in Excel:

=1-binomdist(5,150,1/221,true)

Where the parameter "true" returns the cumulative binomial distribution value, gives the result 7.03603E-05, or odds of 14212:1. The same as the answer given by gaming_mouse.

gaming_mouse
12-02-2004, 07:56 PM
that's nifty. i'm sure there's some java package for it too, but i was too lazy to search for it.

gm