Closely matching the probability after many repetitions

I have a conceptual question. Suppose a fair dice with two sides. I suppose that if I roll the dice, say, 2*10^30 times, the results will be extremely close to 10^30 side A and 10^30 side B. Is there a name for the mathematical theorem that shows this? The Law of large numbers is close to what I'm talking about, although not exactly (please correct me if I'm wrong).

• I think the law of large numbers is exactly what explains this. Its stated slightly differently, but having a 50-50 split is the "expected" outcome, and the law of large numbers says we approach the expected outcome. Oct 20, 2021 at 11:33
• Maybe you want an error bound like Berry-Esseen type bound, or Chernoff-type bound for the probability of the tail? Oct 20, 2021 at 11:44
• The Law of Large Numbers not only predicts this but gives you a formula measuring how close "extremely close" is likely to be. The absolute difference between the number of As and the number of Bs actually tends to get larger. The difference as a percentage of the rolls gets smaller. By the way, it's "a fair die", though a die with two sides is usually called a coin. Oct 20, 2021 at 13:15

Let $$(X_n)$$ be a sequence of i.i.d. random variables taking the values 0 or 1 such that $$X_n=1$$ corresponds to getting side A in the $$n$$th coin flip and $$X_n=0$$ corresponds to getting side B. The law of large numbers tells you that $$\frac{1}{N}\sum_{n=1}^N X_n\to\frac{1}{2}$$ almost surely as $$N\to\infty$$. Hence, for large $$N$$ ($$2\cdot10^{30}$$ in your example) you will have that $$1/N\sum_{n=1}^N X_n\approx1/2$$. Note that the sum is precisely the number of times you got side A. Multiplying by $$N$$ we see that this number is approximately $$N/2$$ ($$10^{30}$$ in your example).
• LLN does not tell you $N=2\cdot 10^{30}$ is large enough. It might take $N>10^{10^{30}}$ or even larger instead. Oct 21, 2021 at 15:43
• @user10354138 you are correct. LLN does not describe the speed of convergence. I understood the question more like: "Can this problem be formulated such that LLN gives convergence to the expectation?". For the speed we have e.g. Hoeffding's inequality: $P(|1/2-1/N\sum_{n=1}^N X_n|\geq\epsilon)\leq2\exp(-2N\epsilon^2)$. Oct 22, 2021 at 6:19