The algebra of events · Mathematics Class 11–12 | StemPy Lab
Course 23.1·Lesson 3 of 3
The algebra of events
New events are made from old ones with the operations of sets. A∪B is "A or B", A∩B is "A and
about 25 min1 simulation1 practice question1 Python program5 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.
Lesson 3 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
build the events "A or B", "A and B", "not A" and "A but not B";
write "exactly one", "neither" and "at least one" as sets;
count with n(A∪B)=n(A)+n(B)−n(A∩B) and use De Morgan's laws.
What the words mean
In a school, some students play chess and some play table tennis. A teacher asks four questions. Who plays chess or table tennis? Who plays both? Who plays neither? Who plays chess but not table tennis? Each question is a new event made from two old ones.
Let A and B be events of the same sample space S.
A∪B (union) is the event "A or B". It happens when at least one of them happens, and it holds the outcomes that are in A, in B or in both.
A∩B (intersection) is the event "A and B". It happens when both happen.
A′ (complement, also written Aˉ or Ac) is the event "not A". It holds every outcome of S that is not in A.
A−B (difference) is the event "A but not B". It is the same as A∩B′. Some books write A∖B for this event.
Six small Venn diagrams side by side in two rows. Each has two overlapping circles A and B in a rectangle. The shaded part is A or B in the first, A and B in the second, not A in the third, A but not B in the fourth, exactly one of A and B in the fifth, and neither A nor B in the sixth.
Longer sentences
Exactly one of A and B is (A−B)∪(B−A). It is A∪B without A∩B.
Neither A nor B is A′∩B′. It is the complement of the union.
At least one is the union. Both is the intersection.
The three parts A−B, A∩B and B−A are mutually exclusive, and together they make A∪B.
De Morgan's laws
(A∪B)′=A′∩B′,(A∩B)′=A′∪B′.
In words, "not (A or B)" means "not A and not B". "Not (A and B)" means "not A or not B". A Venn diagram shows both at once. A student is outside the union exactly when the student is outside A and outside B.
Counting the union
When outcomes are equally likely, counting is all we need. Add n(A) and n(B). The outcomes in the overlap have been counted twice, so take away n(A∩B) once:
n(A∪B)=n(A)+n(B)−n(A∩B).
For mutually exclusive events the overlap is empty, and the rule is just n(A)+n(B).
Three events
For three events A, B and C there are eight regions. The picture shows them. An outcome may belong to only one of the events, to two, to all three, or to none.
A Venn diagram with three overlapping circles A, B and C inside a rectangle. The seven parts inside the circles and the part outside carry short labels: only A, only B, only C, A and B only, B and C only, A and C only, all three, and none of them.
The idea is the same as for two events: add, take away the overlaps once, then give back the middle part that was taken away too many times. The same rule works for probabilities, as you will see in the next course.
A worked example
In a class of 40 students, 25 study French, 18 study German and 8 study both. Let F and G be the events that a student, picked from the class, studies French or German.
At least one language.n(F∪G)=25+18−8=35.
Neither language.n((F∪G)′)=40−35=5.
French only.n(F−G)=25−8=17. German only is 18−8=10.
Exactly one language.17+10=27. Check: 35−8=27. The two ways agree.
Practise with new numbers
Try it in Python
Python sets have the same operations as events. The program uses one die, with A for "at most 4" and B for "even". It prints each new event and checks De Morgan's laws.
Common mistakes
Reading "or" as "exactly one". In mathematics, "A or B" includes the case where both happen.
Forgetting to take away the overlap.n(A)+n(B) counts the overlap twice.
Confusing A−B with B−A. The order matters.
Taking the complement of the wrong thing.(A∪B)′ is not A′∪B′. It is A′∩B′.
Remember these
Union is "or", intersection is "and", complement is "not", and A−B=A∩B′.
Exactly one of A and B is (A∪B)−(A∩B). Neither is A′∩B′.
n(A∪B)=n(A)+n(B)−n(A∩B).
De Morgan: (A∪B)′=A′∩B′ and (A∩B)′=A′∪B′.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
In a group of 30 people, 16 like tea, 14 like coffee and 6 like both. How many like at least one of them?
Using the numbers of question 1, how many like exactly one of the drinks?
A die is thrown. A={1,2,3} and B={3,4}. Write A∪B, A∩B and A−B.
Write "neither A nor B" in two ways using the operations.
Is A−B always the same as B−A?
References
NCERT, Mathematics for Class XI (earlier edition), Probability, section on the algebra of events.
OpenStax, Introductory Statistics, Chapter 3, sections on terminology and on Venn diagrams.
Enroll free in Sample Spaces and Events
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.