Skip to content

Instantly share code, notes, and snippets.

@knewjade
Last active July 25, 2020 11:17
Show Gist options
  • Save knewjade/51dacfa88d2b38d42cdea47e6853b35f to your computer and use it in GitHub Desktop.
Save knewjade/51dacfa88d2b38d42cdea47e6853b35f to your computer and use it in GitHub Desktop.
N先での勝率近似値 (シミュレーション回数: 1000万回)
# N先での勝率近似値 (シミュレーション回数: 1000万回)
偏りのあるコインをたくさん投げて、どちらが多く出るかカウントする。
* 左の値: コイン表がでる割合 (1試合ごとの勝率)
* 右の値: N先でコイン表が先取する割合 (N先での勝率)
# N=2
50% -> 50.004%
55% -> 57.446%
60% -> 64.785%
65% -> 71.839%
70% -> 78.404%
75% -> 84.378%
80% -> 89.601%
85% -> 93.919%
90% -> 97.202%
95% -> 99.273%
# N=3
50% -> 50.011%
55% -> 59.294%
60% -> 68.251%
65% -> 76.504%
70% -> 83.696%
75% -> 89.653%
80% -> 94.216%
85% -> 97.346%
90% -> 99.147%
95% -> 99.883%
# N=10
50% -> 50.029%
55% -> 67.086%
60% -> 81.383%
65% -> 91.260%
70% -> 96.745%
75% -> 99.113%
80% -> 99.842%
85% -> 99.986%
90% -> 100.000%
# N=30
50% -> 50.004%
55% -> 78.017%
60% -> 94.053%
65% -> 99.105%
70% -> 99.936%
75% -> 99.998%
80% -> 100.000%
# N=50
50% -> 50.022%
55% -> 84.135%
60% -> 97.804%
65% -> 99.890%
70% -> 99.998%
75% -> 100.000%
# N=100
50% -> 50.002%
55% -> 92.156%
60% -> 99.785%
65% -> 99.999%
70% -> 100.000%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment