Seven-sided dice from five-sided dice: Difference between revisions
Content added Content deleted
m (→{{header|jq}}: statistic) |
|||
Line 1,234: | Line 1,234: | ||
| [histogram( limit($n; repeat(dice)) ) | last] |
| [histogram( limit($n; repeat(dice)) ) | last] |
||
| chiSquared($n/7) as $x2 |
| chiSquared($n/7) as $x2 |
||
| "The χ2 |
| "The χ2 statistic for a trial of \($n) virtual tosses is \($x2).", |
||
"Using a two-sided χ2-test with seven degrees of freedom (\($lower), \($upper)), it is reasonable to conclude that", |
"Using a two-sided χ2-test with seven degrees of freedom (\($lower), \($upper)), it is reasonable to conclude that", |
||
(if $x2 < $lower then "this is lower than would be expected for a fair die." |
(if $x2 < $lower then "this is lower than would be expected for a fair die." |
||
Line 1,254: | Line 1,254: | ||
Low-entropy die results: |
Low-entropy die results: |
||
["DEBUG:",[19,14,6,18,7,5,1]] |
["DEBUG:",[19,14,6,18,7,5,1]] |
||
The χ2 |
The χ2 statistic for a trial of 70 virtual tosses is 29.2. |
||
Using a two-sided χ2-test with six degrees of freedom (1.69, 16.013), it is reasonable to conclude that |
Using a two-sided χ2-test with six degrees of freedom (1.69, 16.013), it is reasonable to conclude that |
||
this is higher than would be expected for a fair die. |
this is higher than would be expected for a fair die. |
||
Line 1,260: | Line 1,260: | ||
High0entropy die results: |
High0entropy die results: |
||
["DEBUG:",[9,11,9,10,15,11,5]] |
["DEBUG:",[9,11,9,10,15,11,5]] |
||
The χ2 |
The χ2 statistic for a trial of 70 virtual tosses is 5.4. |
||
Using a two-sided χ2-test with six degrees of freedom (1.69, 16.013), it is reasonable to conclude that |
Using a two-sided χ2-test with six degrees of freedom (1.69, 16.013), it is reasonable to conclude that |
||
this is consistent with the die being fair. |
this is consistent with the die being fair. |