Can we prove that a fair coin tends to have 50% of relative frequency when number of trials tends to infinity ??

53 Views Asked by At

My first idea that was clear that wouldn't work is to try to prove that the limit of $${{n}\choose{n*p}}* p^{np}*(1-p)^{n - n*p}$$ tends to 1 when n goes to infinity. But it's obvious that it goes to 0 when we think in the plot of the binomial distribution PDF when the n(number of trials) goes to infinity. This was the python code I used to see it going to 0:

import math
from decimal import Decimal

def stirlingFactorial(n:Decimal):
    coeficient = Decimal(math.sqrt(2 * math.pi))*n

    e = Decimal(math.e)

    return coeficient * (n/e)**n

def stirlingCombination(n:Decimal, k:Decimal):
    return stirlingFactorial(n)/(stirlingFactorial(k)*stirlingFactorial(n-k))


def stirlingBinomialProbability(n:Decimal, k:Decimal, p:Decimal):
    return stirlingCombination(n, k)*p**k * (1-p)**(n-k)


n = Decimal(100000)
p = Decimal(0.5)

print(stirlingBinomialProbability(n, n*p, p)) #0.00001595769121605730877792391774

But this made me think: if this doesn't go to 1, why do we trust the assumption that a dice rolled n times, for big values of n, will probably have approximately n/2 successes??

1

There are 1 best solutions below

0
On

This is a very common misconception of the law of large numbers. Think of a coin flip. The geometric mean of $n$ coin flips ($head=1$ and $tail=0$) can be expressed as $\bar{x}_{n}=\frac{\frac{1}{2}n+z_{n}}{n}$ where $z_{n}$ captures the deviation from $50\%$ heads (i.e. the excess number of heads over 50 percent). Then note that $\lim_{n\rightarrow \infty }\bar{x}_{n}=% \frac{1}{2}$ does not require $z_{n}=0$. It merely requires that $% \lim_{n\rightarrow \infty }\frac{z_{n}}{n}=0$.