@@ -7,7 +7,8 @@ def outcome_of_rolling_n_sided_dice_k_time(n_side: int, k_time: int) -> list:
7
7
This function returns a list. The first element is an array.
8
8
That array contains indexes.
9
9
The second element is another array.
10
- That array contains probabilities for each index value.
10
+ That array contains probabilities for getting each index values
11
+ as the sum of obtained side values.
11
12
12
13
Algorithm Explanation:
13
14
@@ -47,8 +48,6 @@ def outcome_of_rolling_n_sided_dice_k_time(n_side: int, k_time: int) -> list:
47
48
with the sum. The same sum can come in many combinations.
48
49
Finding all of those combinations and applying Bernoulli
49
50
is more computationally extensive.
50
- c) The algorithm can be used in playing games where the sum of
51
- multiple dice throwing is needed.
52
51
53
52
I used that method in my paper to draw the distribution
54
53
Titled: Uncertainty-aware Decisions in Cloud Computing:
@@ -75,12 +74,12 @@ def outcome_of_rolling_n_sided_dice_k_time(n_side: int, k_time: int) -> list:
75
74
>>> outcome_of_rolling_n_sided_dice_k_time(4,2)
76
75
[range(2, 9),
77
76
array([0.0625, 0.125 , 0.1875, 0.25 , 0.1875, 0.125 , 0.0625])]
78
- >>> outcome_of_rolling_n_sided_dice_k_time (6,2)
77
+ >>> probability_of_n_heads_in_m_tossing (6,2)
79
78
[range(2, 13),
80
79
array([0.02777778, 0.05555556, 0.08333333, 0.11111111, 0.13888889,
81
80
0.16666667, 0.13888889, 0.11111111, 0.08333333, 0.05555556,
82
81
0.02777778])]
83
- >>> outcome_of_rolling_n_sided_dice_k_time(6 ,3)
82
+ >>> probability_of_n_heads_in_m_tossing(2 ,3)
84
83
[range(3, 19),
85
84
array([0.00462963, 0.01388889, 0.02777778, 0.0462963 , 0.06944444,
86
85
0.09722222, 0.11574074, 0.125 , 0.125 , 0.11574074,
0 commit comments