Un'Goro packs in a nutshell

Shuffle your deck 100 or 1000 times using that code. Calculate the mean of a certain card appearing in a certain position, and the standard error . Check if any card is significantly appearing at a certain place.

In this case, you could use a T-test to check for significance. The formula is T = (ObtainedMean - PerfectMean) / (StandardError/( squarerootof(DeckSize))

PerfectMean would be 1/30.

The obtained T number can be checked in a Student T-test table which gives back the probability of your result being common/normal (at the top). (in the table, d.f. is vertical on the left, it is equal to number of cards in your deck - 1 = 29). You have to match your obtained T value to the one in the 29 d.f. row.

Assuming your desired final significance criteria would be 95% (Type I alpha error = 5%), you need to remember to adjust this criteria for the number of repeated tests you are performing.

As there are 30 cards in a deck, you could use a Bonferroni correction and assume that cards in a deck are place independently one from another (that is however not the case, if card A is #5, then card B can definitely not be #5. You would therefore be able to use a Family Wise Error correction, however FWE is difficult to deduce, so for keep this simple, we will use a Bonferroni correction.)

To do the correction, you divide your Type I error by your number of tests: 0.05/30 = 0.00167.

Your T value calculated above should give you an alpha <0.00167, for your result to be statistically significant, i.e. for the code to be biased.

/r/hearthstone Thread Parent Link - assets.amuniversal.com