Calcolatore Teorema di Bayes
Applica il teorema di Bayes per aggiornare la probabilità di un'ipotesi in base a nuove evidenze.
P(A|B) - Posterior
0.153846
P(A|B) - Posterior vs P(A) - Prior
Formula
How to Apply Bayes' Theorem
Formula
P(A where P(B) = P(B Bayes' theorem updates a prior belief P(A) after observing evidence B. The likelihood P(B A) measures how probable the evidence is if A is true. The denominator P(B) normalizes the result.B) = P(B A) * P(A) / P(B) A)*P(A) + P(B not A)*P(not A)
Esempio Risolto
A disease affects 1% of the population. A test is 90% sensitive and has a 5% false positive rate. If someone tests positive, what is the probability they have the disease?
- 01P(A) = 0.01 (prior: disease prevalence)
- 02P(B|A) = 0.9 (sensitivity)
- 03P(B|not A) = 0.05 (false positive rate)
- 04P(B) = 0.9 * 0.01 + 0.05 * 0.99 = 0.009 + 0.0495 = 0.0585
- 05P(A|B) = (0.9 * 0.01) / 0.0585 = 0.009 / 0.0585 ≈ 0.1538
- 06Despite a positive test, there is only about a 15.4% chance of having the disease.
Domande Frequenti
Why is the posterior so low even with a good test?
When the prior probability is very low (rare disease), most positive results come from the large number of healthy people who test false-positive. This is called the base-rate fallacy.
What is the difference between prior and posterior?
The prior P(A) is your initial belief before seeing evidence. The posterior P(A|B) is the updated belief after incorporating the evidence B via Bayes' theorem.
Can Bayes' theorem be applied sequentially?
Yes. The posterior from one update becomes the prior for the next update. This sequential updating is the foundation of Bayesian inference.
Impara