Prashnikaप्रश्निका
Code
About

Probability solver for events A, B and C

Work out the probabilities of two events A and B, or three, from whatever you know. Press a button for each value you have, type it, and say whether the events are independent, mutually exclusive or exhaustive. The solver finds everything that follows, in whichever direction it has to go (P(A ∩ B) from P(A ∪ B), or P(B) from P(A ∩ B) for independent events), shows the steps it took, and draws the Venn diagram.

How to use it

  1. 1Choose two events (A and B) or three (A, B and C), and press Independent, Mutually exclusive or Exhaustive if the question says so.
  2. 2Press a button for each value you know, such as P(A) or P(A ∪ B), and type it (1/4, 0.25 and 25% all work), or tap an example.
  3. 3Read every probability that follows, press a step number to see how one value was found, and look at the Venn diagram drawn from them.
How many events?
Is anything said about how they relate?

Independent: one happening tells you nothing about the other, so P(A ∩ B) = P(A) × P(B).Independent: P(A ∩ B) = P(A) × P(B), the same for every pair, and P(A ∩ B ∩ C) = P(A) × P(B) × P(C).Mutually exclusive: they cannot both happen, so P(A ∩ B) = 0.Mutually exclusive: no two of them can happen together, so every intersection is 0.Exhaustive: between them they cover everything that can happen, so P(A ∪ B) = 1.Exhaustive: between them they cover everything that can happen, so P(A ∪ B ∪ C) = 1.

What values do you know?

Press a button for each value you know, then type it: a fraction like 3/10 (the / button types the bar) or a decimal like 0.3. Everything is worked as exact fractions.

One event
Together
Given that
Unions with a complement
Exactly one, exactly two, both or neither
Exactly these events happen
Two of the events, with a complement
Sums of probabilities
Differences of probabilities
Given that, with a complement
Worked example

independent events: P(A) = 0.3, P(B) = 0.4

This is the kind of answer you get. Put these values in the boxes or type your own.

What you told it

  • A and B are independent: P(A ∩ B) = P(A) × P(B).
  • P(A) = 3/10 = 0.3
  • P(B) = 2/5 = 0.4

What follows

One event

4 of 4
ProbabilityValueHow
P(A)3/10 = 0.3given
P(B)2/5 = 0.4given
P(A′)7/10 = 0.7step 2
P(B′)3/5 = 0.6step 4

Together

5 of 5
ProbabilityValueHow
P(A ∩ B)3/25 = 0.12step 1
P(A ∪ B)at least one happens29/50 = 0.58step 7
P(A′ ∩ B′)neither (or none) of them happens21/50 = 0.42step 5
P(A ∩ B′)9/50 = 0.18step 6
P(A′ ∩ B)7/25 = 0.28step 3

Unions with a complement

3 of 3
ProbabilityValueHow
P(A′ ∪ B′)not both: the same as (A ∩ B)′22/25 = 0.88step 8
P(A ∪ B′)18/25 = 0.72step 9
P(A′ ∪ B)41/50 = 0.82step 10

Exactly one, exactly two, both or neither

2 of 2
ProbabilityValueHow
P(exactly one of A, B)only one of them happens: (A ∩ B′) or (A′ ∩ B)23/50 = 0.46step 11
P(both or neither)both happen, or neither does27/50 = 0.54step 12

Sums of probabilities

4 of 4
ProbabilityValueHow
P(A) + P(B)the two probabilities added: not the union, which counts the overlap once7/10 = 0.7step 13
P(A′) + P(B′)13/10 = 1.3step 14
P(A) + P(B′)9/10 = 0.9step 15
P(A′) + P(B)11/10 = 1.1step 16

Differences of probabilities

2 of 2
ProbabilityValueHow
P(A) − P(B)−1/10 = −0.1step 25
P(B) − P(A)1/10 = 0.1step 26

Given that

2 of 2
ProbabilityValueHow
P(A | B)3/10 = 0.3step 17
P(B | A)2/5 = 0.4step 18

Given that, with a complement

6 of 6
ProbabilityValueHow
P(A′ | B)7/10 = 0.7step 19
P(B′ | A)3/5 = 0.6step 20
P(A | B′)3/10 = 0.3step 21
P(B | A′)2/5 = 0.4step 22
P(A′ | B′)7/10 = 0.7step 23
P(B′ | A′)3/5 = 0.6step 24

Step by step

Show all 26 steps

Each line uses only what was given or found in an earlier step. Press a step number in the table above to show just the steps that lead to that value.

  1. P(A ∩ B) by the independent events, P(A ∩ B) = P(A) × P(B)

    P(A ∩ B) = P(A) × P(B)

    = (3/10) × (2/5)

    = (3 × 2)/(10 × 5)

    = 6/50

    = 3/25 = 0.12

  2. P(A′) by the complement rule

    P(A′) = 1 − P(A)

    = 1 − 3/10

    = 10/10 − 3/10

    = (10 − 3)/10

    = 7/10 = 0.7

  3. P(A′ ∩ B) by the A′ and B are independent too

    P(A′ ∩ B) = P(A′) × P(B)

    = (7/10) × (2/5)

    = (7 × 2)/(10 × 5)

    = 14/50

    = 7/25 = 0.28

  4. P(B′) by the complement rule

    P(B′) = 1 − P(B)

    = 1 − 2/5

    = 5/5 − 2/5

    = (5 − 2)/5

    = 3/5 = 0.6

  5. P(A′ ∩ B′) by the A′ and B′ are independent too

    P(A′ ∩ B′) = P(A′) × P(B′)

    = (7/10) × (3/5)

    = (7 × 3)/(10 × 5)

    = 21/50 = 0.42

  6. P(A ∩ B′) by the A and B′ are independent too

    P(A ∩ B′) = P(A) × P(B′)

    = (3/10) × (3/5)

    = (3 × 3)/(10 × 5)

    = 9/50 = 0.18

  7. P(A ∪ B) by the addition theorem, P(A ∪ B) = P(A) + P(B) − P(A ∩ B)

    P(A ∪ B) = P(A) + P(B) − P(A ∩ B)

    = 3/10 + 2/5 − 3/25

    = 15/50 + 20/50 − 6/50

    = (15 + 20 − 6)/50

    = 29/50 = 0.58

  8. P(A′ ∪ B′) by the (A ∩ B)′ is A′ ∪ B′

    P(A′ ∪ B′) = 1 − P(A ∩ B)

    = 1 − 3/25

    = 25/25 − 3/25

    = (25 − 3)/25

    = 22/25 = 0.88

  9. P(A ∪ B′) by the (A′ ∩ B)′ is A ∪ B′

    P(A ∪ B′) = 1 − P(A′ ∩ B)

    = 1 − 7/25

    = 25/25 − 7/25

    = (25 − 7)/25

    = 18/25 = 0.72

  10. P(A′ ∪ B) by the (A ∩ B′)′ is A′ ∪ B

    P(A′ ∪ B) = 1 − P(A ∩ B′)

    = 1 − 9/50

    = 50/50 − 9/50

    = (50 − 9)/50

    = 41/50 = 0.82

  11. P(exactly one of A, B) by the exactly-one rule: A without B, or B without A

    P(exactly one of A, B) = P(A ∩ B′) + P(A′ ∩ B)

    = 9/50 + 7/25

    = 9/50 + 14/50

    = (9 + 14)/50

    = 23/50 = 0.46

  12. P(both or neither) by the both-or-neither rule: A ∩ B or A′ ∩ B′

    P(both or neither) = P(A ∩ B) + P(A′ ∩ B′)

    = 3/25 + 21/50

    = 6/50 + 21/50

    = (6 + 21)/50

    = 27/50 = 0.54

  13. P(A) + P(B) by the sum of P(A) and P(B)

    P(A) + P(B) = P(A) + P(B)

    = 3/10 + 2/5

    = 3/10 + 4/10

    = (3 + 4)/10

    = 7/10 = 0.7

  14. P(A′) + P(B′) by the sum of P(A′) and P(B′)

    P(A′) + P(B′) = P(A′) + P(B′)

    = 7/10 + 3/5

    = 7/10 + 6/10

    = (7 + 6)/10

    = 13/10 = 1.3

  15. P(A) + P(B′) by the sum of P(A) and P(B′)

    P(A) + P(B′) = P(A) + P(B′)

    = 3/10 + 3/5

    = 3/10 + 6/10

    = (3 + 6)/10

    = 9/10 = 0.9

  16. P(A′) + P(B) by the sum of P(A′) and P(B)

    P(A′) + P(B) = P(A′) + P(B)

    = 7/10 + 2/5

    = 7/10 + 4/10

    = (7 + 4)/10

    = 11/10 = 1.1

  17. P(A | B) by the multiplication theorem, P(X ∩ Y) = P(X | Y) × P(Y)

    P(A | B) = P(A ∩ B) ÷ P(B)

    = (3/25) ÷ (2/5)

    = (3/25) × (5/2)

    = (3 × 5)/(25 × 2)

    = 15/50

    = 3/10 = 0.3

  18. P(B | A) by the multiplication theorem, P(X ∩ Y) = P(X | Y) × P(Y)

    P(B | A) = P(A ∩ B) ÷ P(A)

    = (3/25) ÷ (3/10)

    = (3/25) × (10/3)

    = (3 × 10)/(25 × 3)

    = 30/75

    = 2/5 = 0.4

  19. P(A′ | B) by the multiplication theorem, P(X ∩ Y) = P(X | Y) × P(Y)

    P(A′ | B) = P(A′ ∩ B) ÷ P(B)

    = (7/25) ÷ (2/5)

    = (7/25) × (5/2)

    = (7 × 5)/(25 × 2)

    = 35/50

    = 7/10 = 0.7

  20. P(B′ | A) by the multiplication theorem, P(X ∩ Y) = P(X | Y) × P(Y)

    P(B′ | A) = P(A ∩ B′) ÷ P(A)

    = (9/50) ÷ (3/10)

    = (9/50) × (10/3)

    = (9 × 10)/(50 × 3)

    = 90/150

    = 3/5 = 0.6

  21. P(A | B′) by the multiplication theorem, P(X ∩ Y) = P(X | Y) × P(Y)

    P(A | B′) = P(A ∩ B′) ÷ P(B′)

    = (9/50) ÷ (3/5)

    = (9/50) × (5/3)

    = (9 × 5)/(50 × 3)

    = 45/150

    = 3/10 = 0.3

  22. P(B | A′) by the multiplication theorem, P(X ∩ Y) = P(X | Y) × P(Y)

    P(B | A′) = P(A′ ∩ B) ÷ P(A′)

    = (7/25) ÷ (7/10)

    = (7/25) × (10/7)

    = (7 × 10)/(25 × 7)

    = 70/175

    = 2/5 = 0.4

  23. P(A′ | B′) by the multiplication theorem, P(X ∩ Y) = P(X | Y) × P(Y)

    P(A′ | B′) = P(A′ ∩ B′) ÷ P(B′)

    = (21/50) ÷ (3/5)

    = (21/50) × (5/3)

    = (21 × 5)/(50 × 3)

    = 105/150

    = 7/10 = 0.7

  24. P(B′ | A′) by the multiplication theorem, P(X ∩ Y) = P(X | Y) × P(Y)

    P(B′ | A′) = P(A′ ∩ B′) ÷ P(A′)

    = (21/50) ÷ (7/10)

    = (21/50) × (10/7)

    = (21 × 10)/(50 × 7)

    = 210/350

    = 3/5 = 0.6

  25. P(A) − P(B) by the difference of P(A) and P(B)

    P(A) − P(B) = P(A) − P(B)

    = 3/10 − 2/5

    = 3/10 − 4/10

    = (3 − 4)/10

    = −1/10 = −0.1

  26. P(B) − P(A) by the P(A) − P(B) and P(B) − P(A) are opposites

    P(B) − P(A) = −P(A) − P(B)

    = 1/10 = 0.1

The Venn diagram, step by step

P(A ∪ B) = 29/50 = 0.58

Venn diagram of the events A and B inside the sample space SABS21/509/507/253/25A′ ∩ B′A ∩ B′A′ ∩ BA ∩ B

Add the numbers in the shaded regions: 9/50 + 7/25 + 3/25 = 29/50 = 0.58.

  1. P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
  2. = 3/10 + 2/5 − 3/25
  3. = 15/50 + 20/50 − 6/50
  4. = (15 + 20 − 6)/50
  5. = 29/50 = 0.58

Shade another region

Tap one to see it built up step by step. Or .

What the numbers say about the events

Independent?
P(A) × P(B) = 3/10 × 2/5 = 3/25 = 0.12 and P(A ∩ B) = 3/25 = 0.12, which are equal, so A and B are independent.
Mutually exclusive?
P(A ∩ B) = 3/25 = 0.12 is not 0 (the circles overlap), so A and B are not mutually exclusive.
Together they cover S?
P(neither) = 21/50 = 0.42, so there are outcomes outside both circles.
Given that...
P(A | B) = P(A ∩ B) ÷ P(B) = 3/25 ÷ 2/5 = 3/10 = 0.3; P(B | A) = P(A ∩ B) ÷ P(A) = 3/25 ÷ 3/10 = 2/5 = 0.4.

About the Probability solver for events A, B and C

What it does

Takes whatever you know about two or three events, and how they are related, and works out everything that follows: P(A′), P(B′), P(A ∩ B), P(A ∪ B), P(neither), P(A ∩ B′), P(A′ ∩ B), P(A′ ∪ B′), P(A ∪ B′), P(A′ ∪ B), P(exactly one of A, B), P(both or neither), the sums P(A) + P(B), P(A′) + P(B′), P(A) + P(B′) and P(A′) + P(B), the conditional probabilities and, for three events, P(exactly one) and P(exactly two) and the same families for A, B and C: the eight regions such as P(A ∩ B′ ∩ C′), unions with complements such as P(A′ ∪ B′ ∪ C′), sums of two or three probabilities, differences such as P(A) − P(B) and conditionals such as P(A′ | B). Every one of them can also be given. The groups after the first few are folded, in the buttons and in the answer: press a heading to open it. It works in either direction, so P(A ∩ B) can come from P(A ∪ B) and P(B) can come from P(A ∩ B), and it writes each step with the numbers put in. Once the events are fully known it draws the Venn diagram. If something is missing it says what to add.

The rules it uses

  • Complement: P(A′) = 1 − P(A).
  • Addition theorem: P(A ∪ B) = P(A) + P(B) − P(A ∩ B). For three events, P(A ∪ B ∪ C) = P(A) + P(B) + P(C) − P(A ∩ B) − P(A ∩ C) − P(B ∩ C) + P(A ∩ B ∩ C).
  • Multiplication theorem: P(A ∩ B) = P(A) × P(B | A) = P(B) × P(A | B).
  • Independent events: P(A ∩ B) = P(A) × P(B), and A′ and B′, A and B′, A′ and B are independent too.
  • Mutually exclusive events: P(A ∩ B) = 0, so P(A ∪ B) = P(A) + P(B).
  • Exhaustive events: P(A ∪ B) = 1.

How to give the values

Press the button of a value you know and a box opens for it; press it again to take it away. Write a value as a fraction (3/10: the / button beside the box types the bar, so a phone’s number keypad is enough), a decimal (0.3) or a percentage (30%). The quick values under the boxes fill the box you are in. Nothing is worked out until you press Solve; change a value and the answer on the page is greyed until you press it again. You do not have to give every value: the solver says what else would finish the job.

How the arithmetic is done

Always in exact fractions, never rounded decimals. A decimal you type is read as the fraction it is (0.3 is 3/10). A sum or difference is written over the common denominator (the LCM), the numerators are combined and the answer is brought to lowest terms; a product is numerators over denominators; a quotient is the first fraction times the second turned upside down. The decimal is shown beside the answer for comparison only.

Common questions

Can I type fractions like 3/10, or only decimals?

Both. Type 3/10 or 0.3: the solver reads them as the same number. On a phone the number keypad has no / key, so each value box has a / button beside it that types it for you.

Does it add fractions with a common denominator, or convert to decimals?

It works in exact fractions and shows the working a textbook would: for 1/2 + 2/5 − 1/5 it writes 5/10 + 4/10 − 2/10, then (5 + 4 − 2)/10, then 7/10. Nothing is rounded along the way, so 0.1 + 0.2 comes out as exactly 3/10.

How do I find P(A ∩ B) when A and B are independent?

Press Independent, give P(A) and P(B), and the solver multiplies them: P(A ∩ B) = P(A) × P(B). It then goes on to P(A ∪ B) and the rest.

How do I find P(B) if A and B are independent and I know P(A) and P(A ∪ B)?

Use P(A ∪ B) = P(A) + P(B) − P(A) P(B), which gives P(B) = (P(A ∪ B) − P(A)) ÷ (1 − P(A)). Press Independent, then P(A) and P(A ∪ B); the steps show it worked through P(A′ ∩ B′) = P(A′) × P(B′).

What changes when events are mutually exclusive or exhaustive?

Mutually exclusive events have P(A ∩ B) = 0, so P(A ∪ B) = P(A) + P(B). Exhaustive events have P(A ∪ B) = 1, so P(A ∩ B) = P(A) + P(B) − 1. Mutually exclusive and exhaustive together means B is exactly A′, so P(B) = 1 − P(A).

Why does it say the values can’t all be true?

Because they contradict each other: a probability would come out below 0 or above 1, an overlap would be bigger than one of its events, or the independence rule P(A ∩ B) = P(A) × P(B) fails for the numbers you gave. The message shows which line fails.

What can I find if I only know P(A ∪ B) and P(A ∩ B)?

Everything that does not need P(A) or P(B) on its own: P(A′ ∩ B′) = 1 − P(A ∪ B), P(A′ ∪ B′) = 1 − P(A ∩ B), P(exactly one of A, B) = P(A ∪ B) − P(A ∩ B), P(both or neither), and the sums P(A) + P(B) = P(A ∪ B) + P(A ∩ B) and P(A′) + P(B′) = 2 − (P(A) + P(B)). To split the sum into P(A) and P(B) it needs one more fact: give P(A) or P(B), or press Independent (then P(A) and P(B) are the two roots of t² − (sum)t + P(A ∩ B) = 0).

Can I give P(A) + P(B) or P(A′ ∪ B′) as a value?

Yes. Under Together there are buttons for P(A′ ∪ B′), P(A ∪ B′), P(A′ ∪ B), P(exactly one of A, B) and P(both or neither), and a Sums group has P(A) + P(B), P(A′) + P(B′), P(A) + P(B′) and P(A′) + P(B). A sum can be up to 2, so the box takes values above 1 there. Two sums that share an event give it: P(A) + P(B) and P(A) + P(B′) add to 2 × P(A) + 1.

Can I use it for three events?

Yes, choose A, B and C. The values to give are the three events, their pairwise overlaps, P(A ∩ B ∩ C) and P(A ∪ B ∪ C): any seven numbers that fix the events, or fewer with Independent, Mutually exclusive or Exhaustive. It uses the three-event addition theorem to find a missing one.

Practise on real ISC questions

More Mathematics tools

All study tools →