Fair coin

In probability theory and statistics, a sequence of independent Bernoulli trials with probability 1/2 of success on each trial is metaphorically called a fair coin.

One for which the probability is not 1/2 is called a biased or unfair coin.

John Edmund Kerrich performed experiments in coin flipping and found that a coin made from a wooden disk about the size of a crown and coated on one side with lead landed heads (wooden side up) 679 times out of 1000.

[1] In this experiment the coin was tossed by balancing it on the forefinger, flipping it using the thumb so that it spun through the air for about a foot before landing on a flat cloth spread over a table.

Edwin Thompson Jaynes claimed that when a coin is caught in the hand, instead of being allowed to bounce, the physical bias in the coin is insignificant compared to the method of the toss, where with sufficient practice a coin can be made to land heads 100% of the time.

[2] Exploring the problem of checking whether a coin is fair is a well-established pedagogical tool in teaching statistics.

for tails, the sample space of a coin is defined as:

The event space for a coin includes all sets of outcomes from the sample space which can be assigned a probability, which is the full power set

is the event where neither outcome happens (which is impossible and can therefore be assigned 0 probability), and

is the event where either outcome happens, (which is guaranteed and can be assigned 1 probability).

Because the coin is fair, the possibility of any single outcome is 50-50.

The probability measure is then defined by the function: So the full probability space which defines a fair coin is the triplet

Note that this is not a random variable because heads and tails do not have inherent numerical values like you might find on a fair two-valued die.

A random variable adds the additional structure of assigning a numerical value to each outcome.

The probabilistic and statistical properties of coin-tossing games are often used as examples in both introductory and advanced text books and these are mainly based in assuming that a coin is fair or "ideal".

For example, Feller uses this basis to introduce both the idea of random walks and to develop tests for homogeneity within a sequence of observations by looking at the properties of the runs of identical values within a sequence.

A time-series consisting of the result from tossing a fair coin is called a Bernoulli process.

John von Neumann gave the following procedure:[4] The reason this process produces a fair result is that the probability of getting heads and then tails must be the same as the probability of getting tails and then heads, as the coin is not changing its bias between flips and the two flips are independent.

This works only if getting one result on a trial does not change the bias on subsequent trials, which is the case for most non-malleable coins (but not for processes such as the Pólya urn).

By excluding the events of two heads and two tails by repeating the procedure, the coin flipper is left with the only two remaining outcomes having equivalent probability.

is not hard to calculate, first notice that in step 3 whatever the event

The more biased our coin is, the more likely it is that we will have to perform a greater number of trials before a fair result.

In this section, we provide a simple algorithm[5] that improves the expected number of coin tosses.

The algorithm allows simulating a coin with any probability

Note that the above algorithm does not reach the optimal expected number of coin tosses, which is

There are algorithms that reach this optimal value in expectation.

The above algorithm has an expected number of biased coinflips being

, which is exactly half of the expected flips for von Neumann's approach.

The correctness of the above algorithm is a perfect exercise of conditional expectation.

that represents the expected number of coin tosses before a result is returned.

A fair coin, when tossed, should have an equal chance of landing either side up
Graph of the further away is from the further expected number of flips before a successful result