Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Discrete-Chapter 07 Probability

480 views

Published on

  • Be the first to comment

  • Be the first to like this

Discrete-Chapter 07 Probability

  1. 1. Probability - 07 CSC1001 Discrete Mathematics 1 CHAPTER ความน่าจะเปน ็ 7 (Probability) 1 Introduction to Discrete Probability1. Finite Probability Definition 1 If S is a finite nonempty sample space of equally likely outcomes, and E is an event, that is, a subset of S, E then the probability of E is p( E ) = S Definition 2 if E is an event from a finite sample space S, then 0 ≤ |E| ≤ |S|, because E ⊆ S. E Thus, 0 ≤ p( E ) = ≤ 1 SExample 1 (2 points) Bag contains four blue balls and five red balls. What is the probability that a ball chosenat random from the bag is blue?Example 2 (6 points) There are six small size oranges, four medium size oranges and five big size oranges.1) What is the probability that a orange chosen at random is small size orange?2) What is the probability that a orange chosen at random is medium size orange?3) What is the probability that a orange chosen at random is big size orange?Example 3 (2 points) What is the probability that when two dice are rolled, the sum of the numbers on the twodice is 7?มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  2. 2. 2 CSC1001 Discrete Mathematics 07 - ProbabilityExample 4 (10 points) Given a group of characters is { A, A, B, B, C, C, C, D, D, D, D, E }, if you select onecharacter from this group find p(A), p(B), p(C), p(D) and p(E)?Example 5 (2 points) What is the probability that a card selected at random from a standard deck of 52 cardsis an ace?Example 6 (2 points) What is the probability that a randomly selected day of a leap year (with 366 possibledays) is in April?Example 7 (2 points) What is the probability that the sum of the numbers on two dice is even when they arerolled?Example 8 (2 points) What is the probability that a randomly selected integer chosen from the first 100 posi-tive integers is odd?2. Probabilities of Complements and Unions of Events Definition 3 Let E be an event in a sample space S. The probability of the event E = S - E, the complementary event of E, is given by p( E ) = 1 - p(E) Definition 4 Let E1 and E2 be events in the sample space S. Then p(E1 ∪ E2) = p(E1) + p(E2) - p(E1 ∩ E2)มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  3. 3. Probability - 07 CSC1001 Discrete Mathematics 3Example 9 (2 points) A sequence of 10 bits is randomly generated. What is the probability that at least one ofthese bits is 0?Example 10 (2 points) A sequence of 7 bits is randomly generated. What is the probability that at least one ofthese bits is 1?Example 11 (2 points) What is the probability that a positive integer selected at random from the set ofpositive integers not exceeding 100 is divisible by either 2 or 5?Example 12 (2 points) There are 4 blue balls and 8 red balls in the basket, if there are 20 balls in the basketand event of selecting both of blue and red balls at random from the basket is 3, find p(Eblue ∪ Ered)?3. Conditional Probability Definition 5 Let E and F be events with p(F) > 0. The conditional probability of E given F, denoted by p(E | F), is defined p(E ∩ F) as p(E | F) = . p(F)Example 13 (2 points) A bit string of length four is generated at random so that each of the 16 bit strings oflength four is equally likely. What is the probability that it contains at least two consecutive 0s, given that itsfirst bit is a 0? (We assume that 0 bits and 1 bits are equally likely.)มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  4. 4. 4 CSC1001 Discrete Mathematics 07 - ProbabilityExample 14 (2 points) A bit string of length three is generated at random so that each of the 8 bit strings oflength three is equally likely. What is the probability that it contains at least two consecutive 1s, given that itsfirst bit is a 1? (We assume that 0 bits and 1 bits are equally likely.)4. Independence Definition 6 The events E and F are independent if and only if p(E ∩ F) = p(E) p(F).Example 15 (2 points) If there are two event in this sample space and given p(E) = 0.4, find p(E ∩ F), if Eand F are independent?Example 16 (2 points) Suppose E is the event that a randomly generated bit string of length four begins with a1 and F is the event that this bit string contains an even number of 1s. Are E and F independent, if the 16 bitstrings of length four are equally likely?Example 17 (2 points) Assume that each of the four ways a family can have two children is equally likely. Arethere independent? If given the events E, that a family with two children has two boys, and F, that a familywith two children has at least one boy.Example 18 (2 points) Are the events E, that a family with three children has children of both sexes, and F,that this family has at most one boy, independent? Assume that the eight ways a family can have threechildren are equally likely.มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  5. 5. Probability - 07 CSC1001 Discrete Mathematics 5Example 19 (2 points) Assume that each of the four ways a family can have two children is equally likely. Arethere independent? If given the events E, that a family with two children has two boys, and F, that a familywith two children has at least one boy.Example 20 (2 points) Let E be the event that a randomly generated bit string of length three contains an oddnumber of 1s, and let F be the event that the string starts with 1. Are E and F independent?Extra-example 21 (2 points) Suppose that E and F are events such that p(E) = 0.7 and p(F) = 0.5.Show that p(E ∪ F) ≥ 0.7 and p(E ∩ F) ≤ 0.2. 2 Expected Value1. Expected ValueThe expected value of a random variable is the sum over all elements in a sample space of the product of theprobability of the element and the value of the random variable at this element. Definition 1 The expected value, also called the expectation or mean, of the random variable X on the sample space S is equal to E(X) = ∑ p(s)X(s) s∈S The deviation of X at s ∈ S is X(s) - E(X), the difference between the value of X and the mean of X.มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  6. 6. 6 CSC1001 Discrete Mathematics 07 - ProbabilityExample 22 (2 points) Let X be the number that comes up when a fair die is rolled. What is the expectedvalue of X?Example 23 (2 points) A fair coin is flipped three times. Let S be the sample space of the eight possibleoutcomes, and let X be the random variable that assigns to an outcome the number of heads in this outcome.What is the expected value of X?Example 24 (2 points) What is the expected number of heads that come up when a fair coin is flipped fourtimes?Example 25 (2 points) A coin is biased so that the probability a head comes up when it is flipped is 0.6. Whatis the expected number of heads that come up when it is flipped 4 times?Example 26 (2 points) The final exam of a discrete mathematics course consists of 50 true/false questions,each worth two points, and 25 multiple-choice questions, each worth four points. The probability that Lindaanswers a true/false question correctly is 0.9, and the probability that she answers a multiple-choice questioncorrectly is 0.8. What is her expected score on the final?มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี

×