No high cards for me
#1
Posted 2005-April-15, 13:57
is there a simple way of measuring the randomness of our hands using the hands i have in the myhands DB ? we have about a month of twos worth of hands there.
#2
Posted 2005-April-15, 14:04
In local clubs people complain when their side doesn't have "cards" so many clubs use an evil feature in some dealers to "balance" the HCP between NS and EW. This leads to real horrible things like counting how many HCP your side and their side has received and know what to expect in the last hands of the tourney or match.
So as long as you trust the way you deal please don't do anything.
#3
Posted 2005-April-15, 14:42
Agree with Luis. If you trust your dealing method, don't worry. And if the random generator is a given, making a fair dealer is trivial and I'm sure you have gotten that right.
However although a random generator with period 2^31 which is standard but insufficient, it won't give anyone bad cards. All statistics still work, just some hands will never be dealt, but the statistics will look the same.
#4
Posted 2005-April-15, 14:42
Calculate the average and standard deviation for HCP and length of each suit per each seat and user. Averages for HCP and length should, of course, be close to 10 and 4.
I would probably whip up a script to get the data like the chart below and possibly throw it into excel for filtering or additional calculations, maybe the average and standard deviation of the deviations would be interesting.
---------------------------------------------------------------
| user | HCP | Spade Len | ...
| | avg | std | avg | std | ...
---------------------------------------------------------------
| North | 10 | .5 | 4 | .5 |
| BestG | 10 | .5 | 4 | .5 |
---------------------------------------------------------------
Out of curiosity, how is the myhands db stored? Flat file or some relational db?
Edit: I agree, this is probably pointless. I'd only do it for a visual aid to those who are complaining
#5
Posted 2005-April-15, 14:50
We store the Movie strings, one record per play.
#6
Posted 2005-April-15, 15:09
Ben
#7
Posted 2005-April-15, 17:36
I'll try and post something over the weekend but I'm tired right now. It can be done.
Dean
#8
Posted 2005-April-15, 17:41
#9
Posted 2005-April-15, 18:13
What you are looking for is either a "T-Test" or a "Z-Test". The primary difference is related to the number of observations that you have handy.
The easiest way to proceed is to perform a "One Sample T-Test" and analyze whether the average HCPs held by the user is statistically different from 10.
If you wanted to be a little more fancy, you could use a "Paired T-Test" to examine whether the distribution of HCP dealt to the user was statistically different from the distribution of HCPs...
You can find a variety of we sites that provide specific information regarding how these tests can be constructed...
The following site has a decent write-up...
http://pluto.fss.buffalo.edu/classes/psy/s...s/t-tests1.html
The second web site is probably a bit more practical
http://www.georgetown.edu/departments/psyc...ntial/ztest.htm
If you'd like, I'd be willing to run the numbers sometime over the weekend.
#10
Posted 2005-April-15, 18:39
A few good links
One
Two
Three
Four
#11
Posted 2005-April-16, 03:01
There are some papers out there explaning the excact problem. In short:
If you look at the number of possible deals and the number range e.g. of an INT it gets obvious that there are more deals than different numbers you can generate.
There are bridge dealing programms, that use random number generators, using the big numbers.
Some simlpe checks your dealing process should fullfill.
Each N,E,S and W should have an average of 10 hcp.
Each NS and EW should have a combined average of 20 hcp.
The average suit length per player should be 3.25 .
You can check the distribution of hand patterns, and the distribution of hcp.
The values you should get are e.g. listed here.
If the distribution of hcp, and hand patterns of a few thousand deals is very close to that, it can't be that bad.
If you have lin-files stored in your db, it is probably easyer to gain the data from the deal subroutine directly.
#12
Posted 2005-April-16, 03:17
#13
Posted 2005-April-16, 04:52
4432, 4333, 5332, ... about matches, what it should match, and
if the hcp averages match what they should match and
if all suites have an average length of 3.25,
than we know this poor player suffers from bad luck.
If you don't get these averages then you know, something is wrong.
It does not mean that the dealing mechanishm is perfect, we might be playing only a small fraction of possible deals.
But as long as we do not recognize the deals again, and as long everybody has the same chance to get a winning hand, who cares if it's not all.
It is possible that, if the next deal is not indipendant from the one before, you get series of boards of a special type.
If you have e.g. a hand with 7+ cards in a suit, the next deal you hold 6+ cards from that suit and at the 3rd deal you still have 5+ cards of the suit. This could be a freak of luck, but also a flaw in randomised dealing.
This type of flaw is not detectable by simple averages on big numbers of boards. To detect this you need to do look on groups of smaller subsets, and look if they behave as expected.
#14
Posted 2005-April-16, 05:32
hotShot, on Apr 16 2005, 01:52 PM, said:
4432, 4333, 5332, ... about matches, what it should match, and
if the hcp averages match what they should match and
if all suites have an average length of 3.25,
than we know this poor player suffers from bad luck.
If you don't get these averages then you know, something is wrong.
It does not mean that the dealing mechanishm is perfect, we might be playing only a small fraction of possible deals.
But as long as we do not recognize the deals again, and as long everybody has the same chance to get a winning hand, who cares if it's not all.
It is possible that, if the next deal is not indipendant from the one before, you get series of boards of a special type.
If you have e.g. a hand with 7+ cards in a suit, the next deal you hold 6+ cards from that suit and at the 3rd deal you still have 5+ cards of the suit. This could be a freak of luck, but also a flaw in randomised dealing.
This type of flaw is not detectable by simple averages on big numbers of boards. To detect this you need to do look on groups of smaller subsets, and look if they behave as expected.
As a number of folks have noted, there are a wide number of ways in which a "dealing" program can go wrong. Equally significant, there are appropriate statistical tests that can be used to detect ANY problem (given a large enough sample size)...
Case in point: Hotshot brings up the example that data might be auto-correlated. This can be easily determined using a Durbin-Watson test. [If anyone cares, see http://www.statsdirect.com/help/regression...lation/mreg.htm] In a similiar fashion, Knuth v2 provides a number of tests that can be used to validate the pseduo random number generator.
However, even though it IS possible to to run 1001 tests on BBO's Dealer, this doesn't mean that it it desirable to do so. [I readily admit that I've had a couple questions about BBO's Dealer. In particular, the frequency of NAMYATS type hands has always seemed high]
From my perspective, the best course of action consists is a "top-level" validation of the both the Dealing algorithm and the (pseudo) random number generator. Inspect the algoithms themselves looking for common implementation errors. An even easier option is to simple make use of a third party algorithm that has already been vetted.
Once this has been done, all you need to worry about is a "simple" test to fend off the cranks...
#15
Posted 2005-April-16, 05:44
#16
Posted 2005-April-16, 06:03
uday, on Apr 15 2005, 07:57 PM, said:
If I had a pard issuing such silly complaints, I would be happy when he/she does not get high cards, because I would be frightened at the idea of what he/she would do if getting indeed the right share of honor points.....
So perhaps the (real? imaginary?) bias of your dealer is actually protecting her from herself ??
#17
Posted 2005-April-16, 06:20
Deanrover, on Apr 16 2005, 02:44 PM, said:
Its been a LONG time since I was doing "serious" Econometrics. I have no idea what the state of the art is these days...
Regardless. If we really want to, we can test for this
#18
Posted 2005-April-16, 19:10
Translation into English:
If this woman's complaint was true, one of the reason might be that the number of HCP you get in one hand is related to that in previous hands. This is known as auto-correlation. The Durbin-Watson test will see whether the number of HCP you get is related in any way to the number of HCP you got in the previous hand. However, if it was related to the number of HCP 2 hands ago, 3 hands ago etc. then D-W would not pick it up. B-G would.
#19
Posted 2005-April-17, 16:10
And let me guess - all the contracts were played by her left hand opponent so not only did she never get to play a hand, but her partner was always on lead too.

Help
