Venn Diagrams A Venn diagram is a type of diagram used in mathematics, logic, linguistics andmany other fields. It is named after John Venn, who pioneered the use of suchdiagrams for logic in his 1881 book Symbolic Logic. The Venn diagram consists of two or more overlapping circles (or ellipses). The setof elements common to each circle is shown as an area common to both circles.Where the circles overlap, only one element can be present, so this area representsthe union of the sets represented by the distinct circles. Let's first write the set A in our old notation. We have curly braces 1, 5, 10, 2. So weknow that A is equal to what? It's equal to four. Okay. Here we've written the set bylisting out its elements explicitly. Another way to write it is to write a big circle and putthe elements inside floating around-- 1, 5, 2 – these are just some elements of A. Wejust think of A, a bag with some things in it; there they are. Okay? And by the way,you can write this any way you want; so maybe this is the same as 1, 2, 10, 5; itdoesn't matter how you write it as long as everybody knows what it means.This technique for visualizing intersections can be used to illustrate things likeintersections. Let's say we have two sets with respective memberships A = 1, 2, 10and 5, and B = 5, -7, 10 and 3. Both A and B intersect at 10 and 5 because theyshare them in common. We can demonstrate that by overlapping the two sets likethis. Notice that the elements of B not found in A are -7 and 3. Similarly, we would beable to tell that C is disjoint from A because it has no elements in common with anyother set. A intersect C is the empty set, B intersect C is the empty set. Okay. So that's kind of neat. One formula that is always true involves the union of two sets . This formula isconcerned with the count of elements in a set when there are other sets involved.When we consider the elements of the union of two sets , we must include those thatare in either or both of the sets . The inclusion-exclusion formula states that thecardinality (size) of this set is equal to that of set A plus that of set B minus thenumber of elements in common between A and B.Let us first check to see if this is true. Working over here, we know the cardinality ofA union B is equal to the sum of their individual cardinals. We can count this easilyby totaling each set: A consists of 1, 2, 10, 5 and -7; B consists of 10, 5 and -7; Aintersect B consists of only 10 and 5. We are essentially asking if 6 = 4+4-2; in fact,we find that this statement holds true. Let us erase this question mark and put in acheckmark instead indicating that our statement is correct. If we take the cardinality of set A, we count its elements—there are 10 elements. Ifwe then take the cardinality of set B and count its elements, there are five elements.
What's wrong with saying that the cardinality of A union B equals the cardinality of Aplus B's cardinality? Well, we've double-counted; we've given ourselves too muchcredit because we counted 10 and 5 twice. So to account for that, we subtract onecopy of 10 and one copy of 5 from our answer. Therefore, cardinality of A union Bequals A's cardinality plus B's cardinality minus the number of elements that arecommon to both sets (in this case, two). Now that we have the Venn diagram, let us revisit our medical testing example. Solet us remember that X was equal to all the people who took some exam; these areall the people, then, who did not have I believe we called it VBS for very badsyndrome—X intersect S: the people who had it. And so we draw a partition here: aline separates the healthy from the sick. Notice that H intersect S is empty: no onehas both diagnoses. And so somehow we use that line to divide the two groups.
We can make another partition of X, where X is the set of people who tested positivefor VBS. Some of these people will be relieved to find that they do not have VBS,while others will be distressed by their diagnosis. So on this side might be the people who tested negative, and on this side might be the people who tested positive. Andnotice the way I've drawn it: Venn diagrams are never a way to compute something,they're a way to encode visual assumptions. Notice that H and N are not the samebut share a lot of area, and P and S are not the same but share a lot of area. This figure illustrates an important concept in diagnostic testing, where the S and Nsets are those whose test results indicate that they have a disease and those whosetest results indicate that they do not have the disease. For example, the people in Sbut also in N are false negatives – they have the disease but their test tells them theydo not. On the other hand, H intersecting P is a false positive: people who do nothave the disease but whose tests indicate that they do. Ideally, a perfect diagnostictest would result in no intersection between S and N or H and P; this would ensurethat everyone who does have a disease gets treatment for it and that those who donot have it avoid unnecessary anxiety associated with being falsely identified ashaving it.