Venn diagram generator and visualiser
Draw the Venn diagram of two or three events and see any region of it built up one step at a time. Give the probabilities, the counts or the outcomes, then write the region you want, such as A ∪ B, A′ ∩ B, (A ∪ B)′ or B | A (B given A): the diagram shades it, the sample space shrinks for a “given”, and the probability is worked out as a fraction. Tap other regions to try them, or click the diagram to shade your own. If some of the probabilities are missing, the probability events solver finds them step by step first.
How to use it
- 1Choose what you know: probabilities, counts or outcomes, and fill in the boxes (or tap an example).
- 2Write the region you want, such as A ∪ B, A′ ∩ B, (A ∪ B)′ or B | A, and press Draw it.
- 3Press Play to watch the region built up one step at a time, tap other regions, or click the diagram to shade your own.
a die: B given A (even, more than 3)
This is the kind of answer you get. Put these values in the boxes or type your own.
Answer
- P(B | A)
- 2/3 ≈ 0.6667
The Venn diagram, step by step
P(B | A) = 2/3 ≈ 0.6667
P(B | A) = P(A ∩ B) ÷ P(A) = 1/3 ÷ 1/2 = 2/3 ≈ 0.6667. It is the shaded part as a share of A.
- P(B | A) = P(A ∩ B) ÷ P(A)
- P(A ∩ B) = 1/3 ≈ 0.3333, the shaded regions added up
- P(A) = 1/2 = 0.5
- P(B | A) = (1/3) ÷ (1/2)
- = (1/3) × 2
- = (1 × 2)/(3 × 1)
- = 2/3 ≈ 0.6667
The regions
| Region | As a set | Outcomes | How many | Probability |
|---|---|---|---|---|
| A only | A ∩ B′ | 2 | 1 | 1/6 ≈ 0.1667 |
| B only | A′ ∩ B | 5 | 1 | 1/6 ≈ 0.1667 |
| Both A and B | A ∩ B | 4, 6 | 2 | 1/3 ≈ 0.3333 |
| Neither of them | A′ ∩ B′ | 1, 3 | 2 | 1/3 ≈ 0.3333 |
The regions never overlap and together make up S, so their probabilities add up to 1.
What the numbers say about A and B
- Independent?
- P(A) × P(B) = 1/2 × 1/2 = 1/4 = 0.25 and P(A ∩ B) = 1/3 ≈ 0.3333, which are not equal, so A and B are not independent.
- Mutually exclusive?
- P(A ∩ B) = 1/3 ≈ 0.3333 is not 0 (the circles overlap), so A and B are not mutually exclusive.
- Together they cover S?
- P(neither) = 1/3 ≈ 0.3333, so there are outcomes outside both circles.
- Given that...
- P(A | B) = P(A ∩ B) ÷ P(B) = 1/3 ÷ 1/2 = 2/3 ≈ 0.6667; P(B | A) = P(A ∩ B) ÷ P(A) = 1/3 ÷ 1/2 = 2/3 ≈ 0.6667.
Every step in words (5 steps)
- A is the circle A: every outcome where A happens.
- Given A: we are told A has happened, so the only outcomes left are the ones inside it. Everything else is greyed out. A is the new sample space.
- B is the circle B: every outcome where B happens.
- Inside A, only the part that is also in B counts: A ∩ B.
- P(B | A) = P(A ∩ B) ÷ P(A) = 1/3 ÷ 1/2 = 2/3 ≈ 0.6667. It is the shaded part as a share of A.
About the Venn diagram generator and visualiser
What it does
Draws the Venn diagram of two events A and B (or three, A, B and C) inside the sample space S, puts the probability, the count or the outcomes in every region, and shades any region you write as a set expression. It works the probability of the shaded part out in exact fractions, shows which formula it is, and says whether A and B are independent, mutually exclusive or together cover S.
Reading a region
- A ∪ B: A or B or both. P(A ∪ B) = P(A) + P(B) − P(A ∩ B).
- A ∩ B: both A and B.
- A′ (not A): everything outside circle A. P(A′) = 1 − P(A).
- A ∩ B′ (or A − B): A but not B. P(A ∩ B′) = P(A) − P(A ∩ B).
- (A ∪ B)′: neither A nor B. It is the same region as A′ ∩ B′, and (A ∩ B)′ is the same as A′ ∪ B′: De Morgan’s laws.
- B | A: B given that A has happened. The sample space shrinks to A, and P(B | A) = P(A ∩ B) ÷ P(A).
Independent and mutually exclusive
- A and B are independent when P(A ∩ B) = P(A) × P(B). You can type independent in the P(A ∩ B) box and the tool uses that product.
- A and B are mutually exclusive when they cannot happen together: P(A ∩ B) = 0 and the circles do not overlap. Type mutually exclusive in that box.
How to write the input
Not A is A′ (or A'). Union is ∪ (or u, + or the word or); intersection is ∩ (or n, or the word and); “but not” is −; B | A means B given A. Brackets work, and A′B means A′ ∩ B. For outcomes, list them (2, 4, 6), give a range (1-12) or describe them: even, odd, prime, multiple of 3, > 3. The buttons under the box type the symbols for you.
Common questions
How do I find P(B | A) with a Venn diagram?
Write B | A in the box. The diagram greys out everything outside A, because A is now the whole sample space, and shades the part of B that is inside A. P(B | A) is the probability of that overlap divided by P(A).
What does A′ ∩ B mean in a Venn diagram?
It is the part of B that is outside A: the outcomes that are in B but not in A. Its probability is P(B) − P(A ∩ B).
Is (A ∪ B)′ the same as A′ ∩ B′?
Yes. Both are the outside of both circles: neither A nor B happens. This is one of De Morgan’s laws, and the other is that (A ∩ B)′ is the same as A′ ∪ B′. Write either form and the tool shades the same region.
How do I show that two events are independent?
Check that P(A ∩ B) = P(A) × P(B). The tool does this for you under “What the numbers say about A and B”, and tells you if the two sides differ.
Can I use it for three events?
Yes, in the Outcomes mode: fill in Event C as well and a third circle is drawn. Then regions such as (A ∪ B) ∩ C′ or A ∩ B | C work too.
Practise on real ISC questions
- A biased four-sided die with faces labelled 1, 2, 3 and 4 is rolled and recorded. Let $X$ be the result…2023 Specimen
- Given two events A and B such that $P(A/B) = 0.25$ and $P(A \cap B) = 0.12$. The value $P(A \cap B')$ is:2025 Specimen
- A die marked 1, 2, 3 in red and 4, 5, 6 in green is thrown. Let A be the event 'Number appearing is odd' and…2026
- In a Kabaddi league, two matches are being played between Jaipur and Delhi. It is assumed that the outcomes…2025 Practice
- If $A$ and $B$ are events such that $P(A) = \frac{1}{2}$, $P(B) = \frac{1}{3}$ and…2018
- If events $A$ and $B$ are independent, such that $P(A) = \frac{3}{5}$, $P(B) = \frac{2}{3}$, find…2019
- For any given events A: Statement I: Event A and null event $\emptyset$ are always independent. Statement II…2025 Practice
- Evaluate: $P(A \cup B)$ if $2P(A) = P(B) = \frac{5}{13}$ and $P(A|B) = \frac{2}{5}$2024
- The probability of the event $A$ occurring is $\frac{1}{3}$ and of the event $B$ occurring is $\frac{1}{2}$…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
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.
- Bayes' theorem and binomial calculatorBayes' theorem with the total probability table, or a binomial distribution with P(X = r), mean and variance.
- 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.