Event algebra: A ∪ B, A ∩ B, not A and the addition rule P(A ∪ B) = P(A) + P(B) − P(A ∩ B) on a grid of outcomes

Roll two dice (or a coin and a die) and see all the outcomes as a grid. Choose events A and B, shade them, outline A ∪ B, A ∩ B, A′, A − B or B − A, and watch the addition rule P(A ∪ B) = P(A) + P(B) − P(A ∩ B) worked out with the counts. Mutually exclusive and exhaustive events are flagged, and a simulation checks the answer.

Keep it one tap away for everyday use.

Bookmark Event algebra?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Outcomes
  2. A and B
  3. A ∪ B
  4. Rule
Nothing is uploadedWorks offline once open
Experiment
Outline

ABbothoutlined:

Check it by experiment

Nothing rolled yet.

Try this

  • Pick A = "the sum is 7" and B = "a double": no cell is both, so A and B are mutually exclusive and P(A ∪ B) = P(A) + P(B).
  • Pick A = "the sum is 9 or more" and B = "at least one die shows 6": 7 cells are in both, and adding P(A) and P(B) would count them twice.
  • Outline A′: it is everything A is not, and P(A′) = 1 − P(A).
  • With a coin and a die, heads and tails are mutually exclusive and exhaustive: together they fill the grid.

Check yourself

Fresh numbers every time. Type a number or a fraction such as 3/4; nothing is saved or sent.

    What it does

    An event is a set of outcomes. Roll two dice and “the sum is 9 or more” is the 10 outcomes (3, 6), (4, 5), (4, 6) … (6, 6). Once events are sets, you can combine them like sets:

    • A ∪ B (A or B): outcomes in A, in B, or in both;
    • A ∩ B (A and B): outcomes in both;
    • A′ (not A): every outcome that is not in A;
    • A − B (A but not B), and the outcomes in exactly one of A and B.

    This page draws all 36 outcomes of two dice as a 6 × 6 grid (or the 12 outcomes of a coin and a die). Cells in A are shaded blue, cells in B orange, cells in both half and half, and the cells of the event you choose are outlined. Underneath, the addition rule is worked with the actual counts:

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

    The − P(A ∩ B) is there because the overlap gets counted twice when you add P(A) and P(B). When the overlap is empty, A and B are mutually exclusive and the rule becomes plain addition.

    It fits the Class 11 maths chapter on probability (events, the algebra of events, axiomatic probability), and builds on the classical probability of Class 9 and 10. Count simple events first with the sample space builder tool and see the sets as circles with the venn diagram calculator; for “given that” questions in Class 12, go on to the probability tree.

    How to use it

    1. Choose the experiment: Two dice or A coin and a die.
    2. Pick Event A and Event B from the lists. Some events take a number k (the sum is k, the die shows k or more); a k box appears for those.
    3. Tap an Outline button: A ∪ B, A ∩ B, A′, A − B, B − A or “exactly one”. The outlined cells are counted in the last line of the box.
    4. Read P(A), P(B), P(A ∩ B) and the outlined event as counts out of n(S) and as fractions in lowest terms, then the addition rule with your numbers.
    5. Check it by experiment rolls 100, 1000 or 10 000 times and compares the share of rolls in A ∪ B with the rule.

    In the dice grid the rows are the first die and the columns the second; each cell shows the sum of the two dice.

    Worked example

    The page opens with A = “the sum is 9 or more” and B = “at least one die shows 6”. The box reads P(A) = 10/36 = 5/18, P(B) = 11/36 and P(A ∩ B) = 7/36: seven cells, such as (3, 6) and (6, 6), are in both. The rule line says P(A ∪ B) = 10/36 + 11/36 − 7/36 = 14/36 = 7/18, and counting the outlined cells gives 14 as well. Because 7 outcomes are shared, A and B are not mutually exclusive.

    Now change A to “the sum is k” with k = 7 and B to “a double”. The overlap is empty (a double always has an even sum), so the page says they are mutually exclusive and P(A ∪ B) = 6/36 + 6/36 = 1/3.

    FAQ

    What is the difference between mutually exclusive and exhaustive? Mutually exclusive events cannot happen together (no shared cells). Exhaustive events cover every outcome between them (no empty cells). Heads and tails are both.

    Why does the simulation not give exactly the rule’s number? Random rolls wobble. With more rolls the relative frequency usually gets closer to the probability, which is what the rule describes.

    Is anything stored? No. Everything runs in your browser. fibub is not part of NCERT; the topics follow the syllabus, but the words, pictures and examples are our own.

    Where the numbers come from

    • Sample spaces, events, the algebra of events and the addition rule of probability are standard school probability. Wording, pictures and examples are fibub's own; no textbook text, figures or exercises are used.
    • Checked against a Python enumeration of all 36 outcomes of two dice (itertools.product with fractions.Fraction) and a seeded simulation of 20 000 rolls.

    Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

    Last updated 2026-11-09.

    Change log for Event algebra

    1. Add #1385 Event algebra Details on GitHub

    Every change to fibub

    Related tools

    Sample space builder #L82 See every outcome of two dice, a few coins or a deck of cards, shade an event and get its probability as a fraction. Then run the experiment thousands of times and watch the share of hits settle near it. Venn diagram calculator #L89 Type any set expression with union, intersection, complement and difference for 2 or 3 sets and see the region shaded on a Venn diagram. Compare two expressions to check De Morgan's laws, put in real lists of elements, and count with n(A ∪ B) = n(A) + n(B) − n(A ∩ B). Probability tree #L94 Set P(A), P(B | A) and P(B | A′) with sliders and see the tree, the four path probabilities, P(B) by total probability, P(A | B) by Bayes' theorem and an independence check. 1000 dots show the same numbers as people, which makes it clear why a positive result on a test for something rare is often a false alarm. Spread explorer #L239 Drag the points of two data sets along a number line and watch the range, mean deviation about the mean and median, variance, standard deviation and coefficient of variation change live. Compare two classes with the same mean but different spread, see each deviation as a bar, and open the full working. Quadratic explorer #L68 Slide a, b and c and watch the parabola move: vertex, roots and the discriminant update live, completing the square is drawn with tiles, and the middle term is split for you. With fresh practice questions. Pythagoras proof playground #L69 Drag a right triangle and watch the squares on its sides add up. Slide through four visual proofs (rearrangement, Bhaskara, similar triangles, Baudhayana) with your own side lengths, and list Pythagorean triples.