On this page
Toss a coin ten times and get seven heads. Is the coin biased towards heads? The two main schools of statistics answer with intervals that look almost the same and mean quite different things. One worked example shows why.
What is the difference between Bayesian and frequentist statistics?
The split is about what the word "probability" is allowed to describe.
Frequentist: probability is the long-run frequency of outcomes in repeated experiments. The coin's true chance of heads, p, is a fixed unknown number, so it has no probability; only the data and the method do.
Bayesian: probability measures how strongly you believe something, given the evidence. Because p is unknown, you describe it with a distribution: a prior before the data, a posterior after.
The Bayesian route is named after Thomas Bayes, whose essay on "a problem in the doctrine of chances" was published after his death, in 1763 (Philosophical Transactions of the Royal Society). If Bayes' theorem is rusty, see a positive test result explained with Bayes' theorem.
What does a 95% confidence interval actually claim?
The frequentist's best single guess is the sample proportion, 7/10 = 0.7, which is also the maximum likelihood estimate (see maximum likelihood estimation with worked examples). The textbook (Wald) interval is 0.7 ± 1.96 × √(0.7 × 0.3 / 10), which gives 0.42 to 0.98.
With only 10 tosses that formula is shaky: a paper in Statistical Science showed that its coverage is erratic and recommended the Wilson or Jeffreys interval for small samples (Brown, Cai and DasGupta, 2001). The "exact" interval of Clopper and Pearson (1934), built directly from binomial probabilities, gives about 0.35 to 0.93.
The 95% belongs to the method: if you repeated "toss 10 times, compute the interval" many times, about 95% of those intervals would contain the true p. For this one interval, 0.35 to 0.93, a frequentist says nothing about the probability that p is inside it. Either it is or it isn't.
In a study of 120 researchers and 442 students in psychology, all six statements about a confidence interval were false, yet both groups endorsed more than three on average, and the researchers hardly outperformed the students (Hoekstra and colleagues, 2014).
What does a Bayesian credible interval claim?
A Bayesian starts with a prior. Suppose you know nothing about the coin, so every value of p from 0 to 1 is equally likely: a flat prior, written Beta(1, 1). Bayes' rule (named after Bayes, 1763) multiplies the prior by the likelihood of the data, p⁷(1 − p)³, and the result is a Beta(8, 4) posterior.
That posterior peaks at 0.7, has mean 8/12 ≈ 0.67, and its central 95% runs from about 0.39 to 0.89. The claim is direct: given this prior and this data, there is a 95% probability that p lies between 0.39 and 0.89.
It also gives the probability that the coin favours heads, p > 0.5: 1 − 232/2048, about 0.89.
How much does the prior matter?
Even a "know nothing" prior is a choice: the Jeffreys interval that Brown, Cai and DasGupta recommend is a Bayesian interval built from a different, U-shaped prior, Beta(½, ½) (Statistical Science, 2001). A weak prior shifts the answer a little; a strong one shifts it a lot.
Suppose you have handled hundreds of ordinary coins and are fairly sure this one is close to fair. Encode that as Beta(50, 50), which acts like having already seen 50 heads and 50 tails. The posterior becomes Beta(57, 53): mean about 0.52, 95% credible interval about 0.43 to 0.61, and the probability that p > 0.5 drops to about 0.65.
Ten tosses cannot overrule that much prior belief. That is sensible if you really know coins and smuggled-in bias if you don't, so a good Bayesian analysis states its prior and tries a reasonable alternative.
When do Bayesian and frequentist answers agree?
They agree when the data swamp the prior. Small samples are where the choice of interval matters most; even among frequentist intervals, the recommended method for small n differs from the one for larger n (Brown, Cai and DasGupta, 2001). Scale the experiment up to 700 heads in 1,000 tosses: the Wald confidence interval and the flat-prior credible interval both come out at about 0.67 to 0.73. Even the strong Beta(50, 50) prior now only nudges the answer, to about 0.65 to 0.71.
The numbers converge; the meanings never do. Use this checklist whenever you meet an interval:
Ask which kind it is: confidence (frequentist) or credible (Bayesian).
For a confidence interval, say: "If we repeated this study many times, 95% of intervals made this way would contain the true value."
For a credible interval, ask which prior was used, and whether a reasonable different prior changes the conclusion.
Check the sample size: small samples are where the methods differ most.
If the binomial or Beta distribution feels shaky, the Fermi Concept Library gives each mathematics concept its own lesson. To practise, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.



