Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
1.2: The number of elements in a set Cardinality: Number of elements of a set. Denote as n(A). U A n(A) Example 1. The set A = {a, 2, 4, e} has 4 elements in it. If B = {x|x is an even number between 0 and 9, inclusive} has 5 ({0, 2, 4, 6, 8}) elements in it. Some Results (1) n(∅) = 0 (2) If A and B are disjoint, then n(A ∪ B) = n(A) + n(B) U A B (3) Since A and AC are disjoint, n(U ) = n(A) + n(AC ) (4) The Union Rule: For any finite sets A and B, Let n(A∩B C ) = x, n(A∩B) = y and n(AC ∩B) = z. Then n(A ∪ B) = x + y + z = (x + y) + (y + z) − y = n(A) + n(B) − n(A ∩ B). U A B (5) If n(A) = n, then A has 2n subsets and 2n − 1 proper subsets. Example 2. Find all the subsets of A = {a, b, c}. 1 Example 3. Given n(U ) = 75, n(A) = 40, n(B) = 45, and n(A ∪ B C ) = 45 find n(A ∪ B). U A B Solution. Denote each disjoint part as a, b, c, d, respectively. We know that • n(U ) = 75 → a + b + c + d = 75. • n(A) = 40 → b + c = 40. • n(B) = 45 → c + d = 45. • n(A ∪ B C ) → a + b + c = 45. • need to find n(A ∪ B) → b + c + d Since we know b+c, we need to find the value of d. Indeed, d = (a+b+c+d)−(a+b+c) = 75−45 = 30. So (b + c) + d = 40 + 30 = 70. We may understand above solution in the following way: Note that A∪B = (AC ∩B)∪A. Meanwhile, A and AC ∩B are disjoint. So n(A∪B) = n(AC ∩B)+n(A). As (AC ∩ B)C = A ∪ B C (by (AC )C = A and De Morgan law), n(AC ∩ B) = n(U ) − n(A ∪ B C ) = 30. Therefore, n(A ∪ B) = 30 + 40 = 70. Example 4. Given n(U ) = 100, n(A) = 40, n(B) = 37, n(C) = 35, n(A ∩ B) = 25, n(A ∩ C) = 22, n(B ∩ C) = 24, and n(A ∩ B ∩ C C ) = 10, find n((A ∪ B ∪ C)C ). U A B C Solution. We denote each disjoint part as a to h. We start by A ∩ B and A ∩ B ∩ C C : • a = n(A ∩ B ∩ C) = n(A ∩ B) − n(A ∩ B ∩ C C ) = (a + b) − b = 25 − 10 = 15. • By similar idea we have c = n(A ∩ C) − a = 7 and d = n(B ∩ C) − a = 9. • e = n(A) − (a + b + c) = 8, f = n(B) − (a + b + d) = 3, g = n(C) − (a + c + d) = 4. • n(A∪B ∪C) = a+b+· · ·+g = 56. So h = n((A∪B ∪C)C ) = n(U )−n(A∪B ∪C) = 100−56 = 44. 2 Example 5. A recent survey of 200 children found that 150 liked brownies, 90 liked ice cream, and 190 liked brownies or ice cream. a) How many children liked brownies and ice cream? b) How many children liked exactly one of these two desserts? c) How many children liked brownies or did not like ice cream? Solution. Let A = {children who like brownies} and B = {children who like ice cream}. So n(U ) = 200, n(A) = 150, n(B) = 90, n(A ∪ B) = 190. (a) n(A ∩ B) = n(A) + n(B) − n(A ∪ B) = 50. (b) We need to find n((A ∩ B C ) ∪ (B ∩ AC )) = n(A ∩ B C ) + n(AC ∩ B) (since they are disjoint). In fact, n(A ∩ B C ) = n(A) − n(A ∩ B) = 100 and n(B ∩ AC ) = n(B) − n(A ∩ B) = 40. So the desired result is 100 + 40 = 140. (c) n(A ∪ B C ) = n(A) + n((A ∪ B)C ) = n(A) + n(U ) − n(A ∪ B) = 160. Example 6. A survey of 150 readers was conducted. Let F be the set of readers who enjoy fantasy novels. Let M be the set of readers who enjoy mystery novels. Let C be the set of readers who enjoy classical literature. Use the survey results below to find the number of people in each section of the given Venn diagram. • 10 enjoy all three genres U • 36 enjoy at least two of these genres F M • 68 enjoy mystery novels • 5 enjoy fantasy and mystery, but not classical literature • 14 do not enjoy any of these genres • 13 enjoy fantasy and classical literature C • 98 enjoy mystery or classical literature, but not fantasy a) Find the number of people who only enjoy fantasy. b) Find the number of people who enjoy at least one of these genres. c) Find the number of people who enjoy fantasy or classical literature, but not mystery. Solution. Denote each disjoint part by a, · · · , h. So we translate each item as: 3 • a = 10; • a + b + c + d = 36; • a + b + d + f = 68; • b = 5; • h = 14; • a + c = 13; • d + f + g = 98. So we have • a = 10, b = 5, h = 14, • c = (a + c) − a = 3, • d = (a + b + c + d) − (a + b + c) = 18, • f = (a + b + d + f ) − (a + b + d) = 35, • g = (d + f + g) − (d + f ) = 45, • e = n(U ) − (a + b + c + d + f + g + h) = 20. (a) e = 20. (b) n(A ∪ B ∪ C) = n(U ) − h = 136. (c) n(F ∪ C ∩ M C ) = e + c + g = 68. A summary of set notation: [This list is not comprehensive.] • U is the universal set. • ∅ = {} is the empty set • a ∈ A means a is in (or is an element of) A • {x|statement defining what elements belong to the set} is set-builder notation • {a, b, c, ...} is roster notation • A = B (equality) means that every element in A is also an element of B and every element in B is also an element of A. • A ⊆ B (subset) means that every element in A is an element of B. • A ⊂ B (proper subset) means that every element of A is an element of B but A does not equal B • A ∪ B (union) is the set of elements that are in A or are in B • A ∩ B (intersection) is the set of elements that are in A and are in B • AC (complement) is the set of elements in the universal set that are not in A • n(A) is the number of elements in A 4 1.3 Sample Spaces and Events Experiment: An activity that has observable results. Outcome: The result of the experiment. Sample Space (of an experiment): The set of all possible outcomes of the experiment. Trial: Each repetition of an experiment. Example 7. (a) Flip a coin (”heads” or ”tails”); (b) throw a die (one to six dots) Example 8. Determining the sample space: Two dice, identical except that one is green and the other is red, are tossed and the number of dots on the top face of each is observed. what is the sample space for this experiment? Solution. We express the outcomes as order pairs. For example, (1, 2) means 1 dot on the top face of the green die and 2 dots on the top face of the red die. Denote the sample space as S. So S = {(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)}. Example 9. Determining the sample space: A coin is flipped twice to observe whether heads or tails shows: order is important. What is the sample space for this experiment? Use the tree diagram. 5 Solution. Let H and T stand for hands and tails respectively. So S = {(H, H), (H, T ), (T, H), (T, T )} Event: Given a sample space S for an experiment, an event is any subset E of S. Elementary (or simple) Event: An event with a single outcome. Example 10. Finding Events: A coin is flipped twice to observe whether heads or tails shows: order is important. Find the events: (a)“at least one head comes up”; (b) “exactly two heads come up”. Are either events elementary events? Solution. ”At least one head comes up” = {(H, H), (H, T ), (T, H)}. ”Exactly two tails come up” = {(T, T )}. Note: we can use our set langrage for union, intersection and complement to describe events. Throughout, E and F denote two events. Union of E and F : If E and F are two events, then E ∪ F is the union of the two events and consists of the set of outcomes that are in E or F . Intersection of E and F : If E and F are two events, then E ∩ F is the intersection of the two events and consists of the set of outcomes that are both E and F . Complement of E: If E is an event, the E C is the complement of E and consists of the set of outcomes that are not in E. Example 11. Determining the Union, Intersection, and Complement: Two dice, identical except that one is green and the other is red, are tossed and the number of dots on the top face of each is observed. E: the number of dots on the top faces of both dice is 2 or 4. 6 F : the sum of dots on the top faces of the two dice is 6. G: the sum of dots on the top faces of the two dice is less than 11. a) List the elements of E and F b) Find E ∪ F c) Find E ∩ F d) Find Gc Solution. (a) E = {(2, 2), (2, 4), (4, 2), (4, 4)} and F = {(1, 5), (2, 4), (3, 3), (4, 2), (5, 1)}. (b) E ∪ F = {(2, 2), (2, 4), (4, 2), (4, 4), (1, 5), (3, 3), (5, 1)}. (c) E ∩ F = {(2, 4), (4, 2)}. (d) GC = {(5, 6), (6, 5), (6, 6)}. The empty set, ∅, is called impossible event. Let S be the sample space. The event S is called certainty event. Two events E and F are said to be mutually exclusive if the sets are disjoint. That is E ∩ F = ∅. Continuous Sample Spaces Example 12. Consider the experiment of the amount of time an Aggie student stands during a 60minute football game. a) Describe the sample space. b) Describe the event that a student stands less than 1.2 minutes. c) Describe the event that a student stands between 30 minutes and 60 minutes, inclusive. Solution. (a) S = {t | 0 ≤ t ≤ 60, t in minutes}. (b) E = {t | 0 ≤ t < 1.2, t in minutes}. (c) F = {t | 30≤t≤60, t in minutes} 1.4 Basics of Probability Uniform sample space: Simple spaces for which the outcomes (elementary events) are equally likely. 7 If S is a finite uniform sample space and E is an event, then the probability of E, denoted by P (E), is given by P (E) = Number of the element in E n(E) = . Number of the element in S n(S) Example 13. Probability for a Single Die: Suppose a fair die is rolled and the sample space is S = {1, 2, 3, 4, 5, 6}. Determine the probability of each of the following events. a) The die shows an odd number. b) The die shows the number 8. c) The die shows a number less than 8. Solution. (a) Since E = {2, 4, 6}, P (E) = n(E) n(S) = 12 . ) (b) Since F = ∅, P (F ) = n(F = 0. n(S) (c) Since G = S, P (G) = 1. Example 14. Probability for Two Coin Flips: A fair coin is flipped twice to observe whether heads or tails shows; order is important. What is the probability that tails occur both times? Solution. Since S = {(H, H), (H, T ), (T, H), (T, T )} and E = {(T, T )}, P (E) = n(E) n(S) = 14 . Example 15. Probability for a Single Card: Suppose a single card is randomly draw from a standard 52-card deck. Determine the probability of each of the following events. a) A king is drawn. b) A heart is drawn. 4 = Solution. (a) Since E = {K♣, K♥, K♦, K♠}, P (E) = 52 13 1 (b) The event F contains 13 hearts. So P (F ) = 52 = 4 . 1 . 13 Empirical Probability: the probability obtained from real experiments. Example 16. A 6-sided die is rolled 120 times and the number rolled each time is recorded. The results are given below. N umberRolled Frequency 1 2 3 4 15 24 22 15 What is the empirical probability that an odd number is rolled? 8 5 6 28 16 Solution. Since S = {1, 2, 3, 4, 5, 6} and E = {1, 5, 3}. According to the table above n(S) = 120 and n(E) = 15 + 22 + 28 = 65. So n(E) 65 13 P (E) = = = . n(S) 120 24 Probability distribution table: A useful way to display probability data for an experiment. In the table there is one column (or row) for the probability of the event. Requirement of the table: • The events listed must be mutually exclusive (disjoint). • The sum of the probabilities must be 1 (list all the possible events). Example 17. Suppose I have a jar filled with 6 green marbles, 3 blue marbles, and 9 purple marbles. An experiment consists of selecting one marble from the jar and observing its color. a) Draw the probability distribution table associated with this experiment. b) What is the probability that the marble is not green? Solution. (a) Step 1: We first list all the possible events. By selecting on marble, we only observe one color. So we have E1 = {select a green marble}, E3 = {select a blue marble}, E2 = {select a purple marble}. Step 2: Then we compute probabilities of events we listed. Note that n(S) = 6 + 3 + 9 = 18 P (E1 ) = 6/18 = 1/3, P (E2 ) = 3/18 = 1/6 and P (E3 ) = 9/18 = 1/2. Step 3: Combing all the information above to build the table. E1 E2 E3 1 3 1 6 1 2 (b) P (E2 ∪ E3 ) = P (E2 ) + P (E3 ) = 2/3. Example 18. The speed of 500 vehicles on a highway with limit of 55 mph was observed, with 60 going less than 55 mph and 360 going less than 65 mph. a) Find the empirical probability distribution. b) What is the (empirical) probability that a vehicle chosen at random on this highway will be going at least 65 mph? Solution. (a) Step 1: Based on the problem, the two critical speeds are 55 mph and 65 mph. Since events we will list are mutually exclusive, we consider 9 E1 = {vehicles | speed < 55}, E2 = {vehicles | 55 ≤ speed < 65}. E3 = {vehicles | speed ≥ 65}. Step 2: Compute the probabilities: n(S) = 500 and n(E1 ) = 60. Since we observed 360 going less than 65 mph and 60 of them are particularly less than 65. Thus, n(E2 ) = 360 − 60 = 300. For the rest, n(E3 ) = n(S) − n(E1 ) − n(E2 ) = 140. Therefore, P (E1 ) = 3 60 = , 500 25 P (E2 ) = 300 3 = , 500 5 E1 E2 E3 3 25 3 5 7 25 Step 3: build the table (b) P (E3 ) = 7/25. 10 P (E3 ) − 140 7 = . 500 25