And I'm going to quit.... maybe... OCD can be a *bitch* sometimes. (Except when it's fun. Or !both! ... sigh ... Apologies in advance...)
Quote:
Originally Posted by GrogNerd
fair enough... but then the chances of winning leave the realm of statistics and enters the world of calculus and limits >100%, but never quite getting there
got it

Well, yes and no.
Probability of p occurring in n tries =
1  probability of p not occurring in n tries =
1  (1  p)^n
That's the absolute and complete answer and pure answer.
For a small n that's easy to calculate. But for actual number crunching with large n, it is sometimes easier to use:
1  (1  p)^n = n*p  (n(n1)/2)*p^2 + (n 3)*p^3  ....
Those terms get exponentially smaller and can eventually be ignored. If p is small compared to n then you can assume the probability is n*p. ***BUT ONLY IF p IS SMALL COMPARED TO N***. Otherwise you have to do the second and maybe third term as well.
Example: If p = 1/6,523 and n = 27, then P = 1  (6,522/6,523)^27. Well, that's a *bitch* for floating points. But if I look at the second term of the series, I see that 27*26/3 must be *really* small compared to (1/6,523)^2 so I can assume that
P ~= n*p = 27/6,523. (but its actually a *teeny* teeny *teeny* bit less. n*p is always a little too big.)
That's safe. And *very* easy.
If p = 1/100 and n = 27 then P = 1  (99/100)^27 is still a bitch to calculate. In the second term n(n1)/2 is 26*27/2 and p^2 is 1/100*100. This terms are no longer insignificant. We must include them. But in the third term (n 3) = 25*26*27/6 and p^3 is 1/100^3. Those are insignificant (almost; the fourth term 24*25*26*27/2*3*4*5 compared to 1/100^4 is definately insignificant) So
P ~= 27/100  13*27/10,000.
(or if you're picky P ~= 27/100  13*27/10,000 + 25*13*9/1,000,000)
That's safe. But not so easy. But easier than 1  (99/100)^27.
But when p is 1/4 and n is 6. Well .... P = 1  (3/4)^6 = 1  729/4,096 = 3,267/4,096 is *much* easy and much more accurate than any estimate of:
P ~= 6*1/4 = 1.5 WRONG!!!
P ~= 1.5  (6*5/2)*(1/4)^2 = 1.5  15/16 = 9/16 56.25%. Still wrong!
P ~= 9/16 + (6*5*4/1*2*3)*(1/4)^3 = 9/16 + 20/64 = 56/64 = 87.5%. Not so wrong.
P ~= 56/64  (6*5*4*3/1*2*3*4)*(1/4)^4 = 56/64  15/256 = 209/256 ~= 81.64% and as 15/256 *finally* is small enough to ignore so I won't do the final two terms.