Bayes' theorem and binomial calculator
Two probability tools in one. Bayes’ theorem: give the events, their probabilities and the chance of A under each, and get the total probability and every P(E | A). Binomial distribution: give the number of trials and the chance of success, and get P(X = r), at least and at most, the mean and the variance.
How to use it
- 1Choose Bayes’ theorem or Binomial distribution.
- 2Fill in the probabilities (1/4, 0.25 and 25% all work), or tap an example.
- 3Press Work it out for the table of P(E | A), the total probability, or P(X = r), the mean and the variance.
machines A, B, C: a defective item
This is the kind of answer you get. Put these values in the boxes or type your own.
Answer
- P(Machine A | A)
- 25/69 ≈ 0.3623
- P(Machine B | A)
- 28/69 ≈ 0.4058
- P(Machine C | A)
- 16/69 ≈ 0.2319
P(A), the total probability, is 69/2000 = 0.0345.
Working
| Event E | P(E) | P(A | E) | P(E) × P(A | E) | P(E | A) |
|---|---|---|---|---|
| Machine A | 1/4 = 0.25 | 1/20 = 0.05 | 1/80 = 0.0125 | 25/69 ≈ 0.3623 |
| Machine B | 7/20 = 0.35 | 1/25 = 0.04 | 7/500 = 0.014 | 28/69 ≈ 0.4058 |
| Machine C | 2/5 = 0.4 | 1/50 = 0.02 | 1/125 = 0.008 | 16/69 ≈ 0.2319 |
- Total probability: P(A) = Σ P(E) × P(A | E) = 1/80 + 7/500 + 1/125 = 69/2000 = 0.0345
- Bayes’ theorem: P(Eᵢ | A) = P(Eᵢ) × P(A | Eᵢ) ÷ P(A), so each row’s last column is its P(E) × P(A | E) divided by P(A).
About the Bayes' theorem and binomial calculator
What it does
Two probability tools in one. Bayes’ theorem: give the events, their probabilities and the chance of A under each, and get the total probability P(A) and every P(E | A), in exact fractions. Binomial distribution: give the number of trials and the chance of success, and get P(X = r), at least and at most, the mean, the variance and the standard deviation.
Bayes’ theorem
- Total probability: P(A) = ΣP(E) × P(A | E).
- Bayes’ theorem: P(Eᵢ | A) = P(Eᵢ) × P(A | Eᵢ) ÷ P(A).
- The probabilities P(E) of the events must add up to 1.
The binomial distribution
- For n independent trials, each with chance p of success and q = 1 − p of failure: P(X = r) = ⁿCᵣ pʳ qⁿ⁻ʳ.
- Mean = np, variance = npq, standard deviation = √(npq).
- P(at least one success) = 1 − qⁿ.
Common questions
What do the events E and A mean in Bayes’ theorem?
The events E₁, E₂, … are the possible causes (the machine, the bag, whether a person has the disease). A is what you have observed (a defective item, a red ball, a positive test). P(E | A) is the chance of each cause now that you know A happened.
When do I use the binomial distribution?
When there is a fixed number n of independent trials and each one has the same chance p of success: tossing a coin 5 times, throwing a die 4 times, testing 10 items.
How do I find “at least” and “at most” probabilities?
Give r and the page shows P(X = r), P(X ≤ r), P(X < r), P(X ≥ r) and P(X > r) together. “At least one” is 1 − qⁿ.
Practise on real ISC questions
- A fair die is rolled. If face 1 turns up, a ball is drawn from Bag A. If face 2 or 3 turns up, a ball is…2017
- A bag contains 5 white, 7 red and 4 black balls. If four balls are drawn one by one with replacement, what is…2020
- Bag A contains 1 white, 2 blue and 3 red balls. Bag B contains 3 white, 3 blue and 2 red balls. Bag C…2017
- A bag contains 6 red and 5 blue balls and another bag contains 5 red and 8 blue balls. A ball is drawn from…2022 Specimen
- Two balls are drawn from an urn containing 3 white, 5 red and 2 black balls, one by one without replacement…2019
- A biased dice is tossed and the respective probabilities for various faces to turn up are: Face 1 2 3 4 5 6…2025 Practice
- A family has two children. What is the probability that both children are boys, given that at least one of…2018 Specimen
- A bag contains 19 tickets, numbered from 1 to 19. Two tickets are drawn randomly in succession with…2023
- Consider the two events $A$ and $B$. The probability that at least one of $A$ or $B$ occurs is $0\cdot 6$. If…2025 Improvement
- In a bolt factory, machines X, Y and Z manufacture 20%, 35% and 45% respectively of the total output. Of…2022 Specimen
More Mathematics tools
- LPP solver (graphical method)Linear programming by the graphical method: the feasible region drawn, corner points and the optimum.
- Matrix inverse and equations solverDeterminant, minors, cofactors, adjoint and inverse; or solve equations by the matrix method.
- Matrix calculator and equation solverProducts, sums, powers, transposes and inverses of matrices of any size, and equations like AX = B.
- Regression lines calculatorBoth regression lines, b_yx, b_xy and r from data, summary sums or the two lines; with estimates.
- Probability distribution calculatorFind k, the mean, variance and standard deviation of a random variable, with the working table.
- 3D geometry and vectors calculatorPoints, vectors, lines and planes: distances, angles, foot and image, shortest distance, intersections.
- Venn diagram generator and visualiserDraw the Venn diagram of two or three events and shade A ∪ B, A′ ∩ B, (A ∪ B)′ or B given A step by step, with the probability.
- Probability solver for events A, B and CPress buttons for what you know about two or three events and whether they are independent, mutually exclusive or exhaustive; every probability that follows is worked out step by step.