#Law of Large Numbers
Probability Theory says as number of the trials increases, the average outcome will get closer to the expected average output. source
This code implements 10k of dice rolls and 10k of coin flips and counts the number of occurings and calculates averages for the 10, 100, 1000 and 10k trials.
##Sample output
Count for dice roll occurings 10/100/1K/10K
[1, 2, 2, 1, 1, 3]
[10, 18, 13, 18, 19, 22]
[151, 178, 166, 158, 173, 174]
[1589, 1731, 1650, 1658, 1730, 1642]
Average value for dice rolls 10/100/1K/10K
3.8
3.84
3.546
3.5135
Count for coin flip occurings 10/100/1K/10K
[4, 6]
[52, 48]
[505, 495]
[4997, 5003]
Average value for coin flips 10/100/1K/10K
1.6
1.48
1.495
1.5003