BBO Discussion Forums: How to calculate the probability of four by 4333 hands - BBO Discussion Forums

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

How to calculate the probability of four by 4333 hands

#1 User is offline   gprentice 

  • PipPip
  • Group: Members
  • Posts: 41
  • Joined: 2023-March-24

Posted 2024-February-13, 01:31

How do you calculate the probability of all four hands in a Bridge deal being 4333 shape.
I asked chatgpt three questions about it here but a friend says it is wrong

chatgpt
0

#2 User is online   smerriman 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 4,027
  • Joined: 2014-March-15
  • Gender:Male

Posted 2024-February-13, 02:38

Choose which player gets the extra spade, heart, diamond, and club respectively in 4! ways.

Then you need to split the 13 spades amongst the players in 13C4 * 9C3 * 6C3 * 3C3 ways, and similarly for the other suits.

That gives 4! * (13C4 * 9C3 * 6C3 * 3C3)^4 = 49965764397515366400000000 bridge deals, out of the 52C13 * 39C13 * 26C13 * 13C13 = 53644737765488792839237440000 possible deals, or about 1 in 1074.
2

#3 User is offline   johnu 

  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 5,030
  • Joined: 2008-September-10
  • Gender:Male

Posted 2024-February-14, 19:55

 gprentice, on 2024-February-13, 01:31, said:

I asked chatgpt three questions about it here but a friend says it is wrong

Attorneys have been sanctioned for quoting cases found by AI chat bots. Turns out the chat bots can and will make up entirely fake facts and present them as results to the user.

When it comes to bridge, you can trust the results but verify twice or more as AI bots just randomly make things up, including to basic math questions like counting high card points, and cards in a hand.
0

#4 User is online   thepossum 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,568
  • Joined: 2018-July-04
  • Gender:Male
  • Location:Australia

Posted 2024-February-15, 18:10

Just wanted to run a sim and compare with smerriman

I got 100000 deals out of 10764626 hands lol - maybe I made a mistake 1 in approx 107.6 but I don't have error bounds lol

Edit only 10000 hands lol. See 1 in 1076 approx lol
Seemed like too much thinking otherwise

I am happy to be close enough without doing it again

Happy to provde the code - maybe I should upload it to github lol

Before being rapped over the knuckles I estimated 1071 with SE of around 0.0025 - could have errors too (and probably underestimates due to lack of weighting) - serious trouble for not even quoting at least one error number - but there are a few areas of error and not just statistical. All far too much work and brain power
0

#5 User is offline   hrothgar 

  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 15,488
  • Joined: 2003-February-13
  • Gender:Male
  • Location:Natick, MA
  • Interests:Travel
    Cooking
    Brewing
    Hiking

Posted 2024-February-16, 07:11

I am lazy, so I threw together a quick sim with Dealer which suggest that the value is about 1 in 1078
https://www.bridgeba...aler/dealer.php

It would be easy enough to either increase the size of the same or, alternatively throw in some confidence bounds

the_hand =

shape(north, any 4333) and
shape(south, any 4333) and
shape(east, any 4333) and
shape(west, any 4333)

action

average(the_hand)

0.0009277
Generated 10000000 hands
Produced 10000000 hands
Initial random seed 1708088976
Time needed 21.601 sec
Alderaan delenda est
0

#6 User is offline   pescetom 

  • PipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 7,905
  • Joined: 2014-February-18
  • Gender:Male
  • Location:Italy

Posted 2024-February-16, 10:42

It would be interesting (but tedious) to manually shuffle, deal and play few thousand hands and see how the odds change.

Or more realistically, analyse a large number of hand records from years gone looking for this layout.

Come to think of it, it would also be interesting (and less tedious) to write a program to simulate manual shuffling (with a profile of skill and diligence) and use that to deal hands.

has anyone ever done any of these? It seems to be widely accepted that manually dealt hands are more likely to be flat, but I don't recall seeing a study to back this up.
0

#7 User is offline   Cascade 

  • PipPipPipPipPipPipPipPip
  • Group: Yellows
  • Posts: 6,765
  • Joined: 2003-July-22
  • Gender:Male
  • Location:New Zealand
  • Interests:Juggling, Unicycling

Posted 2024-February-17, 13:35

 smerriman, on 2024-February-13, 02:38, said:

Choose which player gets the extra spade, heart, diamond, and club respectively in 4! ways.

Then you need to split the 13 spades amongst the players in 13C4 * 9C3 * 6C3 * 3C3 ways, and similarly for the other suits.

That gives 4! * (13C4 * 9C3 * 6C3 * 3C3)^4 = 49965764397515366400000000 bridge deals, out of the 52C13 * 39C13 * 26C13 * 13C13 = 53644737765488792839237440000 possible deals, or about 1 in 1074.


My calculations agree with this number.

I did the calculation with a spreadsheet using the following formula:

=COMBIN(13,A1)*COMBIN(13,B1)*COMBIN(13,C1)*COMBIN(13,D1)*COMBIN(13-A1,E1)*COMBIN(13-B1,F1)*COMBIN(13-C1,G1)*COMBIN(13-D1,H1)*COMBIN(13-A1-E1,I1)*COMBIN(13-B1-F1,J1)*COMBIN(13-C1-G1,K1)*COMBIN(13-D1-H1,L1)

This is the calculation for one specific combination of 4333s. There are 24=4! such combinations and COMBIN(52,13)*COMBIN(39,13)*COMBIN(26,13) total bridge hands.
Wayne Burrows

I believe that the USA currently hold only the World Championship For People Who Still Bid Like Your Auntie Gladys - dburn
dunno how to play 4 card majors - JLOGIC
True but I know Standard American and what better reason could I have for playing Precision? - Hideous Hog
Bidding is an estimation of probabilities SJ Simon

#8 User is offline   pescetom 

  • PipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 7,905
  • Joined: 2014-February-18
  • Gender:Male
  • Location:Italy

Posted 2024-February-17, 13:42

 Cascade, on 2024-February-17, 13:35, said:

My calculations agree with this number.

I did the calculation with a spreadsheet

Much though I admire smerriman, I doubt he did it in his head B-)
1

#9 User is offline   hrothgar 

  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 15,488
  • Joined: 2003-February-13
  • Gender:Male
  • Location:Natick, MA
  • Interests:Travel
    Cooking
    Brewing
    Hiking

Posted 2024-February-17, 17:32

 pescetom, on 2024-February-16, 10:42, said:


Come to think of it, it would also be interesting (and less tedious) to write a program to simulate manual shuffling (with a profile of skill and diligence) and use that to deal hands.

has anyone ever done any of these?


The programming seems trivial.

I suspect that the hard part is getting folks to agree what a good simulation of manual shuffling actually looks like

Lets assume that I start with a brand new deck of cards

I then split the deck down the middle and do a perfect riffle shuffle
Then I walk through the deck.
Look at the position of each card and with X% swap move it up or down the stack by 1-2 positions

I repeat this whole procedure 7-8 time...

This all seems pretty trivial.

The hard part is what happens next.

In the real world, folks are going to bid and play a hand.
And in turn, this is going to impact that ordering of the deck for the next shuffle.

You could have weird harmonics between the a flawed shuffling method and structures in the ways in which the cards are ordered....

It might be interesting to compare the results using this type of shuffling methods using

1. A deck that has been randomized before the shuffle
2. A deck that is structured before the shuffle
Alderaan delenda est
0

#10 User is online   smerriman 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 4,027
  • Joined: 2014-March-15
  • Gender:Male

Posted 2024-February-17, 19:14

It was pretty much done by the original paper which proved that 7 riffle shuffles are needed to sufficiently randomise the deck. Note that this doesn't mean perfect riffle shuffles, as 8 perfect riffle shuffles results in the original order - but specifically simulates the human imperfection factor.

Namely, it's simulated by dividing the pack into two parts - chosen based on a binomial distribution, so averaging somewhere near the middle; then the riffle works by assuming if that at any point you have two packets of size A and B, the probability the next card to drop is from the first pile is A/(A+B).

The paper showed that even with 6 of these shuffles, there were still discernable patterns, and most humans would stop around 3..

The reason it results in flatter deals is for the reason hrothgar mentioned above; after a hand of bridge, you will have large clumps of the same suit in a row, so without sufficient shuffles, there is a nonzero probability you'll still have a partial clump remaining, guaranteeing that suit will be split more evenly among the players than random.
0

#11 User is offline   hrothgar 

  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 15,488
  • Joined: 2003-February-13
  • Gender:Male
  • Location:Natick, MA
  • Interests:Travel
    Cooking
    Brewing
    Hiking

Posted 2024-February-18, 06:02

For anyone who cares, here is one simple approach for hand shape simulations

You treat each suit as a number.

I'm using 1 to represent Clubs, 100 to represent Diamonds...

The shape of a bridge hand would be the sum of 13 such numbers. So a hand with 13 clubs would be represented by the number 13. A hand with 6 clubs and 7 Diamonds would 706.
(Note that I chose the value for each number such that the significant digits will never collide with one another)

Once I have this in place, its very easy to permute the order of the cards and then look at the hand shapes for N/S/E/W.

In turn, this could easily be used to model the impact of various shuffling algorithms and the like...

(FWIW, the reason that it's good to treat suits as numbers is that you can easily vectorize the code and your sims run a whole lot faster)

Results are very close to the expected value

For example, I generated a million hands and 4432 hands were 21.544% of the total. 5332 hands were 15.50164% of the total


setwd("~/Documents/R/")

Spades <- rep(1000000, 13)
Hearts <- rep(10000, 13)
Diamonds <- rep(100, 13)
Clubs <- rep(1, 13)

Suits <- c(Spades, Hearts, Diamonds, Clubs)

sim_length = 10000000

Shapes <- rep(0,sim_length*5)
Shapes <- matrix(Shapes, sim_length, 5)

Temp <- rep(0, 5)

for (i in 1:sim_length)

{

sample_order <- sample(1:52, 52, replace = FALSE)

Shape <- Suits[sample_order]

One_Hand <- sum(Shape[1:13])

for (j in 1:4)

{

Temp[j] <- One_Hand %% 100
One_Hand <- One_Hand / 100
One_Hand <- round(One_Hand, digits = 0)

}

Temp <- sort(Temp, decreasing = TRUE)
Shapes[i,] <-Temp

}

Shapes[,5] <- Shapes[,1] * 1000 + Shapes[,2] * 100 + Shapes[,3] * 10 + Shapes[,4]

table(Shapes[,5])
Alderaan delenda est
0

#12 User is offline   pescetom 

  • PipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 7,905
  • Joined: 2014-February-18
  • Gender:Male
  • Location:Italy

Posted 2024-February-18, 16:02

 smerriman, on 2024-February-17, 19:14, said:

It was pretty much done by the original paper which proved that 7 riffle shuffles are needed to sufficiently randomise the deck. Note that this doesn't mean perfect riffle shuffles, as 8 perfect riffle shuffles results in the original order - but specifically simulates the human imperfection factor.

Namely, it's simulated by dividing the pack into two parts - chosen based on a binomial distribution, so averaging somewhere near the middle; then the riffle works by assuming if that at any point you have two packets of size A and B, the probability the next card to drop is from the first pile is A/(A+B).

The paper showed that even with 6 of these shuffles, there were still discernable patterns, and most humans would stop around 3..

The reason it results in flatter deals is for the reason hrothgar mentioned above; after a hand of bridge, you will have large clumps of the same suit in a row, so without sufficient shuffles, there is a nonzero probability you'll still have a partial clump remaining, guaranteeing that suit will be split more evenly among the players than random.

Thanks, which is the original paper that you refer to?
Manual shuffling is becoming history, but even when we still did it I didn't see that many good riffle shuffles, let alone more than 3 repetitions.
My perception is that the effect of sloppy shuffling was huge and I certainly would hate to return to those deals.
0

#13 User is online   smerriman 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 4,027
  • Joined: 2014-March-15
  • Gender:Male

Posted 2024-February-18, 16:11

This one.
1

#14 User is offline   carl3 

  • PipPip
  • Group: Members
  • Posts: 39
  • Joined: 2019-February-03

Posted 2024-February-28, 09:12

 gprentice, on 2024-February-13, 01:31, said:

How do you calculate the probability of all four hands in a Bridge deal being 4333 shape.
I asked chatgpt three questions about it here but a friend says it is wrong

chatgpt


4 (13o4 13o3 13o3 13o3) (9o3 10o4 10o3 10o3) (6o3 6o3 7o4 7o3) /(52o13 39o13 26o13) = 0,000155 is what I get. (nok=n!/k!(n-k)!) Best! Carl3
0

#15 User is offline   carl3 

  • PipPip
  • Group: Members
  • Posts: 39
  • Joined: 2019-February-03

Posted 2024-February-28, 20:08

 pescetom, on 2024-February-17, 13:42, said:

Much though I admire smerriman, I doubt he did it in his head B-)

4 (13o4 13o3 13o3 13o3) (9o3 10o4 10o3 10o3) (6o3 6o3 7o4 7o3) /(52o13 39o13 26o13) = 0,000155 is what I get. Carl
0

#16 User is offline   carl3 

  • PipPip
  • Group: Members
  • Posts: 39
  • Joined: 2019-February-03

Posted 2024-February-28, 21:18

 Cascade, on 2024-February-17, 13:35, said:

My calculations agree with this number.

I did the calculation with a spreadsheet using the following formula:

=COMBIN(13,A1)*COMBIN(13,B1)*COMBIN(13,C1)*COMBIN(13,D1)*COMBIN(13-A1,E1)*COMBIN(13-B1,F1)*COMBIN(13-C1,G1)*COMBIN(13-D1,H1)*COMBIN(13-A1-E1,I1)*COMBIN(13-B1-F1,J1)*COMBIN(13-C1-G1,K1)*COMBIN(13-D1-H1,L1)

This is the calculation for one specific combination of 4333s. There are 24=4! such combinations and COMBIN(52,13)*COMBIN(39,13)*COMBIN(26,13) total bridge hands.

I get the same result using 4! (13o4 13o3 13o3 13o3) (9o3 10o4 10o3 10o3) (6o3 6o3 7o4 7o3) /(52o13 39o13 26o13) = 0,00093. Carl
0

#17 User is offline   carl3 

  • PipPip
  • Group: Members
  • Posts: 39
  • Joined: 2019-February-03

Posted 2024-February-28, 21:23

 carl3, on 2024-February-28, 20:08, said:

4 (13o4 13o3 13o3 13o3) (9o3 10o4 10o3 10o3) (6o3 6o3 7o4 7o3) /(52o13 39o13 26o13) = 0,000155 is what I get. Carl

Sorry Shoul be 4! (13o4 13o3 13o3 13o3) (9o3 10o4 10o3 10o3) (6o3 6o3 7o4 7o3) /(52o13 39o13 26o13) = 0,00093 that is the same as theother calculation but I think mine is easier to understand.. carl
0

#18 User is offline   carl3 

  • PipPip
  • Group: Members
  • Posts: 39
  • Joined: 2019-February-03

Posted 2024-March-02, 05:07

 smerriman, on 2024-February-13, 02:38, said:

Choose which player gets the extra spade, heart, diamond, and club respectively in 4! ways.

Then you need to split the 13 spades amongst the players in 13C4 * 9C3 * 6C3 * 3C3 ways, and similarly for the other suits.

That gives 4! * (13C4 * 9C3 * 6C3 * 3C3)^4 = 49965764397515366400000000 bridge deals, out of the 52C13 * 39C13 * 26C13 * 13C13 = 53644737765488792839237440000 possible deals, or about 1 in 1074.



4! (13o4 13o3 13o3 13o3) (9o3 10o4 10o3 10o3) (6o3 6o3 7o4 7o3) /(52o13 39o13 26o13) = 0,00093 is what I get. This is the same as your result but I don't understand why. The probabillity the players get 4333 in sp in dealingorder is 13o4 9o3 6o3 3o3/52o13 39o13 26o13 13o13 but this does not take in cosideration that the other suits for each player should be 333. You think you remedy this by raising to the power of 4 but this is not the way it works. Besides why is it only the nominator you have risen to 4? Best regards. Carl 3
0

#19 User is online   smerriman 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 4,027
  • Joined: 2014-March-15
  • Gender:Male

Posted 2024-March-02, 13:27

 carl3, on 2024-March-02, 05:07, said:

4! (13o4 13o3 13o3 13o3) (9o3 10o4 10o3 10o3) (6o3 6o3 7o4 7o3) /(52o13 39o13 26o13) = 0,00093 is what I get. This is the same as your result but I don't understand why. The probabillity the players get 4333 in sp in dealingorder is 13o4 9o3 6o3 3o3/52o13 39o13 26o13 13o13 but this does not take in cosideration that the other suits for each player should be 333. You think you remedy this by raising to the power of 4 but this is not the way it works. Besides why is it only the nominator you have risen to 4? Best regards. Carl 3

There are many different ways to get the same result, depending on which order you make the calculations in. My calculations have them in order of suit, with the 4 card suit first. Yours calculates them in order of player, with the suits in a fixed order.

If you take the first terms from each of your sets of brackets, you get 13C4 * 9C3 * 6C3, which is equivalent to one of my sets of brackets.

If you take the second terms from each of your sets of brackets, you get 13C3 * 10C4 * 6C3, which is again identical to 13C4 * 9C3 * 6C3; it doesn't matter whether you choose to count the 3 first or the 4 first.

And the same for the third and fourth terms.
1

#20 User is offline   carl3 

  • PipPip
  • Group: Members
  • Posts: 39
  • Joined: 2019-February-03

Posted 2024-March-03, 07:42

Ok it seems your calculation is just as ok as mine. Best! Carl
0

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users