ArticleslgStudy

mathematics

Checking whether a coin is fair

Checking whether a coin is fair is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Checking whether a coin is fair rather than just read about it. In short: In statistics, the question of checking whether a coin is fair is one whose importance lies, firstly, in providing a simple problem on which to illustrate basic ideas of statistical inference and, secondly, in providing a simple problem that can be used to compare various competing methods of statistical inference, including decision theory. The practical problem of checking whether a coin is fair might be considere…

Checking whether a coin is fair — main illustration
Checking whether a coin is fair — illustration

Key takeaways

  • Checking whether a coin is fair belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Checking whether a coin is fair to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Checking whether a coin is fair from memory before moving on to harder problems.

Reference excerpt

In statistics, the question of checking whether a coin is fair is one whose importance lies, firstly, in providing a simple problem on which to illustrate basic ideas of statistical inference and, secondly, in providing a simple problem that can be used to compare various competing methods of statistical inference, including decision theory. The practical problem of checking whether a coin is fair might be considered as easily solved by performing a sufficiently large number of trials, but statistics and probability theory can provide guidance on two types of question; specifically those of how many trials to undertake and of the accuracy of an estimate of the probability of turning up heads, derived from a given sample of trials. A fair coin is an idealized randomizing device with two states (usually named "heads" and "tails") which are equally likely to occur. It is based on the coin flip used widely in sports and other situations where it is required to give two parties the same chance of winning. Either a specially designed chip or more usually a simple currency coin is used, although the latter might be slightly "unfair" due to an asymmetrical weight distribution, which might cause one state to occur more frequently than the other, giving one party an unfair advantage. So it might be necessary to test experimentally whether the coin is in fact "fair" – that is, whether the probability of the coin's falling on either side when it is tossed is exactly 50%. It is of course impossible to rule out arbitrarily small deviations from fairness such as might be expected to affect only one flip in a lifetime of flipping; also it is always possible for an unfair (or "biased") coin to happen to turn up exactly 10 heads in 20 flips. Therefore, any fairness test must only establish a certain degree of confidence in a certain degree of fairness (a certain maximum bias). In more rigorous terminology, the problem is of determining the parameters of a Bernoulli process, given only a limited sample of Bernoulli trials.

Preamble This article describes experimental procedures for determining whether a coin is fair or unfair. There are many statistical methods for analyzing such an experimental procedure. This article illustrates two of them. Both methods prescribe an experiment (or trial) in which the coin is tossed many times and the result of each toss is recorded. The results can then be analysed statistically to decide whether the coin is "fair" or "probably not fair".

Posterior probability density function, or PDF (Bayesian approach). Initially, the true probability of obtaining a particular side when a coin is tossed is unknown, but the uncertainty is represented by the "prior distribution". The theory of Bayesian inference is used to derive the posterior distribution by combining the prior distribution and the likelihood function which represents the information obtained from the experiment. The probability that this particular coin is a "fair coin" can then be obtained by integrating the PDF of the posterior distribution over the relevant interval that represents all the probabilities that can be counted as "fair" in a practical sense. Estimator of true probability (Frequentist approach). This method assumes that the experimenter can decide to toss the coin any number of times. The experimenter first decides on the level of confidence required and the tolerable margin of error. These parameters determine the minimum number of tosses that must be performed to complete the experiment. For a detailed analysis, see P-value#Testing_the_fairness_of_a_coin and One-_and_two-tailed_tests#Coin_flipping_example. An important difference between these two approaches is that the first approach gives some weight to one's prior experience of tossing coins, while the second does not. The question of how much weight to give to prior experience, depending on the quality (credibility) of that experience, is discussed under credibility theory.

Posterior probability density function One method is to calculate the posterior probability density function of Bayesian probability theory. A test is performed by tossing the coin N times and noting the observed numbers of heads, h, and tails, t. The symbols H and T represent more generalised variables expressing the numbers of heads and tails respectively that might have been observed in the experiment. Thus N = H + T = h + t. Next, let r be the actual probability of obtaining heads in a single toss of the coin. This is the property of the coin which is being investigated. Using Bayes' theorem, the posterior probability density of r conditional on h and t is expressed as follows:

f(r∣H=h,T=t)=Pr⁡(H=h∣r,N=h+t)g(r)∫01Pr⁡(H=h∣p,N=h+t)g(p)dp, where g(r) represents the prior probability density distribution of r, which lies in the range 0 to 1. The prior probability density distribution summarizes what is known about the distribution of r in the absence of any observation. We will assume that the prior distribution of r is uniform over the interval [0, 1]. That is, g(r) = 1. (In practice, it would be more appropriate to assume a prior distribution which is much more heavily weighted in the region around 0.5, to reflect our experience with real coins.) The probability of obtaining h heads in N tosses of a coin with a probability of heads equal to r is given by the binomial distribution:

Pr⁡(H=h∣r,N=h+t)=(Nh)rh(1−r)t. Substituting this into the previous formula:

f(r∣H=h,T=t)=(Nh)rh(1−r)t∫01(Nh)ph(1−p)tdp=rh(1−r)t∫01ph(1−p)tdp. This is in fact a beta distribution (the conjugate prior for the binomial distribution), whose denominator can be expressed in terms of the beta function:

f(r∣H=h,T=t)=1B(h+1,t+1)rh(1−r)t. As a uniform prior distribution has been assumed, and because h and t are integers, this can also be written in terms of factorials:

f(r∣H=h,T=t)=(h+t+1)!h!t!rh(1−r)t.

Example For example, let N = 10, h = 7, i.e. the coin is tossed 10 times and 7 heads are obtained:

f(r∣H=7,T=3)=(10+1)!7!3!r7(1−r)3=1320r7(1−r)3. The graph on the right shows the probability density function of r given that 7 heads were obtained in 10 tosses. (Note: r is the probability of obtaining heads when tossing the same coin once.)

The probability for an unbiased coin (defined for this purpose as one whose probability of coming down heads is somewhere between 45% and 55%)

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Checking whether a coin is fair

Start with the simplest possible case. Write down what Checking whether a coin is fair claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Checking whether a coin is fair before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Checking whether a coin is fair ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Checking whether a coin is fair

In research
Checking whether a coin is fair appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Checking whether a coin is fair in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Checking whether a coin is fair is common in secondary-school and first-year university syllabi. It links to neighbouring topics Bayesian inference, Coin flipping, Experiments, so understanding it makes those chapters shorter.
In everyday life
Look for Checking whether a coin is fair outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Checking whether a coin is fair” →

How to study Checking whether a coin is fair in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Checking whether a coin is fair means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Checking whether a coin is fair out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Checking whether a coin is fair in simple terms?

In statistics, the question of checking whether a coin is fair is one whose importance lies, firstly, in providing a simple problem on which to illustrate basic ideas of statistical inference and, secondly, in providing a simple problem that can be used to compare various competing methods of stati…

Why does Checking whether a coin is fair matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Checking whether a coin is fair?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Checking whether a coin is fair.

Tags

  • Bayesian inference
  • Coin flipping
  • Experiments
  • Statistical hypothesis testing

Keep exploring