Lesson Explainer: Set Notation | Nagwa Lesson Explainer: Set Notation | Nagwa

# Lesson Explainer: Set Notation Mathematics

In this explainer, we will learn how to use set notation with Venn diagrams and calculate probabilities using Venn diagrams.

We first recall that we can use Venn diagrams to represent properties and how they relate to each other. For example, if we have a group of 10 people, we can ask each person if they like cats and if they like dogs. This would then group the people into four categories depending on whether they answered βyesβ or βnoβ to each question. We can represent this on a Venn diagram.

We say that each circle represents the people who said they liked the animal, and the overlap of the two circles would represent the people who said they like both animals. Finally, the number outside of the circles represents the people who said they did not like either animal.

The idea of Venn diagrams is closely related to probability. For example, if we are asked what the probability of selecting a person at random who likes dogs from the group is, we can recall that this will be given by

We know that there are 10 people in the group. To determine the number of people who like dogs from the Venn diagram, we first highlight the set of people who replied that they liked dogs on the Venn diagram.

We can add the two numbers together to see that , so 7 people responded that they like dogs. Hence,

In probability, we call ideas like βchoosing a person who likes dogsβ an event. In fact, this is an idea of a simple event since it does not compound multiple events such as βchoosing a person who likes dogs but does not like cats.β We also think of these events as sets, since they are subsets of possible outcomes from the total sample space.

This notation is fine for simple events but does not work well for more complex events. Instead, we introduce set notation to make writing and working with these complex events easier.

We use the symbol , called the union, to represent either of two events happening. For example, if we say that is the event of βchoosing someone who likes cats from the groupβ and is the event of βchoosing someone who likes dogs,β then will be the event of βchoosing someone who either likes cats or dogs.β

We use the symbol , called the intersection, to represent two events happening. For example, would be the event of βchoosing someone who likes both cats and dogs.β

Finally, we use a prime symbol , to represent an event not happening. For example, would be the event of βchoosing someone who does not like cats.β

We can use this notation to represent compound events such as βchoosing a person who likes dogs but does not like catsβ; this would be since they need to like dogs and not like cats.

We can define these formally as follows.

### Definition: Set Notation

Let and be two sets.

• is called the union of and and includes all elements in either or .
• is called the intersection of and and includes all elements in both and .
• is called the complement of and includes all elements that are not in .

It is worth reiterating that we are usually working within a sample space , so when we say βall elements,β this is short for βall elements in the sample space .β

We can determine the probability of compound events using Venn diagrams in two ways. Above, we saw an example of a Venn diagram where the size of each set is given. In this case, the probability of the event is the number of elements in the set divided by the size of the sample space, which is the total of the numbers in the Venn diagram.

We can find in our example above by first highlighting on the Venn diagram. We know that is all of the elements in but not in . So, we can highlight in green and everything not in in orange. Then, the overlap will be .

We see that the overlap only contains 3 members of the 10. So,

We sometimes use to represent the number of elements in a set . So, we can also write

It is also common to write the probabilities in the Venn diagram instead of the sizes of the sets. We note that, in our above example, the probabilities are found by dividing each number by 10. So, we could change our Venn diagram as follows.

We can then determine the probability of an event just by adding the probabilities from the Venn diagram in the set together.

In our first example, we will represent a shaded area on a Venn diagram in set notation.

### Example 1: Representing a Venn Diagram in Set Notation

Which of the following represents the colored area in the Venn diagram in set notation?

There are several different methods we could use to answer this question. For example, we could represent each of the five given options on a Venn diagram to determine which one is equivalent to the given diagram. However, it is also possible to directly find expressions for shaded regions on a Venn diagram by considering their properties.

We first note that the given region contains the part of that does not contain .

In other words, we want to remove from . We can do this by using complements and intersections. We note that taking an intersection between two sets means taking everything in both sets and taking the complement of a set means taking everything not in the set.

Therefore, if we consider the complement of , we get the following.

We can see that this contains the shaded region we want to find. In particular, we see that the intersection between and is not included. Thus, if we take the intersection between and , we get the following.

We see that the intersection between these two sets, , is the colored region in the following diagram.

Hence, the answer is C: .

In our next example, we will identify which of five given options correctly represents a given set on a Venn diagram.

### Example 2: Identifying the Venn Diagram of a Set

Which of these Venn diagrams has the set as a colored area?

In order to sketch on a Venn diagram, we first recall that the prime symbol: means the complement, which is everything not in the set, and the union symbol means everything in both sets. We can sketch any set on a Venn diagram by sketching each part separately.

To sketch , we shade everything that is not inside , that is, everything not inside the circle labeled . We have the following.

We can do the same for , as it is everything not in the set .

We want to take the union of these two sets; this means that anything shaded in either diagram will be shaded in the Venn diagram of their union.

Shading everything in the same color yields the following Venn diagram.

This is the Venn diagram given in choice A.

In our next example, we will calculate a probability by considering a Venn diagram.

### Example 3: Calculating a Probability Using Sets

Given that , , and , calculate .

Letβs start by constructing a Venn diagram of the given probabilities. We have two events, and .

We want to calculate . We can start by highlighting this on the Venn diagram. We recall that is the complement of ; it is everything not in the set .

We can also highlight in the Venn diagram and note that the intersection of the events means that both events must happen, so it will be the overlap of the events.

We see that this only includes the part of event that is not in .

Letβs now use the given probabilities to fill in the Venn diagram. First, we are told that . We recall that is the event of both and happening, so it is the overlap of the sets in the Venn diagram.

Next, we are told that ; this means that the sum of all of the probabilities inside must be 0.6.

Therefore, the missing probability is given by .

We could follow the same reasoning to show that the event of happening and not happening has a probability of ; however, it is not necessary, as we have found that the colored region has a probability of 0.35.

Hence, .

Before we move on to our next example, there are a few useful definitions and observations we can make.

### Definition: Mutually Exclusive Events

We say that two events are mutually exclusive if they cannot both occur at the same time. In other words, , where is called the empty set, meaning the set with no members.

For example, a coin flip cannot be both heads and tails, so the events of heads and tails are mutually exclusive. Since the intersection of the events is empty, we often sketch the Venn diagram to have no intersection between the sets and we can note that . For a fair coin (one that cannot land on its side), these two Venn diagrams could both be used and are equivalent.

We can use either Venn diagram to observe a useful property of mutually exclusive events. Consider the probability of by highlighting this set on the first Venn diagram.

We can see that is the sum of the three probabilities; however, we know that since they are mutually exclusive. The other two probabilities can be easily written as and since the probability in the overlap is 0. Hence,

This result holds true in general and its proof is the same.

### Property: The Probability of the Union of Mutually Exclusive Events

If and are mutually exclusive events, then

A useful example of this property is to consider any event and its complement . We can note that since something cannot both happen and not happen. Therefore, an event and its complement are always mutually exclusive. We can also note that the entire sample space is highlighted if we highlight .

So, , and since the sum of probabilities in the sample space is 1, we have

Then, we use the fact that the events are mutually exclusive to get

Another useful property to consider is the independence of two events.

### Definition: Independent Events

We say that and are independent events if one event does not affect the probability of the other happening. In particular,

In our next example, we will solve a word problem involving probability by constructing a Venn diagram.

### Example 4: Determining the Size of a Sample Space and a Probability

A bag contains an unknown number of red, blue, green, red and blue, and green and blue balls. We name the events of choosing a ball containing each color R, G, and B. Given that , , , , and that there are 12 balls containing blue in the bag, determine the total number of balls in the bag and .

It is not necessary to use a Venn diagram to answer this question; however, it can be useful to construct one to help visualize the situation. We could start with a normal Venn diagram with the events R, B, and G marked. However, we know that the events R and G are mutually exclusive (since there are no balls colored both red and green), so we can draw these sets with no overlap (or include a probability of 0 in any intersection). We have the following Venn diagram.

We can note that any ball we select must contain one of the colors, so the probability that a ball does not contain one of these colors is 0. We can add this information on the diagram.

We are told that and , and we recall that means the event of βchoosing a ball that is both red and blueβ; this will be in the intersection of these two sets. We can add both of these probabilities on the diagram.

We can then use the fact that and to determine more probabilities on the diagram.

We can see that the sum of the probabilities in R must be 0.2, so the missing probability is . Similarly, the sum of the probabilities in G must be 0.5, so the missing probability is . Adding these on the diagram yields the following.

We do not actually need to find the final probability; however, we can always find the last probability in a Venn diagram by noting that the sum of the probabilities must be 1. Therefore, the last probability is given by .

We can find the total number of the balls in the bag, , by noting that the probability of drawing a blue ball from the bag is given by the formula

We can find using our Venn diagram, and we are told that there are 12 blue balls in the bag.

We have . Thus,

Hence, there are 20 balls in the bag, and .

In our final example, we will construct a Venn diagram to determine whether two events are mutually exclusive or not.

### Example 5: Determining If Two Events Are Mutually Exclusive by Constructing a Venn Diagram

Given that , , , , , , and , determine if and are mutually exclusive events.

We first recall that we say that two events and are mutually exclusive if the probability of both happening is 0; this is the same as saying that . Therefore, we can determine if and are mutually exclusive events by calculating . We can do this by constructing a Venn diagram. We start with three sets , , and .

We can represent on the Venn diagram by recalling that the complement of a set is everything not included in the set, so and are found by shading everything not in and respectively.

The intersection of these sets contains every element in both sets. In other words, this will be the overlap in the shading of these diagrams. This gives us the following.

In order to determine the probability of this set, we want to find the probability of each part of the shaded regions. We can do this using the information given. First, we are told that . The intersection of these sets is the section in the Venn diagram where , , and overlap. We can add this probability on the Venn diagram.

Second, we are told that . We can mark on the Venn diagram by shading the overlap between and .

We note that we already know that and that the entire highlighted set has a probability of 0.15, so the remaining section has a probability of .

In the same way, we can highlight on the Venn diagram.

Then, we can use the fact that to determine that the remaining highlighted section has a probability of .

Third, we can follow a similar process using . We highlight on the Venn diagram.

We note that the sum of the highlighted probabilities must be 0.4, so the missing probability is . We can add this on the Venn diagram.

We cannot use the given probabilities of and at this point. Instead, we need to use the fact that . We recall that the probability of an event with no members is 0, so . Thus, we can conclude that has a probability of 0 on the Venn diagram. To highlight this on the Venn diagram, we could separately highlight , , and and then take the region shaded in all three diagrams.

However, we already have the region , so we can instead find the overlap of this set with to find .

This section has a probability of 0, so we can add this on our Venn diagram.

We can now use the fact that to find another probability in the Venn diagram.

The sum of the probabilities inside must be 0.25, so the missing section has a probability of .

Similarly, , so the sum of the probabilities inside must be 0.75.

Therefore, the missing section has a probability of .

Any probability not accounted for in events , , and must be accounted for outside these events. We can note that the sum of all of the probabilities we have found so far is

This means that the probability of none of , , or occurring is 0. We can add this probability on the Venn diagram.

Highlighting on the Venn diagram with the probabilities included shows us that .

Hence, , and we can conclude that the events are mutually exclusive.

Letβs finish by recapping some of the important points from this explainer.

### Key Points

• is called the union of and and includes all elements in either or .
• is called the intersection of and and includes all elements in both and .
• , is called the complement of and includes all elements that are not in .
• We say that two events are mutually exclusive if they cannot both occur at the same time. In other words, , where is called the empty set, meaning the set with no members.
• If and are mutually exclusive events, then .
• For any event , and are mutually exclusive, and .
• We say that and are independent events when whether one event occurs or not does not affect the probability of the other occurring. In particular,