ewjones080
ewjones080
  • Threads: 33
  • Posts: 456
Joined: Feb 22, 2012
April 4th, 2012 at 3:15:51 AM permalink
I don't know what the official name is, or if there even is one, but I learned this bar trick, where you ask somebody to think of two different value cards--suits don't matter--and you tell them you bet those two cards are touching somewhere in the deck of 52.

Example: I'm holding the standard 52 card deck and shuffle em up real good.

Then you pick, say 4 and King.. Then I just start flipping cards over one by one. If we see a 4 and K follows, I win.. If we see a K and a 4 follows I win.. It's said this works well above 50% of the time. I can see how at first it seems pretty incredible, when you see it happen a lot, but then again, you've got 8 cards you're worried about, and without doing some calculation now, maybe dozens of different orientations with which to guess from.

I've tried to think it through using simple statistics, but I think this one needs some advanced formulas thrown on it.

Anybody have an exact % of time this trick should work?
SOOPOO
SOOPOO
  • Threads: 121
  • Posts: 10940
Joined: Aug 8, 2010
April 4th, 2012 at 3:26:04 AM permalink
Around 50%. I cant give you exact because my brain doesn't want to work hard enough, which would require accounting for instances when, say, 3 kings come up in a row, or one of the kings is the first card.
JB
Administrator
JB
  • Threads: 334
  • Posts: 2089
Joined: Oct 14, 2009
April 4th, 2012 at 3:38:05 AM permalink
Is an approximate % good enough? If so, about 48.625%.
PapaChubby
PapaChubby
  • Threads: 11
  • Posts: 495
Joined: Mar 29, 2010
April 4th, 2012 at 4:27:31 AM permalink
I get 47.97%. Am I doing something wrong?

If the chosen cards are 4 and king, there are 8 of these in the deck. For each of these, there are 4 subsequent cards which will win the bet, and 47 which will not. You lose the bet if you hit the 47/51 case 8 times. So...

1 - (47/51)^8 = 47.97%

As far as I can tell, the only condition this doesn't consider is if the 4 or king are the last card in the deck, in which case the first card would need to be considered the next card.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6218
Joined: Jun 22, 2011
April 4th, 2012 at 9:32:20 AM permalink
You have to take into account the number of winning positions based on how each possible way the Kings can appear together in the deck (along with whether they appear at the beginning and/or the end of the deck, and how many groups are separated by one card).

For example, if [ indicates the start of the deck, ] indicates the end of the deck, * indicates one non-K card, and ** indicates two or more non-K cards, here is a partial list of winning positions:
[KKKK - 1
KKKK] - 1
KKKK - 2
[KKK*K - 2
KKK*K] - 2
KKK*K - 3
[KKK**K] - 2
[KKK**K - 3
K**KKK] - 3
K**KKK - 4
[K*KKK - 2
K*KKK] - 2
K*KKK - 3
[K**KKK] - 2
[K**KKK - 3
K**KKK] - 3
K**KKK - 4
then there's KK-KK, KK-K-K, K-KK-K, K-K-KK, and K-K-K-K to count.
(It might be easier to count the number of possible losers, since then you don't have to worry about accidentally counting, say, KKK4K4 twice.)
ewjones080
ewjones080
  • Threads: 33
  • Posts: 456
Joined: Feb 22, 2012
April 4th, 2012 at 11:30:31 AM permalink
Hmm.. three that say around 50%.. I would trust your guys answers before this show where I saw it. They didn't back up with math, they just said it was "well above 50%" which could mean 60%.. Interesting thing is the first four times I did it, it worked 3 times. Yes a small sample, but still seemed amazing.. the next couple times it didn't work, I think it's like 5/8 where it's worked so far. I would trust 50%, but still a little curious it might be more..
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6218
Joined: Jun 22, 2011
April 4th, 2012 at 12:43:23 PM permalink
I wrote up a quick computer program to calculate the result -
For each of the C(52,4) ways that, say, four Aces can be distributed in the deck, the number of "winning locations" for, say, a Deuce is the sum of:
1 if the first Ace is not the first card
1 if there is at least one card between the first and second Aces
1 if there are at least two cards between the first and second Aces
1 if there is at least one card between the second and third Aces
1 if there are at least two cards between second and third Aces
1 if there is at least one card between the third and fourth Aces
1 if there are at least two cards between the third and fourth Aces
1 if the fourth Ace is not the last card
If there are N openings, then fill them first from the remaining 48 cards; of the C(48,N) ways to do this, C(44,N) have no Deuces, so the number of winning combinations for that particular location of Aces is C(48,N) - C(44,N).

A quick crunch of the numbers, and I get 45.19253% wins.
OOPS - that's with a 51-card deck; see below
JB
Administrator
JB
  • Threads: 334
  • Posts: 2089
Joined: Oct 14, 2009
April 4th, 2012 at 12:52:14 PM permalink
Quote: ThatDonGuy

I get 45.19253%


I respectfully disagree...but only because I cheated and wrote a simulator to come up with the result I did. Since you have programming skills, I encourage you to do the same to see if its results are closer to 45.19253% or 48.625%.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6218
Joined: Jun 22, 2011
April 4th, 2012 at 1:01:41 PM permalink
Quote: JB

I respectfully disagree...but only because I cheated and wrote a simulator to come up with the result I did. Since you have programming skills, I encourage you to do the same to see if its results are closer to 45.19253% or 48.625%.


Er...it's 45.12953% if there are only 51 cards in the deck.

With a 52-card deck, it's 48.6279%.

I stand corrected.
JB
Administrator
JB
  • Threads: 334
  • Posts: 2089
Joined: Oct 14, 2009
April 4th, 2012 at 1:02:18 PM permalink
Quote: ThatDonGuy

Er...it's 45.12953% if there are only 51 cards in the deck.

With a 52-card deck, it's 48.6279%.

I stand corrected.


Awesome!
PapaChubby
PapaChubby
  • Threads: 11
  • Posts: 495
Joined: Mar 29, 2010
April 4th, 2012 at 1:05:09 PM permalink
ThatDonGuy,

I'm trying really hard, but I can't figure out what you're up to. There are 4 kings in the deck. Unless a king is the last card in the deck, every king has a card following it. There are 51 other cards in the deck which might be the subsequent card. Either that card is a 4 (4 possibilities out of 51), or not a 4 (47 possibilities out of 51). I don't see that it makes any difference if the card following a king is another king. The ensuing king is just another card in the deck which isn't a 4 as far as the first king is concerned.
PapaChubby
PapaChubby
  • Threads: 11
  • Posts: 495
Joined: Mar 29, 2010
April 4th, 2012 at 1:20:38 PM permalink
Hmm, I guess I still can't tell exactly what you're doing, but I can tell that my approach has a deficiency. Say there are only 3 cards in the deck: 4, 10 and king.

My approach says that the probability that the 4 and king are adjacent is 1 - (1/2)^2 = 3/4. If you offer the possibility of wrap around at the end of the deck, which is included in my approach, there is no way to arrange the cards so that the 4 and king are not adjacent. It is clear that the events that I am considering to be independent really aren't.

If you don't consider the case of wrap around, there are two ways out of 6 to arrange the 3-card deck so that the 4 and king are not adjacent.
AceTwo
AceTwo
  • Threads: 5
  • Posts: 359
Joined: Mar 13, 2012
April 5th, 2012 at 5:34:39 AM permalink
I also get a result of around 48.63%

So the party trick must be something else.
Try the following altenative bets:

1. Use 2 decks
Win around 73.3% of the time

2. Chose 2 cards say K,4. Win for K4, 4K but also for 44 and KK. Ie win also when 2 consecutive are the same (1 deck)
Win around 71.4%

3.As per the original bet described but you win each time the K4, 4K appears. If it appears twice in the deck you win 2 units wheres you lose one if it never appears. (4K4 is dealt as appearing twice)
Win ratio is stil around 48.63% but you can win more than 1 unit.
Ev of around + 10.1%
ewjones080
ewjones080
  • Threads: 33
  • Posts: 456
Joined: Feb 22, 2012
April 5th, 2012 at 12:39:48 PM permalink
So I guess the show was wrong in saying it happens way more than 50%. But I think it's still a neat trick, because intuitively most people would think it only happens 1-5% of the time.
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6218
Joined: Jun 22, 2011
April 6th, 2012 at 7:32:39 AM permalink
For those of you who want a more accurate number, I've worked out the probability as a fraction:

853,868,241 / 1,755,922,350
EdCollins
EdCollins
  • Threads: 20
  • Posts: 1739
Joined: Oct 21, 2011
April 6th, 2012 at 9:07:15 AM permalink
My own 100,000,000 run simulation gave a result of .48627655.

Source code available upon request. :)
s2dbaker
s2dbaker
  • Threads: 51
  • Posts: 3259
Joined: Jun 10, 2010
April 6th, 2012 at 9:12:16 AM permalink
This reminds me of a time when I was in High School and the Math teacher bet us that at least two students in the class shared a birthday (no twins) and she was right.

In a classroom of 30 kids, I calculate 1 - ( ( 365! / 335! ) / ( 365 ^ 30 ) ) = .706312
Someday, joor goin' to see the name of Googie Gomez in lights and joor goin' to say to joorself, "Was that her?" and then joor goin' to answer to joorself, "That was her!" But you know somethin' mister? I was always her yuss nobody knows it! - Googie Gomez
buzzpaff
buzzpaff
  • Threads: 112
  • Posts: 5328
Joined: Mar 8, 2011
April 6th, 2012 at 10:18:16 AM permalink
Quote: JB

Is an approximate % good enough? If so, about 48.625%.



Gee , approximate only to a few 1 thousands ?/ Talk about a WAG

Are you an accountant, by chance? I was on the board of directors of a large company and we were interviewing for a new CFO
Chief Financial Officer. The interview session was of only one question. The candidates were a mathematician, a statistician, and an accountant.

We asked the mathematician " How much is 500 + 500 ? " He said "1,000"

We asked the statistician " How much is 500 + 500 ? " He said "1,000 with 95% certainty."

We hired the accountant because of his perfect answer.

" How much is 500 + 500 ? " He said " How much would you like it to be ??"
puzzlenut
puzzlenut
  • Threads: 9
  • Posts: 71
Joined: Sep 19, 2013
September 22nd, 2013 at 4:58:58 AM permalink
A good challenge. I think the simulation results were pretty close; however here is part of a solution by computation.

I'll leave cards #1 in the deck and remove all four of cards #2. There are four possible configurations of the #1 cards with respect to adjacency: none adjacent, two adjacent, adjacent in pairs, and all adjacent. I'll start with the configuration that none of the cards #1 are adjacent and I think that this is the most likely.

48 cards remain in the deck. If I insert one of the #2 cards in the deck there are 49 places I can insert it, including the top and bottom. Eight of these places will be next to a #1 card and 41 will not, so the probability of missing a #1 card is 41/49.

49 cards are now in the deck. If I insert another of the #2 cards the probability of missing a #1 card is 42/50.

The probability of missing with the 3rd #2 card is 43/51 and the p of missing with the 4th card is 44/52, so the probability of no two of the cards being together is

(41/49)(42/50)(43/51)(44/52) = 0.50143 and the probability that at least one pair will be together is 0.49856

This is according to the assumption that none of the #1 cards are together and is an upper limit. If all four are together the numbers become

(44/49)(45/50)(46/51)(47/52) = 0.65884 or 0.34115 as an unlikely lower limit. For a complete answer we would compute for the two remaining adjacency configurations and calculate an average of them weighted according to their probability. The result should be a little bit less than 0.49856.
Wizard
Administrator
Wizard
  • Threads: 1491
  • Posts: 26434
Joined: Oct 14, 2009
February 15th, 2015 at 8:53:59 PM permalink
Quote: ThatDonGuy

With a 52-card deck, it's 48.6279%.



It took only three years, but I finally got around to solving this problem. It took a recursive program 21.3 minutes to solve and the answer is the same as what TDG got, 48.6279%.

Here is the code



double CardTrick(int x, int y, int cards, int LastCard)
{
if (LastCard==0)
{
if ((cards>=2)&&(x>0)&&(y>0))
return ((double)(cards-x-y)/(double)cards)*CardTrick(x,y,cards-1,0) + ((double)x/(double)cards)*CardTrick(x-1,y,cards-1,1) + ((double)y/(double)cards)*CardTrick(x,y-1,cards-1,2);
else
return 0;
}
else if (LastCard==1)
{
if ((cards>=1)&&(y>0))
return ((double)(cards-x-y)/(double)cards)*CardTrick(x,y,cards-1,0) + ((double)x/(double)cards)*CardTrick(x-1,y,cards-1,1) + ((double)y/(double)cards);
else
return 0;
}
else // (LastCard==2)
{
if ((cards>=1)&&(x>0))
return ((double)(cards-x-y)/(double)cards)*CardTrick(x,y,cards-1,0) + ((double)x/(double)cards) + ((double)y/(double)cards)*CardTrick(x,y-1,cards-1,2);
else
return 0;
}
}



Put into it CardTrick(4,4,52,0);

Intuitively, it seem like it should be less. Fair odds on the "yes" would be +105.64. If you can get someone to give you better, take it.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Greasyjohn
Greasyjohn
  • Threads: 135
  • Posts: 2178
Joined: Dec 8, 2013
February 16th, 2015 at 1:10:57 AM permalink
I don't understand; sorry if I missed something. But I thought the whole point of this bar bet is that the 4 and the king would be next to one another better than 50% of the time. And the answer is that it's 48.62% of the time. Wouldn't you be buying the guy who took the bet a drink more often than he'd be buying you one?
JyBrd0403
JyBrd0403
  • Threads: 12
  • Posts: 548
Joined: Jan 25, 2010
February 16th, 2015 at 1:23:53 AM permalink
Quote: Greasyjohn

I don't understand; sorry if I missed something. But I thought the whole point of this bar bet is that the 4 and the king would be next to one another better than 50% of the time. And the answer is that it's 48.62% of the time. Wouldn't you be buying the guy who took the bet a drink more often than he'd be buying you one?



Not if you ask the guy, "What kind of odds will you give me?"
Greasyjohn
Greasyjohn
  • Threads: 135
  • Posts: 2178
Joined: Dec 8, 2013
February 16th, 2015 at 1:34:39 AM permalink
So the OPs original premise that it worked over 50% of the time is false I guess.
JyBrd0403
JyBrd0403
  • Threads: 12
  • Posts: 548
Joined: Jan 25, 2010
February 16th, 2015 at 1:41:47 AM permalink
Quote: Greasyjohn

So the OPs original premise that it worked over 50% of the time is false I guess.



He just needs to shuffle the deck every time he draws the 3 middle cards, then I'm sure it work out for him. But, that's a different hustle.
Wizard
Administrator
Wizard
  • Threads: 1491
  • Posts: 26434
Joined: Oct 14, 2009
February 16th, 2015 at 8:17:24 AM permalink
Quote: Greasyjohn

I don't understand; sorry if I missed something. But I thought the whole point of this bar bet is that the 4 and the king would be next to one another better than 50% of the time. And the answer is that it's 48.62% of the time. Wouldn't you be buying the guy who took the bet a drink more often than he'd be buying you one?



Yup. That is why you have to bargain for odds. Or, you can ask to remove a couple cards other than the eight in the two chosen ranks.

The probability of success with 51 total cards is 49.3494% and with 50 is 50.0913%.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Romes
Romes
  • Threads: 29
  • Posts: 5600
Joined: Jul 22, 2014
February 16th, 2015 at 9:01:56 AM permalink
Quote: Wizard

Yup. That is why you have to bargain for odds. Or, you can ask to remove a couple cards other than the eight in the two chosen ranks.

The probability of success with 51 total cards is 49.3494% and with 50 is 50.0913%.


I could see someone who's good at slight of hand 'cheating' at this... They shuffle the deck, and put the least likely cards for people to pick (9, at least according to this study: http://www.scientificamerican.com/article/revealing-psychology-playing-card-magic/ ) together on the top/bottom. So if you do pick 9, then they're next to each other. If you don't, then they should 'effectively' be removed by clumping them together at the bottom/top.

Wiz/Don/everyone whom got 48.62%... Say the cards were K and 4, like the OP suggested. Did you count KK or 44 as a win, or strictly K-4 or 4-K? Would putting two 9's on the bottom/top of the deck essentially be the same as removing them, thus 50 cards = 50.0913%?
Playing it correctly means you've already won.
21Flip
21Flip
  • Threads: 17
  • Posts: 94
Joined: Dec 22, 2014
February 16th, 2015 at 1:04:40 PM permalink
Ok... What if you had them pick three cards?

You win if any two of the three cards they pick are touching in the deck.
  • Jump to: