This question has been bugging me for ages: are the dice really fair? So I set out on a method to roll each die several thousand times. The end result is the Dice Roller 3000.
I'm using Lego mindstorms to roll a single die. It then presses my keyboard to trigger the webcam to take a pic.
The 2 motions on the cup motion have a randomized speed. There is a cross beam which also acts as the pivot point in which the die will hit when leaving and entering the neck of the bottle. This is to ensure some level of randomness.
The software I'm using is Adaptive Vision Studio Lite. It's a nice free option and quite powerful. The lite version is limited to 30 minutes program run time, so I do all the processing after the fact. The blue box in the lower left is actually checking for 'rectangularity'. If done right, the die should always reveal a triangle face. On very rare occurrences, I noticed the die was either still bouncing when the camera clicked, or somehow magically landed resting on an edge. In either case, the overall shape turns more rectangley which is easy to check for.
From there, I get a big text file with evade, blank, focus, or error. I throw out the errors, and perform a Chi-square test.
Here are the results so far:
Observed / Expected / Difference
Green01
-----------------------
Evade : 2120 / 2111.625 / 0%
Focus : 1371 / 1407.75 / -3%
Blank : 2140 / 2111.625 / 1%
Total: 5631
P value: 0.50 - fair
Green02
-----------------------
Evade : 2283 / 2301.4 / -1%
Focus : 1550 / 1534.3 / 1%
Blank : 2304 / 2301.4 / 0%
Total: 6137
P value: 0.86 - fair
Green03
-----------------------
Evade : 2583 / 2593.1 / 0%
Focus : 1712 / 1728.8 / -1%
Blank : 2620 / 2593.1 / 0%
Total: 6915
P value: 0.78 - fair
Green04
-----------------------
Evade : 2060 / 1985.6 / 4%
Focus : 1326 / 1323.8 / 0%
Blank : 1909 / 1985.6 / -4%
Total: 5295
P value: 0.057 - unfair
Green05
-----------------------
Evade : 3584 / 3532.5 / 1%
Focus : 2353 / 2355 / 0%
Blank : 3483 / 3532.5 / -1%
Total: 9420
P value: 0.49 - fair
Green06
Evade: 4341 / 4446 / -2%
Focus: 2960 / 2964 / 0%
Blank: 4555 / 4446 / 2%
Total: 11856
P-Value: 0.08
KTreu42's Deformed Die (see page 3)
-----------------------
Evade : 5556 / 5553 / 0.05%
Focus : 3715 / 3702 / 0.34%
Blank : 5538 / 5553 / -0.28%
Total: 14809
P value: 0.957 - fair
Any P value below 0.05 would be considered significant, meaning the die is most likely unfair. Thus any value above 0.05 is considered fair.
Results as I get them.
-edit-
Also, I made some corrections to die 1 and 2. I wrote another script to sort all the blanks, evades, and focus results into their own folders. Then I was able to manually adjust the false identifications quickly. That turns green01 to 0.5, instead of 0.18.
The Blank classification was the default. That and I was having some problems with my rig. Now that I'm sorting though, the results are significantly more accurate.
Green04 added. While technically not below .05, i think based on the other results, we can conclude this one is definitely not balanced. But I'm labeling each die for further testing
Edited by treybert