Skip to content
Random Test
Share
Explore

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).
Test
0
Button
Dice1
Dice2
Roll
Doubles
Probability
Actual
1
Roll
5
5
10
427
16.67%
43.00%
2
Roll
4
4
8
57
5.74%
3
Roll
5
5
10
12
1.21%
4
Roll
2
2
4
9
0.91%
5
Roll
6
6
12
20
2.01%
There are no rows in this table
5
Count
Random Results
0
Roll
rCount
Probability
Actual
1
2
72
99.00%
7.25%
2
3
36
5.56%
3.63%
3
4
125
8.33%
12.59%
4
5
77
11.11%
7.75%
5
6
142
13.89%
14.30%
6
7
99
16.67%
9.97%
7
8
116
13.89%
11.68%
8
9
72
11.11%
7.25%
9
10
131
8.33%
13.19%
10
11
33
5.56%
3.32%
11
12
90
2.78%
9.06%
There are no rows in this table
11
Count
993
Sum
196.22%
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 )))
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.