我正在通过阅读几本书并编写一些代码来学习概率和统计数据,并且在模拟硬币翻转时,我发现有些东西使我感到有些惊讶,这与个人的天真直觉有些相反。如果您翻转公平的硬币次首脑尾巴朝着收敛为1的比例增加,正如你所期望的。但在另一方面,由于增加,您似乎不太可能翻转正好相同的头数,而不会翻转尾数,从而获得正好为 1 的比率。
例如(我程序的一些输出)
For 100 flips, it took 27 experiments until we got an exact match (50 HEADS, 50 TAILS)
For 500 flips, it took 27 experiments until we got an exact match (250 HEADS, 250 TAILS)
For 1000 flips, it took 11 experiments until we got an exact match (500 HEADS, 500 TAILS)
For 5000 flips, it took 31 experiments until we got an exact match (2500 HEADS, 2500 TAILS)
For 10000 flips, it took 38 experiments until we got an exact match (5000 HEADS, 5000 TAILS)
For 20000 flips, it took 69 experiments until we got an exact match (10000 HEADS, 10000 TAILS)
For 80000 flips, it took 5 experiments until we got an exact match (40000 HEADS, 40000 TAILS)
For 100000 flips, it took 86 experiments until we got an exact match (50000 HEADS, 50000 TAILS)
For 200000 flips, it took 96 experiments until we got an exact match (100000 HEADS, 100000 TAILS)
For 500000 flips, it took 637 experiments until we got an exact match (250000 HEADS, 250000 TAILS)
For 1000000 flips, it took 3009 experiments until we got an exact match (500000 HEADS, 500000 TAILS)
我的问题是:统计/概率论中是否有解释这一点的概念/原理?如果是这样,那是什么原理/概念?
如果有人对我的生成方式感兴趣,请链接到代码。
-编辑-
对于它的价值,这是我早些时候向自己解释的方式。如果将枚硬币投掷n次并计算正面数,则基本上是在生成随机数。同样,如果您做同样的事情并计算尾数,那么您还将生成一个随机数。因此,如果同时计算两者,则实际上是在生成两个随机数,并且随着变大,随机数也变大。并且,您生成的随机数越大,它们彼此“错失”的机会就越大。有趣的是,这两个数字实际上在某种意义上是相互联系的,它们的比例随着变大而趋向于一个,即使每个数字都是随机的。也许只有我一个人,但是我发现它很整洁。