[net.math] probability formula

larry@utcsstat.UUCP (larry) (09/11/85)

> i've come across a "magic trick" that i need help finding out why it 
> works.  actually, i need the probability formula.  here's the 
> description:
> 
> pick any three cards from a deck of (52) playing cards, ignoring the
> suit.  if you get a duplicate, pick another one.  find all the 
> combinations of pairs you can have.  for example, if you pick the 
> king, seven and three, you can have 
> 
> k 7, 7 k, 3 7, 7 3, k 3, 3 k  (clearly 6 choices).
> 
> now, return the cards to the deck, shuffle to your heart's content, and
> start dealing out the cards in any order.  what will happen in most of the 
> cases is that 2 consecutive cards will be one of your choices.  in other 
> words, if you have dealt out
> 
> q a 2 3 1 k 4 7 3, 
> 
> you would "win" because the last 2 cards were 7 and 3, one of your choices.  
> things like "k k" don't count, but "k k 3" is fine.
> 
> does anyone know how to figure out the probability of this problem?
> 
> 
> 					gary rosenblum

(ihnp4!cmcl2!rosenblg  or  rosenblg@csd2)


     Actually, as a kid I was taught the following "magic" trick.
       Ask someone to name any two cards(ignoring suit). Then shuffle
       the cards and most often you will find that these two cards
       occur beside each other.  Given that this event occurs
       with high probability, it is not surprising that the
       aforementioned scheme does.

     I started to enumerate the probabilities but found the task
     tedious so I quit.  I think a strategy is as follows.

     Suppose we want the probability that a 5 and 7 occur beside
     each other in the deck, say.
     Imagine 52 slots, in a row.  There are 52 choose 4 ways
     of possible arrangements of 5's.  The number
     of "available" or empty slots next to these cards ranges
     from 2 to 8.  Given the number of empty slots, one can
     calculate the probability of any of four of the 7's
     falling in one of these slots.

        then let 

          p(i)=Prob{ i available slots} x 

                      Prob{a 7 falls in one of the  i empty slots}.

    The desire probability is then sum over i (from 2 to 8) of p(i).

As I said, this is tedious and its early in the morning, so i won't
attempt it.  Perhaps there is a more succinct argument.  If not, a monte
carlo  simulation may be the way to go.


                               Larry Wasserman
-- 

       	{allegra,ihnp4,linus,decvax}!utzoo!utcsstat!larry
        {ihnp4|decvax|utzoo|utcsrgv}!utcs!utzoo!utcsstat!larry

doyle@apple.UUCP (Ken Doyle) (10/03/85)

In trying to find the probability of a certain occurence, it is often
easier to try to find the probability that it does NOT occur. So, in
trying to find the probability that two card values X and Y occur
consecutively in a deck, assume X is at position i in the deck.  The
probability that a Y does NOT occur at position i-1 is p1=47/51 (the
number of non Y's over the number of cards left).  The probability
that a Y also does not occur at i+1 is p2=p1*46/50 (since we used up
a non-Y at i-1).  The probability that this happens for all 8 cards
is p2**8 which equals about .267.  Thus the probability that NO X
and Y will be consecutive is about 26.7%. (There is probably a slight
statistical variation at the beginning and end of the deck.)

Ken Doyle