Set Theory Background for Probability Defining Sets (A Very Naïve Approach)
Total Page:16
File Type:pdf, Size:1020Kb
Set theory background for probability Defining sets (a very naïve approach) A set is a collection of distinct objects. The objects within a set may be arbitrary, with the order of objects within them having no significance. Here are several examples, demonstrating the above properties: 2,3,5,7,11,13,17,19 (the set of all prime numbers smaller than 20) , , , , , ,′′ The brackets … surround the objects that belong to a certain set. Objects are separated by commas. Note that: 1,2,3 1,3,2 (there is no ordering of objects within a set) 1,2,3,3 1,2,3 (sets contain one copy of each distinct object) Working with sets 1. Membership If an object is a member of a set we write: ∈. If an object is not a member of a set we write: ∉. 2. Subsets Assume that we have a set and another set , such that every element in is also a member of . Then we can write: ⊆. We say that is a subset of . Formally, we can write: ∀∈∈ (any that is a member of is a member of ) No need to worry: we will usually not encounter this formal logic notation. Notice that the sets of , may actually be equal. If they are not, there must be some member of that is not a member of . In this case we can write: ⊂ i.e. is a true subset of , or in logic notation: ∀ ∈ ∈ ∧∃∈∈ (any that is in is in AND there exists a in that is not in ). 3. Set equality Sets , are equal if and only if ⊆ and ⊆. 4. Abbreviated representation of sets and some common sets We can use 3 dots to represent a continued or an infinite list with some apparent rule: 1,2,3, … , Set of integers in the range 1‐N. 1,2,3, … Set of all natural numbers (integers > 0). 0,1,2,3, … Set of all non‐negative integers … , 2, 1,0,1,2, … Set of all integers We can define a set in abbreviated form by defining a rule: ℚ :,∈,0 Set of all rational numbers. Other common sets are the set of real numbers (this includes all rational numbers plus many others, such as , √2,,…) and the set of complex numbers , which can be defined simply as follows: :,∈,√1. 5. Venn diagrams It is convenient to depict sets by circles with individual objects marked as dots within them (not all objects need be marked). For example: A B This implies that ⊂. Fig. 1 We can have more complicated interactions between pairs (and larger collections) of sets. For example: The overlap area (brown) includes objects A B that are members of both and of . The green and red areas include correspondingly objects that are solely in A or in B but not in both. We now come to operators that deal with such interactions between sets. Fig. 2 6. Set operators The union of two sets , is a new set, containing all the objects from both sets. We write the union this way: ∪. A formal definition would be: ∪: ∈ ∈ . Example: 2,3,5,8, 1,5,9. Then ∪ 1,2,3,5,8,9. The number of elements in C is at least as large as the number of objects in the largest of the sets A,B. The intersection of two sets , is a new set, containing only objects that are both in A and in B. ∩, or ∩:∈ ∈. For the above example, ∩5. 7. Cardinality Cardinality is a term that we can usually replace with size. For finite sets, these terms are interchangeable. The notation for cardinality are straight vertical lines surrounding the set in question. Examples: |1,2,3| 3. |: 20 | 8. || ∞ (actually, this is an inaccurate statement… is the notation for this kind of countable infinity.) 8. Universal sets Sometimes we are interested only in sets that are all subsets of a certain “universal” set (sometimes also referred to as the space). Let’s consider as an example sets that are all subsets of the natural number set . : ∈ is one such subset of . Within this universal set, we can define the complement set ∁ (in some texts denoted by ′ or ) as follows: ∁ ∈ ∉. For the above example, the set ∁ is the set of all non‐prime integers. The Venn diagram would make sense if we imagine all sets discussed being contained within a space, marked usually by a rectangle: PC P Fig. 3 The relative complement is an asymmetric operator between two sets: ∖ ≡ : ∈ ∉ . For 2,3,5,8, 1,5,9, ∖ 2,3,8. 9. The empty set The empty set, denoted by ∅, is a set without any objects (i.e. for any object , ∉ ∅). Notice (or try to show!) that: For any set , ∅⊂. For any set , ∅∪. For any set , ∅∩∅. 10. Sets of sets Sets can include arbitrary objects, including other sets1. In many cases, once given a set , we would be interested in generating a new set, that contains as its objects some or all of the subsets of . Let’s start with an example. Assume that 1,2,3,4,5,6,7,8,9,10. Now let’s imagine all possible pairs of numbers from S. Each pair is a subset of S itself. For example, 2,6 ⊂ . How many such pairs do we have? Notice that since we are interested in a set containing two elements from S, the order of the elements doesn’t matter. We have 10 ways of choosing the object in the pair, and then 9 ways of choosing the second from the remaining objects. Since every pair was wrongly counted twice in this process (, ,), we must divide the result by 2 to get the number of unique pairs: 10 ⋅ 9/2 45. We can imagine a new set, T, whose members are all the sets of pairs from S: , : , ∈ . Notice that S and T have no objects in common. This is because the objects in T are all sets themselves, while the objects in S are integers. To make things clear: . . 1 We will ignore the difficulties that may generate. Just as a teaser, consider Russell’s beautiful paradox. Imagine that we define a rule for set S ‐ S includes all sets that do not include themselves. Does the set S include S as one of its objects? 11. The power set Given a set we can construct a set that contains all subsets of . For example, for the set 1,2,3,4, the power set is: ∅, , 1, 2, 3, 4, 1,2, 2,3, 3,4, 1,3, 2,4, 1,4, 1,2,3, 2,3,4, 1,2,4, 1,3,4. Notice that the numbers 1‐4 themselves are NOT objects of , only the subsets 1, 2, 3, 4 are! Notice that || 162 2||. Try to show (or provide an intuition) why for any finite set with cardinality N (i.e. || ), the cardinality of the power set is || 2. 12. Cartesian products Given the sets , , we can generate a new set , : ∈, ∈. is a set containing as its objects ordered sequences of elements. The fact that the objects of are sequqnces is denoted by the regular brackets surrounding the comma‐separated list. In the above example, the first element in each sequence is an object from , while the second element in each sequence is an object from . For example, we can think of all points in the two‐dimensional real space as the Cartesian product ,:,∈. Because the elements of are sequences, , , if and only if . Cartesian products are very useful for conceptualizing repeated experiments. For example, consider a coin toss, where the possible outcomes are ,. Then all possible results of 3 consecutive coin tosses are contained in the set : ,,: ∈ ,,, , , , ,,, , , , , , , , , , , , , , , The cardinality of the resulting set is the product of the generating sets. In the above example, || || ∙ || ∙ || || 8. 13. Algebra of sets – some basic laws A relatively comprehensive list of set theory laws can be found here: http://en.wikipedia.org/wiki/Algebra_of_sets Skipping the trivial ones (e.g. ∩,∪,…), here are some important ones which you can try to prove: Distributive laws: ∪∩ ∪∩∪ ∩∪ ∩∪∩ De Morgan’s laws: ∪ ∁ ∁ ∩∁ ∩ ∁ ∁ ∪∁ Laws pertaining to complements: ∖⋂∁ ∖∁ ∁ ∪ (The basic technique for proving equalities in set theory is to take a member of the set defined on each side of the equal sign, and show that it must also be a member of the set defined on the other side. Thus, both sets are shown to contain one other and must be equal.) Exercises (difficult exercise marked by *): 1. Prove that within the universal space , for every ⊂, ∁|| ||. 2. Prove that for any two sets , , |∪| || || |∩|. 3. Show that for any two sets , , ∖ ∪ ∖ ∪∖⋂. 4. (*) Prove the inclusion‐exclusion principle: For any choice of sets ,,…,, | ∪ ∪…∪| ∑| | ∑ ∩∑ ∩ ∩⋯1 | ∩…∩| ∑ ∑ (can be written in shorthand as: ⋃ 1 ⋯⋂ o Notice that for 2, this is just exercise 2. Combinatorics for probability Probability theory deals with both continuous and discrete distributions. Discrete distributions are those in which the outcomes can be counted, e.g. the number of phone calls arriving within a certain time interval, the result of a dice toss, etc. In the case of discrete distributions, many questions in probability boil down to questions of counting the number of possible outcomes. For example, assume we toss two dice, and want to know the probability that the sum is 5. Assuming the dice are fair, all outcomes are equally probable. There are 6∙636 different outcomes. From these, the following pairs of values lead to a sum of 5: (1,4),(2,3),(3,2),(4,1). Notice that (1,4) and (4,1) are unique different outcomes (just imagine the two dice have different colours).