Skip to content
Omnikalc

Bayes factor calculator: how strong is the evidence for a biased coin?

Enter the successes, the trials and the null chance to get the Bayes factor, the posterior chance of the alternative and the exact p-value.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Results

Bayes factor for the alternative (BF₁₀)

2.21

Anecdotal or inconclusive evidence
Bayes factor for the null (BF₀₁)
0.45
Chance that the alternative is true, with equal prior odds
68.9 %
log₁₀ of BF₁₀
0.35
Two-sided p-value (exact binomial test)
0.0210

A p-value says how surprising your data are if nothing is going on, but it does not say how strongly the data support a real effect. The Bayes factor calculator takes the successes, the trials and the null chance, and gives the Bayes factor for the alternative, the Bayes factor for the null, the posterior chance of the alternative, the log₁₀ of the factor and the exact two-sided p-value for comparison.

How the calculation works

  • Enter the number of successes and the number of trials, for example 62 heads in 100 coin tosses.
  • Enter the success chance under the null hypothesis, such as 0.5 for a fair coin.
  • The alternative says that the chance is unknown, with every value from 0 to 1 equally likely beforehand. The Bayes factor BF₁₀ is the probability of the data under the alternative divided by its probability under the null.
  • With a uniform prior, the data probability under the alternative is 1 ÷ (n + 1), so BF₁₀ = (1 ÷ (n + 1)) ÷ (C(n, k) × p₀ᵏ × (1 − p₀)ⁿ⁻ᵏ). A value of 3 to 10 is moderate evidence, and over 10 is strong.

Example

In 100 coin tosses, you see 62 heads. Under a fair coin the exact binomial test gives a two-sided p-value of 0.0210, which is below 0.05. The Bayes factor, with a uniform prior on the chance of heads, is BF₁₀ = 2.21. That is only anecdotal to moderate evidence for a biased coin, with a 68.9 % chance that the coin is biased if you started with equal odds. A p-value near 0.02 does not mean strong evidence, which is why many statisticians prefer Bayes factors.

Why it matters

Putting the Bayes factor next to the p-value reveals how often a result that looks significant is only weak evidence. It also lets you quantify support for the null, which is useful when you want to show that something has no effect. The comparison helps in reading studies with more care.

Good to know

The calculation is for a binomial test with a uniform prior on the success chance under the alternative and a point null. Other models and priors give other values. The posterior chance assumes equal prior odds between the two hypotheses. The exact p-value doubles the smaller tail, a common convention for a two-sided test.

The Bayes theorem calculator updates a probability with new evidence, the p-value calculator converts statistics to p-values, the binomial calculator gives the chance of a number of successes, and the normal approximation calculator estimates binomial chances for large samples.

Frequently asked questions

What is a Bayes factor?

It is the ratio of how well two hypotheses predict the data. A Bayes factor of 5 for the alternative means the data are five times more probable under the alternative than under the null. It tells you how much to update your beliefs: multiply your prior odds by the factor to get the posterior odds.

How does it differ from a p-value?

A p-value is the chance of data at least this extreme if the null is true. It says nothing directly about the alternative. A Bayes factor compares two models and can show evidence for the null, which a p-value cannot. For the same data, a p-value near 0.05 often matches a Bayes factor below 3.

What does the prior mean here?

The alternative here spreads its belief evenly over every chance of success from 0 to 1. This is a common default for a binomial test. Another prior, for instance one centred near the null, would give another Bayes factor, so the result depends on this choice.

How do I read the scale?

A common scale, from Harold Jeffreys, calls 1 to 3 anecdotal, 3 to 10 moderate, 10 to 30 strong, 30 to 100 very strong and above 100 extreme evidence. The same ranges apply in reverse for the null, using 1 divided by the factor. The labels are conventions, not laws.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.