homechevron_rightStudychevron_rightMath

# Bayes’ theorem

This online calculator calculates posterior probabilities according to Bayes’ theorem.

This online calculator calculates posterior probabilities according to Bayes’ theorem. It can be used as solver for Bayes' theorem problems. To use it, you need to input "probability tree" configuration. Below the calculator you can find example on how to do this as well as some theory. #### Probabilities table

arrow_upwardarrow_downwardIDarrow_upwardarrow_downwardParent IDarrow_upwardarrow_downwardNamearrow_upwardarrow_downwardValue
Items per page:

Probability tree

Digits after the decimal point: 4

### Theory recap

For quick theory recap, we need some formulas.

Definition: The conditional probability of an event A, given that event B has occurred, is defined as
, given that

Definition: Two events are called independent if and only if .

Definition: Two events A and B are mutually exclusive if and they are called possible if

Theorem: Two possible mutually exclusive events are always dependent (that is, not independent).

Theorem: Two possible independent events are not mutually exclusive.

Definition: Let be a set and let be a collection of subsets of . The collection is called a partition of if
,
for

Theorem: If the events constitute a partition of the sample space S and for , then for any event A in S

Theorem: If the events constitute a partition of the sample space S and for , then for any event A in S such that ,

This theorem is called Bayes' Theorem. is called prior probability, is called posterior probability.

In probability theory and statistics, Bayes’ theorem (aka Bayes’ law or Bayes' rule) deals with so-called backward conditional probabilities. It describes the probability of an event, based on prior knowledge of conditions that might be related to the event.

It is very useful when we have a two stage process and can only access outcomes of second stage, while first stage is hidden. With Bayes' theorem we can make a prediction about this hidden first stage. Consider this example from wikipedia:

### Example

Problem: Suppose that a test for using a particular drug is 99% sensitive and 99% specific. That is, the test will produce 99% true positive results for drug users and 99% true negative results for non-drug users. Suppose that 0.5% of people are users of the drug. What is the probability that a randomly selected individual with a positive test is a user?

How to use the calculator:

1. Select default data in the table and delete it clicking on top checkbox and then clicking on "bin" icon on table header.