Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Bayes Theorem is a rule for updating probabilities when new evidence appears. It connects what you believed before seeing the evidence to what you should believe after seeing it. This idea matters in medicine, machine learning, weather forecasting, and everyday decision making.

It helps students move beyond guessing and toward reasoning with conditional probability.

The theorem combines three pieces: a prior probability, a likelihood, and the overall probability of the evidence. In symbols, P(AB)=P(BA)P(A)P(B)P(A|B) = \frac{P(B|A)P(A)}{P(B)}. The numerator measures how well hypothesis AA explains evidence BB, while the denominator rescales the result so the final probability stays between 00 and 11.

A common application is interpreting test results, where the chance of actually having a condition depends not only on the test accuracy but also on how common the condition is.

Understanding Bayes Theorem

A useful way to understand Bayesian reasoning is to imagine a large group instead of starting with a formula. Suppose one thousand people are screened for a disease that affects ten of them. A test may correctly flag nine of those ten people.

It may also give a positive result for some healthy people. If twenty healthy people receive a false positive, there are twenty nine positive results in total. Only nine belong to people with the disease.

A positive result therefore gives a chance of nine out of twenty nine, not nine out of ten. The test can be very good at detecting disease while a single positive result is still far from certain.

This example exposes a common error called reversing a conditional probability. The chance that a test is positive when a person has a disease is not the same as the chance that a person has the disease when the test is positive. The first statement starts with known patients.

The second starts with everyone who tested positive. These groups have different sizes. Drawing a two by two table helps keep the groups separate.

Put disease and no disease in the rows. Put positive and negative test results in the columns. Fill the four cells with counts before turning them into probabilities.

Bayesian updating can happen more than once. A doctor might combine a screening result with symptoms, family history, and a second test. Each item of evidence can shift the estimate.

This process needs care because evidence is not always independent. Fever and a cough, for example, may both come from the same illness, so treating them as fully separate clues can count similar information twice. Spam filters face a similar issue.

Words such as free, prize, and urgent often appear together in unwanted messages. A filter learns from many examples, but it must avoid treating every related word as completely new proof.

In real decisions, probabilities support judgement rather than replace it. A weather forecast may be updated using radar data, air pressure, and recent model results. A student can use the same habit when checking a claim online.

Start by considering how plausible the claim was before seeing a headline. Then ask how likely that headline or source would be if the claim were true, compared with if it were false. Pay close attention to the reference group, the base rate, and the reliability of the evidence.

These details often matter more than an impressive percentage. Clear reasoning means stating assumptions, using counts when possible, and accepting that an updated belief can still contain uncertainty.

Key Facts

  • Bayes Theorem: P(AB)=P(BA)P(A)P(B)P(A|B) = \frac{P(B|A)P(A)}{P(B)}
  • Conditional probability: P(AB)=P(A and B)P(B)P(A|B) = \frac{P(A \text{ and } B)}{P(B)}, for P(B)>0P(B) > 0
  • Evidence can be expanded as P(B)=P(BA)P(A)+P(Bnot A)P(not A)P(B) = P(B|A)P(A) + P(B|\text{not } A)P(\text{not } A)
  • Posterior = likelihood ×\times prior / evidence
  • If AA and BB are independent, then P(AB)=P(A)P(A|B) = P(A), so observing BB does not change belief about AA
  • Base rate matters: a rare event can still have a low posterior probability even after a positive test

Vocabulary

Prior probability
The probability assigned to a hypothesis before new evidence is observed.
Posterior probability
The updated probability of a hypothesis after taking the evidence into account.
Likelihood
The probability of observing the evidence if a particular hypothesis is true.
Conditional probability
The probability of one event occurring given that another event has already occurred.
Base rate
The overall frequency or prevalence of an event in the population before considering specific evidence.

Common Mistakes to Avoid

  • Confusing P(A|B) with P(B|A), because these probabilities describe different conditions and are usually not equal. Always read the condition after the vertical bar carefully.
  • Ignoring the base rate, which leads students to overestimate the chance that a positive result means the hypothesis is true. The prior probability must be included in the calculation.
  • Forgetting to compute P(B), because the denominator is needed to normalize the result into a valid probability. Use all ways the evidence could happen, not just the favored hypothesis.
  • Using percentages and decimals inconsistently, because mixing forms can cause arithmetic errors. Convert all values to the same form before substituting into the formula.

Practice Questions

  1. 1 A disease affects 2% of a population. A test is positive 95% of the time when a person has the disease and 8% of the time when a person does not have it. If a person tests positive, what is the probability that the person actually has the disease?
  2. 2 A factory makes 60% of its parts on Machine A and 40% on Machine B. Machine A produces defective parts 3% of the time, and Machine B produces defective parts 6% of the time. If a randomly chosen part is defective, what is the probability it came from Machine B?
  3. 3 Explain why a highly accurate test can still produce many false alarms when the condition being tested is very rare. Use the ideas of prior probability and evidence in your explanation.