Because the number of two by two tables with two row totals equal to 10 is limited, there are only 31 possible values for the chi-squared statistic in this simulation, five of the 36 possible tables having chi-squared = 0.0 and there being one table for which chi-squared is undefined. Because P is recorded to only 3 decimal places, there are even fewer possible values for the probability. Hence the Uniform distribution for P-values should not be valid for chi-squared tests in small samples and it is not. It is not valid for Fisher’s exact either, for the same reason.