The mathematical foundation of coin flip probability rests on combinatorics, binomial distribution theory, and advanced statistical concepts that provide precise analytical tools for complex probability scenarios.
Binomial Coefficient Derivation:
The binomial coefficient C(n,k) = n! / (k!(n-k)!) represents the number of ways to choose k items from n items without regard to order. In coin flips, this counts the number of sequences with exactly k heads in n flips.
For example, C(4,2) = 4!/(2!2!) = 6 represents the six ways to get exactly 2 heads in 4 flips: HHTT, HTHT, HTTH, THHT, THTH, TTHH.
The complete binomial probability formula P(X = k) = C(n,k) × (0.5)^n accounts for both the number of favorable sequences and the probability of each specific sequence occurring.
Normal Approximation for Large Samples:
When n is large (typically n > 30), the binomial distribution approximates a normal distribution with mean μ = np and variance σ² = np(1-p). For fair coins, μ = n/2 and σ² = n/4.
This approximation uses the Central Limit Theorem and allows for efficient calculation of probabilities using z-scores: Z = (X - μ)/σ, where X is the number of heads observed.
Continuity correction improves approximation accuracy by treating discrete values as continuous: P(X = k) ≈ P(k-0.5 < X < k+0.5) in the normal distribution.
Advanced Probability Calculations:
Cumulative probabilities P(X ≤ k) require summing individual probabilities: P(X ≤ k) = Σ(i=0 to k) C(n,i) × (0.5)^n. For large n, this becomes computationally intensive without normal approximation.
Tail probabilities P(X ≥ k) = 1 - P(X ≤ k-1) often provide more efficient calculation paths, especially when k is close to n.
Confidence intervals for the true probability p can be constructed using the observed proportion p̂ = X/n and the standard error SE = √(p̂(1-p̂)/n), providing bounds for the actual coin bias.
Statistical Hypothesis Testing:
Testing coin fairness involves null hypothesis H₀: p = 0.5 against alternative H₁: p ≠ 0.5. The test statistic Z = (p̂ - 0.5)/√(0.25/n) follows a standard normal distribution under H₀.
Critical values depend on chosen significance level α (commonly 0.05), with rejection regions determined by |Z| > Z{α/2}, where Z{0.025} ≈ 1.96 for α = 0.05.