Random [uniform?] sudokus [corrected]

As the discrepancy [from 1] in the sum of the nine probabilities seemed too blatant to be attributed to numerical error given the problem scale, I went and checked my R code for the probabilities and found a choose(9,3) instead of a choose(6,3) in the last line… The fit between the true distribution and the observed frequencies is now much better

but the chi-square test remains suspicious of the uniform assumption (or again of my programming abilities):

> chisq.test(obs,p=pdiag)
Chi-squared test for given probabilities
data:  obs
X-squared = 16.378, df = 6, p-value = 0.01186

since a p-value of 1% is a bit in the far tail of the distribution.

2 Responses to “Random [uniform?] sudokus [corrected]”

  1. […] 9 “diagonals” (obtained by acceptable permutations of rows and column) and this test again results in mostly small p-values. Over a million iterations, and the nine (dependent) diagonals, […]

  2. […] Og an attempt at bloggin, from scratch… « Confusing slice sampler Random [uniform?] sudokus [corrected] […]

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.