The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

A caller on Coast to Coast was just saying that by hadji2006-09-07 22:58:41
  just below 50%, I'd guess. (n/t) by shminux2006-09-07 23:06:36
    dead-on 50% actually by magixtechnica2006-09-07 23:10:59
      Huh. by hadji2006-09-07 23:13:35
        *I* am anyway. I forget the exact calculation by magixtechnica2006-09-07 23:17:14
          then start rethinking by shminux2006-09-07 23:21:41
            Ok, I am now confused again. by hadji2006-09-07 23:24:10
              The probability is 69.51% or so by hobbs 2006-09-08 00:04:05
However, I can't offer an elegant mathematical proof, only a well-backed computational one ;)

Consider a recursive function P(D,S,A,N) of four paremeters: D, the size of the deck, S, the number you select from the deck, A, the number of aces in the deck, and N, the number of aces that must be found to declare "success". P is itself the probability of success from a given starting condition.

P is defined as follows:

  • P == 1 if N == 0 because if you don't need to find more aces, you've succeeded.
  • P == 0 if A, S, or D are zero; in any of these cases it should be evident that no more aces may be found within the limits of the problem description.
  • Otherwise, P is defined as follows: P(D,S,A,N) = (A/D) * P(D-1, S-1, A-1, N-1) + (1 - A/D) * P(D-1, S-1, A, N)

    The probability of success from this position has contributions from two possibilities; either the next card is an ace (with probability A/D, in which case the posterior probability of success is that of a position in which we are one step closer to the end, the deck has had one ace removed, and the number of aces to find is one left -- or the next card is not an ace (probability 1 - A/D) in which case the new situation is one in which we are one step closer to the end, the deck has one non-ace to remove, and the number of aces needed remains the same.

So.... after writing a function to compute all that, I get P(52, 26, 4, 2) ~~ 0.6951. I've backed this up with a monte-carlo simulation that shuffles and cuts decks, and counts the number in which there are at least two aces; successive runs found at least two aces in 695,229; 694,539; and 695,174 trials out of a million.

[ Reply ]
                "parameters" btw. (n/t) by hobbs2006-09-08 00:08:47

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)