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

What you told it

  • P(A) = 1/2 = 0.5
  • P(B | A) = 2/5 = 0.4

What follows

One event

2 of 4
ProbabilityValueHow
P(A)1/2 = 0.5given
P(A′)1/2 = 0.5step 1
2 not found yet
ProbabilityValueHow
P(B)not found yet
P(B′)not found yet

Together

2 of 5
ProbabilityValueHow
P(A ∩ B)1/5 = 0.2step 2
P(A ∩ B′)3/10 = 0.3step 3
3 not found yet
ProbabilityValueHow
P(A ∪ B)at least one happensnot found yet
P(A′ ∩ B′)neither (or none) of them happensnot found yet
P(A′ ∩ B)not found yet

Unions with a complement

2 of 3
ProbabilityValueHow
P(A′ ∪ B′)not both: the same as (A ∩ B)′4/5 = 0.8step 4
P(A′ ∪ B)7/10 = 0.7step 5
1 not found yet
ProbabilityValueHow
P(A ∪ B′)not found yet

Exactly one, exactly two, both or neither

0 of 2
2 not found yet
ProbabilityValueHow
P(exactly one of A, B)only one of them happens: (A ∩ B′) or (A′ ∩ B)not found yet
P(both or neither)both happen, or neither doesnot found yet

Sums of probabilities

0 of 4
4 not found yet
ProbabilityValueHow
P(A) + P(B)the two probabilities added: not the union, which counts the overlap oncenot found yet
P(A′) + P(B′)not found yet
P(A) + P(B′)not found yet
P(A′) + P(B)not found yet

Differences of probabilities

0 of 2
2 not found yet
ProbabilityValueHow
P(A) − P(B)not found yet
P(B) − P(A)not found yet

Given that

1 of 2
ProbabilityValueHow
P(B | A)2/5 = 0.4given
1 not found yet
ProbabilityValueHow
P(A | B)not found yet

Given that, with a complement

1 of 6
ProbabilityValueHow
P(B′ | A)3/5 = 0.6step 6
5 not found yet
ProbabilityValueHow
P(A′ | B)not found yet
P(A | B′)not found yet
P(B | A′)not found yet
P(A′ | B′)not found yet
P(B′ | A′)not found yet

To find everything, also give one of these: P(B), P(B′), P(A ∪ B), P(A′ ∩ B′), P(A′ ∩ B), P(A ∪ B′), P(exactly one of A, B), P(both or neither), P(A) + P(B), P(A′) + P(B′), P(A) + P(B′), P(A′) + P(B), P(A) − P(B), P(B) − P(A), P(A | B), P(A′ | B), P(A | B′), P(B | A′), P(A′ | B′), P(B′ | A′), Independent, Exhaustive.

Step by step

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′) by the complement rule

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

    = 1 − 1/2

    = 2/2 − 1/2

    = (2 − 1)/2

    = 1/2 = 0.5

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

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

    = (2/5) × (1/2)

    = (2 × 1)/(5 × 2)

    = 2/10

    = 1/5 = 0.2

  3. P(A ∩ B′) by the A is split into A ∩ B and A ∩ B′

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

    = 1/2 − 1/5

    = 5/10 − 2/10

    = (5 − 2)/10

    = 3/10 = 0.3

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

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

    = 1 − 1/5

    = 5/5 − 1/5

    = (5 − 1)/5

    = 4/5 = 0.8

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

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

    = 1 − 3/10

    = 10/10 − 3/10

    = (10 − 3)/10

    = 7/10 = 0.7

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

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

    = (3/10) ÷ (1/2)

    = (3/10) × 2

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

    = 6/10

    = 3/5 = 0.6

Start again

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 →