In a card game, how to check if hand patterns are fair? I'm playing contract bridge and the boards are dealt by a machine. Last time, one of the player suggested the boards are not dealt at random and I want to check that.
At contract bridge, each player receive 13 cards from a deck of 52 cards. It's possible to categorize the hand of a player by its pattern. For instance, a 5-4-3-1 hand is a hand with 5 cards in one suit, 4 cards in another, 3 cards in the third one and just 1 card in the last one. The probabilities to have a specific hand pattern if the distribution is fair are known. For a 5-4-3-1 hand, we have a probability of 12.931%.
Now, I want to design a protocol to check if the distribution is fair or not. My null hypothesis is "the distribution is fair" and my alternative hypothesis is "the distribution is unfair". My question is: is the following protocol sufficient to accept or reject my alternative hypothesis?
I want to use a Z-test for each hand pattern (39 different hand patterns). The idea is to count the frequency of each hand pattern over a sample of n different boards. Bonus question: what minimum value of n should I choose to have a 95% confidence interval?
The problem of the Z-test is I will have 39 different tests. What if some of them accept the alternative hypothesis and some others reject it? How can I sum the results to get a unique result? I would like to be able to say: "I'm sure the board distribution is fair at x percent."
Last point, this protocol just check the hand patterns but I want to do the same verification on the high cards points of each hand. Can I follow the same protocol? What if there are different results?
 A: The challenge here is that your friend's hypothesis is too broad. Actually, any sample could be derived "randomly" or "deterministically". As you say, any particular deal has low likelihood on a "random" hypothesis, and can be "explained" by a sufficiently complicated deterministic hypothesis. 
Is s/he suggesting e.g. that it is an advantage to sit on the left of the mechanical dealer? Then I suggest that you swap hands after every other deal, and keep track of the results. 
Fairness isn't quite the same as randomness, but a simple test of fairness is: how often does hand 1 have more points than hand 2? Other similar ones are: does hand 1 have a void more often that hand 2? The statistics for these are fairly simple.
A: If you know the expected probability of each hand pattern under the null of 'fair distribution', you can use Pearson's chi-squared test to test if your sample is from that distribution. 
You can even create a Monte Carlo test when the observed frequencies are too small and the chi-squared approximation of the null distribution may not be correct.
A: I'd suggest that you have a look at the cusum test. You know the pdf $p(h,\theta)$ where $h$ is any given hand and $\theta$ is the parameters of your pdf $p$. What cusum will help you do is ask the question "given the last $k$ draws, is it more likely that the hands were drawn from some other distribution $p(h,\theta_a)$?".
The cusum test comes from quality control and detection of structural change, and it'll even in the case where your process is mostly fair but sometimes not (rather than unfair all the time).
A: You say "The problem of the Z-test is I will have 39 different tests. What if some of them accept the alternative hypothesis and some others reject it? How can I sum the results to get a unique result?".
If you are neutral about which distributions are more common then they should be, then this is the "false discovery rate" problem. See the paper by Benjamini and Hochberg.
But it seems like your friend believes that "interesting" hands are too common. I suggest that you make an exact definition of "interesting". Then you can compare the observed frequency with the predicted frequency. I suggest also that you do the analysis for only one hand, e.g. the one on the left of the dealer, because otherwise the conditional probabilities get complicated.
