Random Test
Sign in
Random
I'm simulating the roll of two dice using random() function in the "Roll" button. Many rolls line up with expected probabilities, but the results for 2 and 12 in particular are skewed probably due to the high number of doubles (33% versus 16.67 expected).
AL
Alan Larsen
Test
0
Button
Dice1
Dice2
Roll
Doubles
Probability
Actual
1
Roll
6
4
10
286
16.67%
43.66%
There are no rows in this table
1
Count
Random Results
0
Roll
rCount
Probability
Actual
1
2
36
2.78%
5.50%
2
3
26
5.56%
3.97%
3
4
73
8.33%
11.15%
4
5
61
11.11%
9.31%
5
6
92
13.89%
14.05%
6
7
77
16.67%
11.76%
7
8
69
13.89%
10.53%
8
9
61
11.11%
9.31%
9
10
85
8.33%
12.98%
10
11
25
5.56%
3.82%
11
12
50
2.78%
7.63%
There are no rows in this table
11
Count
655
Sum
100.00%
Sum
100.00%
Sum
*
Yellow
highlight: 20% off expected probabilities.
*
Red
lettering: 40% off expected probabilities (likely due to doubles outside the statistical norm).

More Info:

Here is a link to the doc in Edit mode:

Roll Button Code

RunActions(ModifyRows(thisRow, Test.Dice1, 0,thisRow.Dice1,Ceiling(Random(true)*6)),ModifyRows(thisRow, thisRow.Dice2,0, thisRow.Dice2,Ceiling(Random(true)*6)), ModifyRows(thisRow,thisRow.Roll,thisRow.Dice1 + thisRow.Dice2),ModifyRows([Random Results].Filter(Roll=thisRow.Roll),[Random Results].rCount,[Random Results].Filter(Roll=thisRow.Roll).rCount+1),ModifyRows(thisRow,thisRow.Doubles, If(thisRow.Dice1=thisRow.Dice2, thisRow.Doubles + 1, thisRow.Doubles )))