# Three Million Random Positions in the Quarter Turn and Half Turn Metric

Last year I solved one million random cubes in both the half-turn and the quarter-turn metric. Unformtately, the random number generator I used was good old |drand48()|, which is not of the highest quality. This time, I generated 3,000,000 positions using the Mersenne Twister random number generator and solved all of these with a new faster optimal solver. This is the result:
```    12h 13h 14h  15h   16h    17h     18h    19h     sum
14q   -   1   2    -     -      -       -      -       3
15q   -   4  19   13     -      -       -      -      36
16q   1  11  47  124   126      -       -      -     309
17q   -  10  86  425  1205   1130       -      -    2856
18q   -   8 115  995  5012  13512    5783      -   25425
19q   -   6 106 1627 15638  88727   99345   1392  206841
20q   -   3  69 1958 30113 301047  638444  21050  992684
21q   -   1  19 1104 23151 310101  905366  48942 1288684
22q   -   -   2  152  4629  85334  362467  28922  481506
23q   -   -   -    -     7    141    1246    262    1656
sum   1  44 465 6398 79881 799992 2012651 100568 3000000
```
With this data, we can calculate the observed distribution and a 95% confidence interval on the full set of positions. For the half turn metric, we have:
``` d    observed    conf-low   conf-high      actual
0           0           0  1.2805e-06  2.3120e-20
1           0           0  1.2805e-06  4.1617e-19
2           0           0  1.2805e-06  5.6182e-18
3           0           0  1.2805e-06  7.4910e-17
4           0           0  1.2805e-06  9.9970e-16
5           0           0  1.2805e-06  1.3292e-14
6           0           0  1.2805e-06  1.7614e-13
7           0           0  1.2805e-06  2.3306e-12
8           0           0  1.2805e-06  3.0804e-11
9           0           0  1.2805e-06  4.0684e-10
10           0           0  1.2805e-06  5.3696e-09
11           0           0  1.2805e-06  7.0824e-08
12  3.3333e-07  5.8840e-08  1.8884e-06  9.3347e-07
13  1.4667e-05  1.0926e-05  1.9688e-05  1.2292e-05
14  0.00015500  0.00014154  0.00016974  0.00016160
15  0.0021327   0.0020811   0.0021855   0.0021124
16  0.026627    0.026445    0.026810
17  0.26666     0.26616     0.26716
18  0.67088     0.67035     0.67142
19  0.033523    0.033320    0.033727
20           0           0  1.2805e-06
```
The confidence intervals were calculated using the Wilson score interval. For the quarter turn metric, we have the following results:
``` d    observed    conf-low   conf-high      actual
0           0           0  1.2805e-06  2.3120e-20
1           0           0  1.2805e-06  2.7744e-19
2           0           0  1.2805e-06  2.6357e-18
3           0           0  1.2805e-06  2.4692e-17
4           0           0  1.2805e-06  2.3146e-16
5           0           0  1.2805e-06  2.1696e-15
6           0           0  1.2805e-06  2.0320e-14
7           0           0  1.2805e-06  1.9009e-13
8           0           0  1.2805e-06  1.7766e-12
9           0           0  1.2805e-06  1.6596e-11
10           0           0  1.2805e-06  1.5495e-10
11           0           0  1.2805e-06  1.4462e-09
12           0           0  1.2805e-06  1.3492e-08
13           0           0  1.2805e-06  1.2583e-07
14  1.0000e-06  3.4008e-07  2.9404e-06  1.1729e-06
15  1.2000e-05  8.6683e-06  1.6612e-05  1.0924e-05
16  0.00010300  9.2138e-05  0.00011514  0.00010158
17  0.00095200  0.00091773  0.00098754  0.00093980
18  0.0084750   0.0083719   0.0085794
19  0.068947    0.068661    0.069234
20  0.33089     0.33036     0.33143
21  0.42956     0.42900     0.43012
22  0.16050     0.16009     0.16092
23  0.00055200  0.00052605  0.00057923
24           0           0  1.2805e-06
25           0           0  1.2805e-06
26           0           0  1.2805e-06
```
I stopped the above table at 26, even though it has not yet been proved that there are no positions at distance greater than 26 in the quarter-turn metric.

## Comment viewing options

### Actual values

Might I suggest you also include the actual figures also for the length 14-23 positions in your 3M sample (QTM & HTM). Not many people will be familiar with the Wilson score interval apart from statisticians.

### Sorry it was clear

It was me being blind - I did not see the first table.

### Actual values

The actual figures are given in Table (1). They can also be
inferred by multiplying the observed p-values in Tables (2)
and (3) by the number of samples (three million in this case).

The Wilson score interval is just an improved confidence
interval calculation that is more accurate when the number of
samples or the observed probability is small.

Thank you for your comments; I'm sorry it was not more clear.

### Minor edit

In the last table, for rows 25 and 26, there is an extra "0" in the conf-high column; could the editor possibly remove that? It should look exactly like the row for 24. Thanks!