<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: What are the odds of that?</title>
	<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that/</link>
	<description>Comments on Ask MetaFilter post What are the odds of that?</description>
	<pubDate>Fri, 17 Nov 2006 08:01:47 -0800</pubDate>
	<lastBuildDate>Fri, 17 Nov 2006 08:01:47 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: What are the odds of that?</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that</link>	
		<description>A regular deck of 52 cards is shuffled and turned face up one by one. What are the odds of going through the whole deck and finding at least  one set of two consecutive cards which have the same value? (ie, a pair). &lt;br /&gt;&lt;br /&gt; Over 30 years ago, I went through a period in 5th or 6th grade where I became fascinated by how it seemed like I could never end up running through the whole deck without encountering at least 1 pair. It was like magic to me. Someone out there must be able to easily calculate the exact  probability of this and put a number to my wonderment.</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2006:site.51142</guid>
		<pubDate>Fri, 17 Nov 2006 07:47:20 -0800</pubDate>
		<dc:creator>jaimev</dc:creator>
		
			<category>probability</category>
		
			<category>pair</category>
		
			<category>deck</category>
		
			<category>cards</category>
		
	</item> <item>
		<title>By: DevilsAdvocate</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774173</link>	
		<description>It&apos;s not a simple question, at least if you want an exact answer.  It&apos;s easy enough to determine that the probability of the second card having the same value as the first is 3/51.  And it&apos;s easy enough to determine that of the 48/51 times where the first two cards are unequal, 3/50 of those will have the second card equal the third.  But after that it gets tricky: if you get no pairs among the first three cards, the probability of the fourth card matching the third depends on whether the first and third cards matched (if they did, it&apos;s 2/49; if not, 3/49).  You get into all sorts of complex conditional probabilities real quick, and I don&apos;t see an easy way around that.&lt;br&gt;
&lt;br&gt;
If you want an approximation, a &lt;a href=&quot;http://en.wikipedia.org/wiki/Monte_Carlo_method&quot;&gt;Monte Carlo method&lt;/a&gt; might be appropriate.  (Basically, have a computer simulate shuffling a deck of cards many thousands of times and see how often it happens.)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774173</guid>
		<pubDate>Fri, 17 Nov 2006 08:01:47 -0800</pubDate>
		<dc:creator>DevilsAdvocate</dc:creator>
	</item><item>
		<title>By: true</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774192</link>	
		<description>This is totally cheating, but assuming you were drawing from an deck with an infinite amount of each card the chances of NOT getting a pair with each draw are (12/13). Since you&apos;d be flipping 51 times for a standard deck that would be 12/13 ^ 51, or about 1.7% of not getting a pair - 98.3% chance of pairing at some point during the flipping. &lt;br&gt;
&lt;br&gt;
Of course this is totally wrong when confronted with a real deck, but I don&apos;t know how much and in which direction.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774192</guid>
		<pubDate>Fri, 17 Nov 2006 08:17:07 -0800</pubDate>
		<dc:creator>true</dc:creator>
	</item><item>
		<title>By: sleslie</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774201</link>	
		<description>i wrote a simulation... i would use the monte carlo method; more of a simulation.&lt;br&gt;
&lt;pre&gt;&lt;br&gt;
  do {&lt;br&gt;
		deck = FULL_DECK_MASK;&lt;br&gt;
		found = 0;&lt;br&gt;
		for (i = 0; i &lt; 1; i++) {br&gt;
			for (j = 0; j &lt; nb_cards; j++) {br&gt;
				if ((mask =CARDS_pick_random(&amp;amp;deck,RANDVAL)) &lt; 0) {br&gt;
					ABORT(10); }&lt;br&gt;
&lt;br&gt;
				for (k=0;k&lt;nb _ranks;k++) {br&gt;
					if ((rank_masks[k]&amp;amp;mask) &amp;amp;&amp;amp;&lt;br&gt;
						(rank_masks[k]&amp;amp;prev_mask)) {&lt;br&gt;
						found = 1;&lt;br&gt;
						break; } /* if */&lt;br&gt;
				} /* for */&lt;br&gt;
&lt;br&gt;
                                if (found)&lt;br&gt;
                                    break;&lt;br&gt;
				prev_mask = mask;&lt;br&gt;
			}&lt;br&gt;
&lt;br&gt;
			total++;&lt;br&gt;
			total_found += found;&lt;br&gt;
&lt;br&gt;
			printf(&quot;%d %d %.5f\n&quot;, total_found, total, ((float)total_found/(float)total)*100);&lt;br&gt;
		}&lt;br&gt;
	} while (1);           &lt;br&gt;
&lt;/nb&gt;&lt;/&gt;&lt;/&gt;&lt;/&gt;&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
it produced this....&lt;br&gt;
&lt;br&gt;
618349 645296 95.82409&lt;br&gt;
&lt;br&gt;
now its up to the real mathematicians to vet this.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774201</guid>
		<pubDate>Fri, 17 Nov 2006 08:22:12 -0800</pubDate>
		<dc:creator>sleslie</dc:creator>
	</item><item>
		<title>By: beniamino</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774216</link>	
		<description>Another Monte Carlo:&lt;br&gt;
&lt;br&gt;
&lt;code&gt;&lt;br&gt;
number_of_trials = 100000;&lt;br&gt;
&lt;br&gt;
for ii = 1:number_of_trials&lt;br&gt;
  deck = randperm(52);&lt;br&gt;
  number = mod(deck,13);&lt;br&gt;
  f = find(number(1:51)==number(2:52));&lt;br&gt;
  number_of_pairs(ii) = length(f);&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
probability_of_at_least_one_pair = length(find(number_of_pairs)&amp;gt;1)/number_of_trials&lt;br&gt;
average_number_of_pairs = mean(number_of_pairs)&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
It produces:&lt;br&gt;
&lt;code&gt;&lt;br&gt;
probability_of_success =&lt;br&gt;
&lt;br&gt;
    0.9549&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
average_number_of_pairs =&lt;br&gt;
&lt;br&gt;
    3.0036&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
In other words, you expect to get a pair 19 times out of 20.  And the average number of pairs on each run through the deck is 3.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774216</guid>
		<pubDate>Fri, 17 Nov 2006 08:29:36 -0800</pubDate>
		<dc:creator>beniamino</dc:creator>
	</item><item>
		<title>By: beniamino</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774217</link>	
		<description>(probability_of_at_least_one_pair equals probability_of_success)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774217</guid>
		<pubDate>Fri, 17 Nov 2006 08:32:25 -0800</pubDate>
		<dc:creator>beniamino</dc:creator>
	</item><item>
		<title>By: justkevin</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774225</link>	
		<description>I wrote a similar simulation to sleslie&apos;s but came up with 95.4% after a million trials.&lt;br&gt;
&lt;br&gt;
Here&apos;s my code:&lt;br&gt;
&lt;pre&gt;&lt;br&gt;
while(true)&lt;br&gt;
{&lt;br&gt;
	++$sample;&lt;br&gt;
	$last = &apos;;&lt;br&gt;
	$paired = false;&lt;br&gt;
	$deck-&amp;gt;shuffle();&lt;br&gt;
	$i = 0;&lt;br&gt;
	while($i &lt; 52 &amp;&amp; !$paired)br&gt;
	{&lt;br&gt;
		$index = $deck-&amp;gt;order[$i];&lt;br&gt;
		$value = $deck-&amp;gt;cards[$index]-&amp;gt;value;&lt;br&gt;
		if($last == $value)&lt;br&gt;
		{&lt;br&gt;
			$paired = true;	&lt;br&gt;
			++$pairs;&lt;br&gt;
		}&lt;br&gt;
		$last = $value;&lt;br&gt;
		++$i;&lt;br&gt;
	}&lt;br&gt;
	$rate = $pairs / $sample;&lt;br&gt;
	if($sample % 100 == 0)&lt;br&gt;
	{&lt;br&gt;
		echo &quot;Found $pairs paired decks out of $sample: $rate\n&quot;;&lt;br&gt;
	}&lt;br&gt;
}&lt;br&gt;
&lt;/&gt;&lt;/pre&gt;&lt;br&gt;
&lt;br&gt;
I think (but could very well be wrong) that sleslie has a small error-- a deck would be considered paired if its first card is the same as the last one from the previous simulation.  prev_mask needs to be reset for each run.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774225</guid>
		<pubDate>Fri, 17 Nov 2006 08:36:46 -0800</pubDate>
		<dc:creator>justkevin</dc:creator>
	</item><item>
		<title>By: sleslie</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774240</link>	
		<description>thanks justkevin, you are right. I got 95.4% after the error you corrected was implemented.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774240</guid>
		<pubDate>Fri, 17 Nov 2006 08:48:43 -0800</pubDate>
		<dc:creator>sleslie</dc:creator>
	</item><item>
		<title>By: blue mustard</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774308</link>	
		<description>Given a card, the odds that the next card doesn&apos;t match is 48/51.  There are 51 pairs. Each pair can be considered independently -- the odds don&apos;t change as the deck is dealt.  So, the probability that all 51 pairs don&apos;t match are (48/51)^51, or 0.0454.  The odds that at least one pair matches is 1-(48/51)^51, or 0.9546.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774308</guid>
		<pubDate>Fri, 17 Nov 2006 09:46:44 -0800</pubDate>
		<dc:creator>blue mustard</dc:creator>
	</item><item>
		<title>By: nickmark</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774430</link>	
		<description>Wait -- why don&apos;t the odds change as the deck is dealt?  I mean, if I get an ace on draw 1, then sure -- my odds are 48/51 of getting an ace on draw 2.  But if I get an ace on draws 1, 3, and 7, aren&apos;t my odds of an ace on draw 8 only 1/45?&lt;br&gt;
&lt;br&gt;
Is it simply that by discarding aces early, I increase the odds of non-ace pairs later?  Do those probabilities effectively cancel out, meaning that we can treat the draws independently even though they&apos;re technically not?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774430</guid>
		<pubDate>Fri, 17 Nov 2006 10:59:40 -0800</pubDate>
		<dc:creator>nickmark</dc:creator>
	</item><item>
		<title>By: allan</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774494</link>	
		<description>@nickmark - If you wanted to know what the odds of hitting a pair on the nth card, then we would need to do dependent draws. But since we want it abstractly, we don&apos;t need to do drawing without replacement.&lt;br&gt;
&lt;br&gt;
An example: in theory, the odds of a pair on the last two cards is the exact same as a pair on the first two, a priori. In practice, by the time you got to the last two cards, you would know for certain whether the last card would be a pair or not, just by looking at all the previous cards.  That&apos;s not the same as the theoretical probability.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774494</guid>
		<pubDate>Fri, 17 Nov 2006 11:36:45 -0800</pubDate>
		<dc:creator>allan</dc:creator>
	</item><item>
		<title>By: DevilsAdvocate</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774496</link>	
		<description>Yes, nickmark is right--the odds do change as the deck is dealt, and blue mustard is wrong.  (And shame on jaimev for marking that as best answer!!)&lt;br&gt;
&lt;br&gt;
A demonstration that blue mustard is wrong can be seen by applying his reasoning to a simpler deck.  Suppose we have a deck of only four cards: AS, AH, 2S, 2H.  And we want to know the probability that, when shuffled, this deck will contain at least one consecutive pair.&lt;br&gt;
&lt;br&gt;
According to blue mustard&apos;s reasoning: &quot;Given a card, the odds that the next card doesn&apos;t match is 2/3. There are 3 pairs. Each pair can be considered independently -- the odds don&apos;t change as the deck is dealt. So, the probability that all 3 pairs don&apos;t match are (2/3)^3 [i.e., 8/27], or 0.2963. The odds that at least one pair matches is 1-(2/3)^3 [i.e., 19/27], or 0.7037.&quot;&lt;br&gt;
&lt;br&gt;
But with such a small deck, it is relatively simple to exhaustively list all 24 possible orders of the shuffled deck, and upon doing so we find that the probability of getting at least one pair is not 19/27, but 16/24, or 0.6667.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774496</guid>
		<pubDate>Fri, 17 Nov 2006 11:37:50 -0800</pubDate>
		<dc:creator>DevilsAdvocate</dc:creator>
	</item><item>
		<title>By: yeti</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774504</link>	
		<description>Now, what are the odds using a &lt;a href=&quot;http://starmgc.com/svengali.html&quot;&gt;Svengali deck&lt;/a&gt;?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774504</guid>
		<pubDate>Fri, 17 Nov 2006 11:40:48 -0800</pubDate>
		<dc:creator>yeti</dc:creator>
	</item><item>
		<title>By: blue mustard</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774518</link>	
		<description>The question is whether a shuffled deck either has two consecutive matched cards.  We don&apos;t know that the first card is an ace.  Any card has equal chance of being in any pair, which is why the pairs can be considered independent.&lt;br&gt;
&lt;br&gt;
If one was to examine the deck a card at a time, as you describe, the probability of a match will change as each card is revealed.  But that&apos;s not the same question.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774518</guid>
		<pubDate>Fri, 17 Nov 2006 11:48:15 -0800</pubDate>
		<dc:creator>blue mustard</dc:creator>
	</item><item>
		<title>By: DevilsAdvocate</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774520</link>	
		<description>&lt;i&gt;An example: in theory, the odds of a pair on the last two cards is the exact same as a pair on the first two, a priori.&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
While the two probabilites are &lt;i&gt;the same&lt;/i&gt;, a priori, the two events (cards 1 and 2 being a pair, and cards 51 and 52 being a pair) are not &lt;i&gt;independent&lt;/i&gt;.  Thus, you cannot simply multiply probabilities to get the overall probability.&lt;br&gt;
&lt;br&gt;
As an illustration, suppose we shuffle a &quot;deck&quot; of two cards, one red and one black.  What is the probability that the first card is red?  1/2.  What is the probability that the second card is red?  1/2.  So what is the probability that &lt;i&gt;both&lt;/i&gt; cards are red?  Do we say that it&apos;s 1/4, because 1/2*1/2=1/4?  Of course not.  Even though we have calculated the probability of the first card being red, and that of the second card being red, correctly, we cannot calculate the probability that both cards are red simply by multiplying the probabilities, because the events are not independent.&lt;br&gt;
&lt;br&gt;
Likewise, while you are correct that the probability of the first two cards not matching is 48/51, and the probability of the last two cards not matching is also 48/51 (as well as any two consecutive cards), the events are not independent, and thus you cannot calculate the overall probability simply by multiplying the individual probabilities.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774520</guid>
		<pubDate>Fri, 17 Nov 2006 11:49:40 -0800</pubDate>
		<dc:creator>DevilsAdvocate</dc:creator>
	</item><item>
		<title>By: Brian B.</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774522</link>	
		<description>If you can get 51 chance pairs of 2 with a possibility of 39 total pairs (overlapping quads adds up to three pairs), then you have a theoretical probability of &lt;sub&gt;51&lt;/sub&gt;C&lt;sub&gt;2&lt;/sub&gt; divided by &lt;sub&gt;39&lt;/sub&gt;C&lt;sub&gt;2&lt;/sub&gt;, where &lt;sub&gt;n&lt;/sub&gt;C&lt;sub&gt;k&lt;/sub&gt; is n!/k!(n-k)!&lt;br&gt;
&lt;br&gt;
This is (51!/49!2!)/(39!/37!2!) or 2550/1482&lt;br&gt;
&lt;br&gt;
= 1.72</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774522</guid>
		<pubDate>Fri, 17 Nov 2006 11:50:18 -0800</pubDate>
		<dc:creator>Brian B.</dc:creator>
	</item><item>
		<title>By: DevilsAdvocate</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774531</link>	
		<description>&lt;i&gt;If one was to examine the deck a card at a time, as you describe, the probability of a match will change as each card is revealed. But that&apos;s not the same question.&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
It&apos;s exactly the same question.  Whether the entire deck is turned over at once, or whether it&apos;s revealed one card at a time does not affect whether the deck contains two consecutive matched cards.&lt;br&gt;
&lt;br&gt;
&quot;We shuffle a deck of cards.  What is the probability that two consecutive cards are a pair?&quot;&lt;br&gt;
&lt;br&gt;
&quot;We shuffle a deck of cards, and then look at the cards, from the top, one at a time.  What is the probability that two consecutive cards are a pair?&quot;&lt;br&gt;
&lt;br&gt;
Are you seriously suggesting that these two questions have different answers?  If so, please explain, given the simplified deck of four cards I described above (two aces and two twos) which one has the answer 18/27, and which has the answer 16/24.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774531</guid>
		<pubDate>Fri, 17 Nov 2006 11:54:42 -0800</pubDate>
		<dc:creator>DevilsAdvocate</dc:creator>
	</item><item>
		<title>By: DevilsAdvocate</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774534</link>	
		<description>&lt;i&gt;= 1.72&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
Probabilities are generally between 0 and 1.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774534</guid>
		<pubDate>Fri, 17 Nov 2006 11:56:20 -0800</pubDate>
		<dc:creator>DevilsAdvocate</dc:creator>
	</item><item>
		<title>By: blue mustard</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774547</link>	
		<description>I like DevilsAdvocate example of (AS,AH,2S,2H).  It does seem to indicate I&apos;m wrong. I&apos;m not yet buying DA&apos;s description of why I&apos;m wrong though.... hmm.... &lt;br&gt;
&lt;br&gt;
&lt;i&gt;&quot;What is the probability that two consecutive cards are a pair?&quot;&lt;/i&gt;&lt;br&gt;
My point is that if you ask this question after you&apos;ve looked at the first two cards, you get a different answer than if you ask before looking at any cards.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774547</guid>
		<pubDate>Fri, 17 Nov 2006 12:07:37 -0800</pubDate>
		<dc:creator>blue mustard</dc:creator>
	</item><item>
		<title>By: DevilsAdvocate</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774564</link>	
		<description>&lt;i&gt;My point is that if you ask this question after you&apos;ve looked at the first two cards, you get a different answer than if you ask before looking at any cards.&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
Yes, that&apos;s true.  I&apos;m not saying the probability of the deck containing at least one pair, once we know what the first two cards are, is the same as the probability prior to that knowledge.  (After all, if the first two cards match, then the probability of the deck containing at least one pair is 1!)  I&apos;m saying that we have to take those subsequent probabilities into account in order to answer the original question.&lt;br&gt;
&lt;br&gt;
Looking at (AS, AH, 2S, 2H) again: the probability that the first two cards do not match is 2/3.  The probability that the second and third cards do not match is 2/3.  The probability that the last two cards do not match is 2/3.  On this, we agree.  What I&apos;m saying is that these three events are not independent, therefore we cannot simply multiply the probabilities together to determine the probability of all three events happening.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774564</guid>
		<pubDate>Fri, 17 Nov 2006 12:19:07 -0800</pubDate>
		<dc:creator>DevilsAdvocate</dc:creator>
	</item><item>
		<title>By: DevilsAdvocate</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774592</link>	
		<description>To further the analogy, this is what I&apos;m saying is the correct way to analyze (AS, AH, 2S, 2H), without listing out all the possible orders:&lt;br&gt;
&lt;br&gt;
1. P(C1=C2) = 1/3&lt;br&gt;
2. P(C1&#8800;C2) = 2/3&lt;br&gt;
 - 2A. given (C1&#8800;C2), P(C2=C3) = 1/2.  Thus, P(C1&#8800;C2 &amp;amp; C2=C3) = 2/3*1/2 = 1/3.&lt;br&gt;
 - 2B. given (C1&#8800;C2), P(C2&#8800;C3) = 1/2.  Thus, P(C1&#8800;C2 &amp;amp; C2&#8800;C3) = 2/3 * 1/2 = 1/3.&lt;br&gt;
 - - 2B1.  Given (C1&#8800;C2 &amp;amp; C2&#8800;C3), P(C3=C4)=0.  Thus, P(C1&#8800;C2 &amp;amp; C2&#8800;C3 &amp;amp; C3=C4) = 1/3*0=0.&lt;br&gt;
 - - 2B2. Given (C1&#8800;C2 &amp;amp; C2&#8800;C3), P(C3&#8800;C4)=1.  Thus, P(C1&#8800;C2 &amp;amp; C2&#8800;C3 &amp;amp; C3&#8800;C4) = 1/3*1 = 1/3.&lt;br&gt;
&lt;br&gt;
Probability of at least one pair = P(C1=C2)+P(C1&#8800;C2 &amp;amp; C2=C3)+P(C1&#8800;C2 &amp;amp; C2&#8800;C3 &amp;amp; C3=C4) {since they are mutually exclusive, we can add their probabilities} = 1/3 + 1/3 + 0 = 2/3.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774592</guid>
		<pubDate>Fri, 17 Nov 2006 12:39:56 -0800</pubDate>
		<dc:creator>DevilsAdvocate</dc:creator>
	</item><item>
		<title>By: DevilsAdvocate</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774642</link>	
		<description>OK, I think I&apos;ve got an exact answer.  Well, not exact in terms of the actual fractional probability, but exact in the sense that it&apos;s derived rather than approximated, and that the actual fractional probability could be worked out the same way I&apos;ve done this, if you wanted to work with 60-digit numbers or so.&lt;br&gt;
&lt;br&gt;
Here&apos;s an overview of how I proceeded: Imagine a point in the process of drawing cards, one at a time, from a shuffled deck, and for which no pair has yet appeared.  You can provide all the information you need for the analysis with just six (actually five) numbers:&lt;br&gt;
*Number of ranks with four undrawn cards&lt;br&gt;
*Number of ranks with three undrawn cards&lt;br&gt;
*Number of ranks with two undrawn cards&lt;br&gt;
*Number of ranks with one undrawn cards&lt;br&gt;
*Number of ranks with zero undrawn cards&lt;br&gt;
{Since these first five numbers must add up to thirteen, the fifth is unnecessary, but I&apos;m including it for clarity}&lt;br&gt;
*Number of remaining cards which match the most-recently drawn card.&lt;br&gt;
&lt;br&gt;
Let&apos;s represent the contents of the cards yet to be drawn as the first five numbers separated by periods, with an asterisk following the group corresponding to the number of cards matching the most recently drawn card.  For example, 9.2*.1.1.0 means there are nine ranks where all four cards have yet to be drawn; two ranks with three cards yet to be drawn, one of which is also the rank of the most recently drawn card; one rank with two cards yet to be drawn; one rank with one card yet to be drawn; and no ranks for which all four cards have been drawn already.  Thus, there are currently 9*4+2*3+1*2+1*1=45 cards which have not been drawn yet.&lt;br&gt;
&lt;br&gt;
Representing the deck in this way, we have all the information we need to determine a) the probability of the next drawn card matching the last drawn card; and b) if it doesn&apos;t match, the probabilities of proceeding to each possible next state.&lt;br&gt;
&lt;br&gt;
Thus, from the initial state 13.0.0.0.0, (no asterisk since no card has been drawn yet), we proceed to 12.1*.0.0.0 with probability 1.&lt;br&gt;
&lt;br&gt;
Given 12.1*.0.0.0, we get a pair with probability 3/51, and proceed to 11.2*.0.0.0 with probability 48/51.&lt;br&gt;
&lt;br&gt;
Given 11.2*.0.0.0, we get a pair with probability 3/50; get to 11.1.1*.0.0 with probability 3/50; and get to 10.3*.0.0.0 with probability 44/50.  Since the probability of getting to 11.2*.0.0.0 in the first place was 48/51, that means the overall probability of reaching 11.1.1*.0.0 is (48/51)*(3/50) = 144/2550.  And the overall probability of reaching 10.3*.0.0.0 is (48/51)*(44/50) = 2112/2550.  The probability of getting to 11.2*.0.0.0 and then getting a pair with the next card draw is (48/51)*(3/50) = 144/2550.  The total probability of getting a pair within the first three cards is 3/51+144/2550 = 194/2550.&lt;br&gt;
&lt;br&gt;
And so forth.  (It gets a bit more complicated later on, as some of the states can be reached by more than one pathway.  You just have to add together the probabilities of reaching that state via each individual pathway.)&lt;br&gt;
&lt;br&gt;
When we represent the undrawn cards in this way, it turns out that we have &quot;only&quot; 7263 states that have to be considered.  After a few hours in Excel, I&apos;ve come up with 0.954523718 as the probability of having at least one pair. That is, the probability of reaching the final state 0.0.0.0.13* (i.e., no pairs) is 0.045476282.  Subject to roundoff errors in Excel, etc.&lt;br&gt;
&lt;br&gt;
So while not an exact answer, blue mustard&apos;s 1-(48/51)^51 is pretty darn close.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774642</guid>
		<pubDate>Fri, 17 Nov 2006 13:26:25 -0800</pubDate>
		<dc:creator>DevilsAdvocate</dc:creator>
	</item><item>
		<title>By: DevilsAdvocate</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774654</link>	
		<description>&lt;i&gt;The total probability of getting a pair within the first three cards is 3/51+144/2550 = 194/2550.&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
Er, 294/2550, that is.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774654</guid>
		<pubDate>Fri, 17 Nov 2006 13:32:07 -0800</pubDate>
		<dc:creator>DevilsAdvocate</dc:creator>
	</item><item>
		<title>By: nickmark</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774667</link>	
		<description>That&apos;s amazing.  Not that the probability of a pair is so high, but that treating deals as dependent or independent yields such similar answers.  Is that typical when we have large numbers of possible outcomes and a large variety of &quot;successful&quot; outcomes?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774667</guid>
		<pubDate>Fri, 17 Nov 2006 13:44:39 -0800</pubDate>
		<dc:creator>nickmark</dc:creator>
	</item><item>
		<title>By: JackFlash</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774680</link>	
		<description>As you may have noticed, blue mustard&apos;s calculation matches the three monte carlo simulations, to within three decimal places in one case.&lt;br&gt;
&lt;br&gt;
Blue mustard&apos;s approximation becomes correct as the number of cards in the deck gets larger.  The approximation is poor for a deck of four cards but is very good for a deck of 52 cards.  The reason for this is that the pairs become more like independent probabilities as the size of the deck grows.  If you had an infinite deck they would be truely independent.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774680</guid>
		<pubDate>Fri, 17 Nov 2006 13:55:04 -0800</pubDate>
		<dc:creator>JackFlash</dc:creator>
	</item><item>
		<title>By: beniamino</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#774681</link>	
		<description>The current state of my Monte Carlo simulation is:&lt;br&gt;
&lt;br&gt;
# trials  -------- probability&lt;br&gt;
105690000 0.9545190652&lt;br&gt;
105700000 0.9545192242&lt;br&gt;
105710000 0.9545194211&lt;br&gt;
105720000 0.9545196084&lt;br&gt;
&lt;br&gt;
I don&apos;t have error bars, but the simulation is converging somewhere between 0.95451 and 0.95453.&lt;br&gt;
&lt;br&gt;
That&apos;s in good agreement with DevilsAdvocate&apos;s 0.95452..., and contradicts blue mustard&apos;s 1-(48/51)^51) = 0.95458...&lt;br&gt;
&lt;br&gt;
[Of course, my random numbers may be bad etc etc.]</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-774681</guid>
		<pubDate>Fri, 17 Nov 2006 13:55:11 -0800</pubDate>
		<dc:creator>beniamino</dc:creator>
	</item><item>
		<title>By: edtut</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#775057</link>	
		<description>whats the probability of turning up the first card, and then finding a pair in the deck that matches the value of the first card? i think it is around 0.04</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-775057</guid>
		<pubDate>Sat, 18 Nov 2006 02:28:29 -0800</pubDate>
		<dc:creator>edtut</dc:creator>
	</item><item>
		<title>By: DevilsAdvocate</title>
		<link>http://ask.metafilter.com/51142/What-are-the-odds-of-that#776780</link>	
		<description>&lt;i&gt;whats the probability of turning up the first card, and then finding a pair in the deck that matches the value of the first card?&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
That&apos;s quite a bit easier than the original question.  Although a bit of clarification is required: if the second card matches the first, are you counting that as a pair?  Or do you mean there must be a consecutive pair which matches the value of the first card within the remaining 51 cards?&lt;br&gt;
&lt;br&gt;
There are 51C3 = 20825 ways for the three cards matching the first card to be arranged within the 51 cards.  Of these, 50P2-49 = 2401 ways such that at least two of those three are consecutive.  (Consider condensing the &quot;pair&quot; to a single card, and you now essentially have 2 different cards arranged among 50--unless the three cards are all consecutive (49 ways)--which you&apos;ve just counted twice.)  So if the second card matching the first, in and of itself, does &lt;i&gt;not&lt;/i&gt; constitute a pair, the probability of a pair whose value matches the first card is 2401/20825 = 49/425 = ~0.115.&lt;br&gt;
&lt;br&gt;
If the second card matching the first does count as a pair, there&apos;s an additional 49C2-48 = 1128 ways for that to happen (excluding any with other pairs also present, since we already counted those).  So in that case the probability of a pair matching the initial card is 3529/20825 = ~0.169.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.51142-776780</guid>
		<pubDate>Mon, 20 Nov 2006 10:44:00 -0800</pubDate>
		<dc:creator>DevilsAdvocate</dc:creator>
	</item>
	</channel>
</rss>
