From that game, I count
73 rolls total
first quarter is first 18
six 7s in the first 18 rolls
ten 7s in the remaining 55 rolls
.
The above gives 33%, rather than just 32%, for the first quarter.
Nonetheless, something at least that surprising should happen more than 1/6 of the time:
73 rolls total
first quarter is first 18
six 7s in the first 18 rolls
ten 7s in the remaining 55 rolls
.
The above gives 33%, rather than just 32%, for the first quarter.
Nonetheless, something at least that surprising should happen more than 1/6 of the time:
Code: Select all
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.0 (2023-12-25)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> firstquarterhistogram = [binomial(BigInt(18),k)*(BigInt(5)^(BigInt(18)-k)) for k in BigInt(0):BigInt(18)];
julia> restofgamehistogram = [binomial(BigInt(55),k)*(BigInt(5)^(BigInt(55)-k)) for k in BigInt(0):BigInt(55)];
julia> threshold = firstquarterhistogram[1+6]*restofgamehistogram[1+10]
3767624601320462840448044516961090266704559326171875000
julia> sum(Int(firstquarterhistogram[1+j]*restofgamehistogram[1+k] == threshold) for j in 0:18 for k in 0:55)
1
julia> atleastassurprising = BigInt(0)
0
julia> for j in 0:18
for k in 0:55
freq = firstquarterhistogram[1+j]*restofgamehistogram[1+k]
if freq <= threshold
atleastassurprising += freq
end
end
end
julia> sum(firstquarterhistogram[1+j]*restofgamehistogram[1+k] for j in 0:18 for k in 0:55) == BigInt(6)^BigInt(73)
true
julia> atleastassurprising/(BigInt(6)^BigInt(73))
0.169994153873939281438211853063463992876018220596280754624324915524080910904721
julia> typeof(atleastassurprising//(BigInt(6)^BigInt(73)))
Rational{BigInt}
julia> (BigInt(9))//(BigInt(53)) < atleastassurprising//(BigInt(6)^BigInt(73)) < (BigInt(8))//(BigInt(47))
true
julia>