Is the coin fair or unfair?

A coin is thrown 1000 times, resulting in 560 heads and 440 tails. The fact, that the result "heads" appears much more frequent, arouses the suspicion, that the coin is unfair and the two sides of the coin do not have the same probability p = q = 1 2 p = q = \frac{1}{2} . Is this suspicion justified, or is the bias for "heads" not significant?

The coin is unfair with a probability bordering on certainty. The result indicate, that the coin is probably unfair, but a clear statement is not possible. The result can be justified by the statistical distribution of a fair coin

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Markus Michelmann
Mar 15, 2018

We assume, that both sides of the coin appear with the same probability p = 1 p = 1 2 p = 1 - p = \frac{1}{2} . The probability P n ( k ) P_n(k) of having exactly k k times tails (or heads) for an total number n = 1000 n = 1000 of throws is given by a binomial distribution

P n ( k ) = ( n k ) p k ( 1 p ) n k = n ! k ! ( n k ) ! 1 2 n P_n(k) = {n \choose k} p^k (1 - p)^{n - k} = \frac{n!}{k! (n - k)!} \frac{1}{2^n}

The mean value μ \mu and the root mean square σ \sigma (RMS) results to μ = k = 1 2 n = 500 σ = ( k k ) 2 = 1 2 n 15.8 \begin{aligned} \mu &= \langle k \rangle = \frac{1}{2} n = 500\\ \sigma &= \sqrt{\langle (k - \langle k \rangle)^2 \rangle} = \frac{1}{2} \sqrt{n} \approx 15.8 \end{aligned} The result k = 440 μ 3.8 σ k = 440 \approx \mu - 3.8 \cdot \sigma is almost 4 standard deviations away from the mean value and therefore extremly unlikely. To be more precise, we calculate the probability P n ( k 440 ) P_n(k \leq 440) , that k k assumes a value in the interval [ 0 , 440 ] [0, 440] . We use the fact, that the discrete binomial distribution can be approximated by the continuous normal distribution with the same mean value and RMS for n 1 n \gg 1 (central limit theorem)

P n ( k 440 ) = k = 0 440 ( n k ) p k ( 1 p ) n k 0 440 1 2 π σ exp ( ( x μ ) 2 2 σ 2 ) d x = 1 2 [ 1 + erf ( 440 μ 2 σ ) ] 7 1 0 5 = 0.007 % \begin{aligned} P_n(k \leq 440) &= \sum_{k = 0}^{440} {n \choose k} p^k (1 - p)^{n - k} \\ &\approx \int_{0}^{440} \frac{1}{\sqrt{2 \pi} \sigma} \exp \left(- \frac{(x - \mu)^2}{2 \sigma^2} \right) dx\\ &= \frac{1}{2} \left[ 1 + \text{erf} \left(\frac{440 - \mu}{\sqrt{2} \sigma } \right) \right]\\ &\approx 7 \cdot 10^{-5} = 0.007 \,\% \end{aligned} where erf ( x ) \text{erf}(x) denotes the error function. Thus, such a significant difference between "heads" and "tails" occurs only in one out of every 14,000 cases for a fair coin. With a probability bordering to certainty, we can say, that this coin is unfair.

In this day and age, pretty standard hand-held calculators can be used to find P [ X 560 ] = 0.0000825249 P[X \ge 560] \; = \; 0.0000825249 for X B ( 1000 , 0.5 ) X \sim B(1000,0.5) directly, without reference to the Normal approximation.

Mark Hennings - 3 years, 2 months ago

Using R:

binom.test(560,1000,0.5,alternative="g")

    Exact binomial test

data: 560 and 1000 number of successes = 560, number of trials = 1000, p-value = 8.252e-05 alternative hypothesis: true probability of success is greater than 0.5 95 percent confidence interval: 0.5335741 1.0000000 sample estimates: probability of success 0.56

p a - 3 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...