370 likes | 559 Views
Topic 3. Set Theory, Logic, and Probability. Set Theory. Set – any well-defined list or collection of objects (called elements or members) Ex. The letters: b, i, k, e The numbers: 2, 3, 4, 5, 6 The people in this class Notation – We use braces { } to denote a set Ex. {b, i, k, e}.
E N D
Topic 3 Set Theory, Logic, and Probability
Set Theory • Set – any well-defined list or collection of objects (called elements or members) Ex. The letters: b, i, k, e The numbers: 2, 3, 4, 5, 6 The people in this class • Notation – We use braces { } to denote a set Ex. {b, i, k, e}
- is an element of • - is not an element of Ex. Let A = {1, 3, 5, 7, 9} 3 A • Set builder notation {x | x, 3 < x < 8} x such that x is an element of the real numbers between 3 and 8.
n(A) - Cardinal number of set A, which means the number of elements in set A. Ex. If A = {orange, apple, pear, banana} then n(A) = 4 • Finite set – has a countable number of elements • Infinite set – has an infinite number of elements • Null set (empty set) – a set with no elements Notation for null set is { } or
Equal sets – contain the same elements If A = {1, 3, 5, 7} and B = {1, 3, 5, 7} then A = B • Equivalent sets – contain the same number of elements If A = {1, 3, 5} and B = {2, 8, 14} then A
- is a subset of • - is not a subset of Ex. {2} {2, 4, 6} notice the difference in notation 2 {2, 4, 6} If A = {2, 4, 6} Then subsets of A are: { }, {2}, {4}, {6}, {2,4}, {4,6}, {2,6}, {2,4,6} Number of subsets =
is a proper subset of • is not a proper subset of Proper subset does not include itself Ex. If A = {2, 4, 6} Then proper subsets of A are: { }, {2}, {4}, {6}, {2,4}, {4,6}, {2,6}
Venn Diagrams • Intersection of two sets is the elements they have in common • A B • can be read as “and”
Union of two sets is all elements in both sets (listed once) • n(A B) = n(A) + n(B) – n(A B) • can be read as “or”
U – the universal set, the set from which the sets of a particular situation are drawn. Ex. If we want the set of students with brown hair in our class, then the universal set is all the students in the class. • A’ – the complement of A, all the elements that are not in A but are in the universal set. Ex. The complement of students with brown hair is student without brown hair.
Difference – all elements in A and not in B Notation: A\B
A U A’ = U The union of a set and its complement is the universal set. • A A’ = The intersection of a set and its complement is the null set. • n(A) + n(A’) = n(U) The number of elements in a set and in it’s complement is equal to the number of elements in the universal set.
Logic • Logic – the study of correct reasoning • Proposition – a statement that is either true or false Ex. Today is Saturday. 4 < 5 Mary is 18 years old.
We use the letter p, q, and r to represent propositions. • p means the negation of p or “not p” Ex. Proposition p: Today is Saturday. Negation p: Today is not Saturday.
Conjunction • Conjunction means “and” Notation: p q Ex. p: John studies English q: Susan studies Spanish p q: John studies English and Susan studies Spanish
Truth Tables - Conjunction Both propositions have to be true for the conjunction to be true.
Disjunction • Disjunction means “or” Notation: p q Ex. p: John studies English q: Susan studies Spanish p q: John studies English or Susan studies Spanish
Truth Tables - Disjunction At least one of the propositions has to be true for the disjunction to be true.
Exclusive Disjunction Ex. of inclusive disjunction Bob will go home if Rob is running late or it is raining. We mean one or the other or both: p V q Ex. of exclusive disjunction Bob will go to Orcas by plane or ferry We mean one or the other: p V q
Implications • If p then q Notation: pq Ex. p: John is not at work q: John is sick pq: If John is not at work then he is sick
Truth Tables for Implications Ex. p: You get an A q: I buy you ice cream pq: If you get an A then I buy you ice cream When am I lying?
p: A quadrilateral is a square q: A quadrilateral is a rectangle Implication: pq If a quadrilateral is a square then it is a rectangle Converse: pq If a quadrilateral is a rectangle then it is a square Inverse: p q If a quadrilateral is not a square then it is not a rectangle Contrapositive: pq If a quadrilateral is a not rectangle then it is not a square
Equivalence • Equivalence – When an implication and its converse are true. Notation: iff (read as if and only if) Implication: p q If lines are parallel then corresponding angles are congruent. Converse: q p If corresponding angles are congruent then lines are parallel. Equivalence: pq Lines are parallel if and only if corresponding angles are congruent.
Tautology – a compound proposition that is always true regardless of the truth values of the individual propositions
p or not p • The compound proposition p Vp is a tautology because all of the conclusion are true
If p, then p or q • In symbols: p(p V q) • All conclusions are true so the proposition is a tautology
If Julia is sick she will not go to work. Julia is not sick. Therefore Julia will go to work. Propositions p: Julia is sick p: Julia is not sick q: Julia will go to work q: Julia will not go to work Argument If Julia is sick then she will not go to work pq Julia is not sick p Combined [pq p] Conclusion is Julia will go to work [pq p]q
Since the compound proposition is not a tautology the argument is invalid.
Probability • Equally likely – each outcome has the same chance of happening
Ex. What is the probability of rolling a 3 on a six sided die? • Ex. What is the probability of not rolling a 3 on a six sided die? • Ex. What is the probability of rolling a factor of six on a six sided die?
Intersections • Uses “and” • The symbol | means “given that” Ex. What is the probability of drawing a 7 and a king?
Independence • Dependence vs. Independence • “without replacement” vs. “with replacement” • Test for independence Ex. What is the probability of drawing a 7 and a king if the cards are replaced each time? Ex. What is the probability of drawing a 7 and a king if the cards are not replaced each time?
Union • Uses “or” Ex. What is the probability of drawing a 7 or a red card?
Mutually Exclusive • Two events are mutually exclusive if they have no overlap (no intersection). In logic, we called this exclusive disjunction. Ex. What is the probability of drawing a 7 or a King?
Conditional Probability • Remember this formula? • Solve for • I like to use tree diagrams for these problems.