SlideShare a Scribd company logo
1 of 6
Download to read offline
Probability - 07                                                               CSC1001 Discrete Mathematics           1

 CHAPTER
                                                         ความน่าจะเปน ็
       7                                                  (Probability)

  1        Introduction to Discrete Probability
1. 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
                        S


Example 1 (2 points) Bag contains four blue balls and five red balls. What is the probability that a ball chosen
at 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 two
dice is 7?




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                     เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
2         CSC1001 Discrete Mathematics                                                               07 - Probability


Example 4 (10 points) Given a group of characters is { A, A, B, B, C, C, C, D, D, D, D, E }, if you select one
character 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 cards
is an ace?




Example 6 (2 points) What is the probability that a randomly selected day of a leap year (with 366 possible
days) is in April?




Example 7 (2 points) What is the probability that the sum of the numbers on two dice is even when they are
rolled?




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)                                  เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Probability - 07                                                           CSC1001 Discrete Mathematics            3
Example 9 (2 points) A sequence of 10 bits is randomly generated. What is the probability that at least one of
these bits is 0?




Example 10 (2 points) A sequence of 7 bits is randomly generated. What is the probability that at least one of
these bits is 1?




Example 11 (2 points) What is the probability that a positive integer selected at random from the set of
positive 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 basket
and 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 of
length four is equally likely. What is the probability that it contains at least two consecutive 0s, given that its
first bit is a 0? (We assume that 0 bits and 1 bits are equally likely.)




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                  เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
4         CSC1001 Discrete Mathematics                                                             07 - Probability


Example 14 (2 points) A bit string of length three is generated at random so that each of the 8 bit strings of
length three is equally likely. What is the probability that it contains at least two consecutive 1s, given that its
first 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 E
and F are independent?




Example 16 (2 points) Suppose E is the event that a randomly generated bit string of length four begins with a
1 and F is the event that this bit string contains an even number of 1s. Are E and F independent, if the 16 bit
strings 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. Are
there independent? If given the events E, that a family with two children has two boys, and F, that a family
with 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 three
children are equally likely.

มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                                   เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
Probability - 07                                                        CSC1001 Discrete Mathematics            5




Example 19 (2 points) Assume that each of the four ways a family can have two children is equally likely. Are
there independent? If given the events E, that a family with two children has two boys, and F, that a family
with 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 odd
number 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 Value
1. Expected Value
The expected value of a random variable is the sum over all elements in a sample space of the product of the
probability 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       CSC1001 Discrete Mathematics                                                           07 - Probability


Example 22 (2 points) Let X be the number that comes up when a fair die is rolled. What is the expected
value of X?




Example 23 (2 points) A fair coin is flipped three times. Let S be the sample space of the eight possible
outcomes, 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 four
times?




Example 25 (2 points) A coin is biased so that the probability a head comes up when it is flipped is 0.6. What
is 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 Linda
answers a true/false question correctly is 0.9, and the probability that she answers a multiple-choice question
correctly is 0.8. What is her expected score on the final?




มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555)                               เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี

More Related Content

What's hot

Nbhm m. a. and m.sc. scholarship test 2005
Nbhm m. a. and m.sc. scholarship test 2005Nbhm m. a. and m.sc. scholarship test 2005
Nbhm m. a. and m.sc. scholarship test 2005MD Kutubuddin Sardar
 
Module on Relations in a function
Module on Relations in a functionModule on Relations in a function
Module on Relations in a functionjune eslao
 
Discrete Mathematics with Applications 4th Edition Susanna Solutions Manual
Discrete Mathematics with Applications 4th Edition Susanna Solutions ManualDiscrete Mathematics with Applications 4th Edition Susanna Solutions Manual
Discrete Mathematics with Applications 4th Edition Susanna Solutions ManualHayfaVaughan
 
Rbsc class-9-maths-chapter-4
Rbsc class-9-maths-chapter-4 Rbsc class-9-maths-chapter-4
Rbsc class-9-maths-chapter-4 Arvind Saini
 
Nbhm m. a. and m.sc. scholarship test 2007
Nbhm m. a. and m.sc. scholarship test 2007 Nbhm m. a. and m.sc. scholarship test 2007
Nbhm m. a. and m.sc. scholarship test 2007 MD Kutubuddin Sardar
 
Counting, pigeonhole, permuntation, Permutations and Combination ,Binomial T...
Counting,  pigeonhole, permuntation, Permutations and Combination ,Binomial T...Counting,  pigeonhole, permuntation, Permutations and Combination ,Binomial T...
Counting, pigeonhole, permuntation, Permutations and Combination ,Binomial T...sheiblu
 
K to 12 - Grade 8 Math Learners Module Quarter 2
K to 12 - Grade  8 Math Learners Module Quarter 2K to 12 - Grade  8 Math Learners Module Quarter 2
K to 12 - Grade 8 Math Learners Module Quarter 2Nico Granada
 
K TO 12 GRADE 7 LEARNING MODULE IN MATHEMATICS (Quarter 3)
K TO 12 GRADE 7 LEARNING MODULE IN MATHEMATICS (Quarter 3)K TO 12 GRADE 7 LEARNING MODULE IN MATHEMATICS (Quarter 3)
K TO 12 GRADE 7 LEARNING MODULE IN MATHEMATICS (Quarter 3)LiGhT ArOhL
 
Introductory maths analysis chapter 03 official
Introductory maths analysis   chapter 03 officialIntroductory maths analysis   chapter 03 official
Introductory maths analysis chapter 03 officialEvert Sandye Taasiringan
 
Introductory maths analysis chapter 15 official
Introductory maths analysis   chapter 15 officialIntroductory maths analysis   chapter 15 official
Introductory maths analysis chapter 15 officialEvert Sandye Taasiringan
 
Matrices To Solve A Vector Combination Problem
Matrices To Solve A Vector Combination ProblemMatrices To Solve A Vector Combination Problem
Matrices To Solve A Vector Combination ProblemElmer
 
Introductory maths analysis chapter 12 official
Introductory maths analysis   chapter 12 officialIntroductory maths analysis   chapter 12 official
Introductory maths analysis chapter 12 officialEvert Sandye Taasiringan
 
Introductory maths analysis chapter 11 official
Introductory maths analysis   chapter 11 officialIntroductory maths analysis   chapter 11 official
Introductory maths analysis chapter 11 officialEvert Sandye Taasiringan
 
Introductory maths analysis chapter 00 official
Introductory maths analysis   chapter 00 officialIntroductory maths analysis   chapter 00 official
Introductory maths analysis chapter 00 officialEvert Sandye Taasiringan
 
Introductory maths analysis chapter 09 official
Introductory maths analysis   chapter 09 officialIntroductory maths analysis   chapter 09 official
Introductory maths analysis chapter 09 officialEvert Sandye Taasiringan
 

What's hot (19)

Nbhm m. a. and m.sc. scholarship test 2005
Nbhm m. a. and m.sc. scholarship test 2005Nbhm m. a. and m.sc. scholarship test 2005
Nbhm m. a. and m.sc. scholarship test 2005
 
Module on Relations in a function
Module on Relations in a functionModule on Relations in a function
Module on Relations in a function
 
Matrices
MatricesMatrices
Matrices
 
Discrete Mathematics with Applications 4th Edition Susanna Solutions Manual
Discrete Mathematics with Applications 4th Edition Susanna Solutions ManualDiscrete Mathematics with Applications 4th Edition Susanna Solutions Manual
Discrete Mathematics with Applications 4th Edition Susanna Solutions Manual
 
Math grade 7 learner's module
Math grade 7 learner's moduleMath grade 7 learner's module
Math grade 7 learner's module
 
Aieee mathematics -2008
Aieee mathematics -2008Aieee mathematics -2008
Aieee mathematics -2008
 
Rbsc class-9-maths-chapter-4
Rbsc class-9-maths-chapter-4 Rbsc class-9-maths-chapter-4
Rbsc class-9-maths-chapter-4
 
Nbhm m. a. and m.sc. scholarship test 2007
Nbhm m. a. and m.sc. scholarship test 2007 Nbhm m. a. and m.sc. scholarship test 2007
Nbhm m. a. and m.sc. scholarship test 2007
 
Counting, pigeonhole, permuntation, Permutations and Combination ,Binomial T...
Counting,  pigeonhole, permuntation, Permutations and Combination ,Binomial T...Counting,  pigeonhole, permuntation, Permutations and Combination ,Binomial T...
Counting, pigeonhole, permuntation, Permutations and Combination ,Binomial T...
 
Chapter 6 - Matrix Algebra
Chapter 6 - Matrix AlgebraChapter 6 - Matrix Algebra
Chapter 6 - Matrix Algebra
 
K to 12 - Grade 8 Math Learners Module Quarter 2
K to 12 - Grade  8 Math Learners Module Quarter 2K to 12 - Grade  8 Math Learners Module Quarter 2
K to 12 - Grade 8 Math Learners Module Quarter 2
 
K TO 12 GRADE 7 LEARNING MODULE IN MATHEMATICS (Quarter 3)
K TO 12 GRADE 7 LEARNING MODULE IN MATHEMATICS (Quarter 3)K TO 12 GRADE 7 LEARNING MODULE IN MATHEMATICS (Quarter 3)
K TO 12 GRADE 7 LEARNING MODULE IN MATHEMATICS (Quarter 3)
 
Introductory maths analysis chapter 03 official
Introductory maths analysis   chapter 03 officialIntroductory maths analysis   chapter 03 official
Introductory maths analysis chapter 03 official
 
Introductory maths analysis chapter 15 official
Introductory maths analysis   chapter 15 officialIntroductory maths analysis   chapter 15 official
Introductory maths analysis chapter 15 official
 
Matrices To Solve A Vector Combination Problem
Matrices To Solve A Vector Combination ProblemMatrices To Solve A Vector Combination Problem
Matrices To Solve A Vector Combination Problem
 
Introductory maths analysis chapter 12 official
Introductory maths analysis   chapter 12 officialIntroductory maths analysis   chapter 12 official
Introductory maths analysis chapter 12 official
 
Introductory maths analysis chapter 11 official
Introductory maths analysis   chapter 11 officialIntroductory maths analysis   chapter 11 official
Introductory maths analysis chapter 11 official
 
Introductory maths analysis chapter 00 official
Introductory maths analysis   chapter 00 officialIntroductory maths analysis   chapter 00 official
Introductory maths analysis chapter 00 official
 
Introductory maths analysis chapter 09 official
Introductory maths analysis   chapter 09 officialIntroductory maths analysis   chapter 09 official
Introductory maths analysis chapter 09 official
 

Viewers also liked

Discrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsDiscrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsWongyos Keardsri
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IWongyos Keardsri
 
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesDiscrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesWongyos Keardsri
 
Introduction to management
Introduction to managementIntroduction to management
Introduction to managementBilal Amjad
 
Discrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesDiscrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesWongyos Keardsri
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsWongyos Keardsri
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIWongyos Keardsri
 
Tenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and panTenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and panReefear Ajang
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsWongyos Keardsri
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statementsguestd166eb5
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1 Ali Usman
 

Viewers also liked (20)

Discrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsDiscrete-Chapter 09 Algorithms
Discrete-Chapter 09 Algorithms
 
Chapter 06
Chapter 06 Chapter 06
Chapter 06
 
Chapter 11
Chapter 11 Chapter 11
Chapter 11
 
Chapter 08
Chapter 08 Chapter 08
Chapter 08
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part I
 
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesDiscrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and Sequences
 
Introduction to management
Introduction to managementIntroduction to management
Introduction to management
 
Discrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesDiscrete-Chapter 03 Matrices
Discrete-Chapter 03 Matrices
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 Relations
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part II
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
Chapter 09
Chapter 09 Chapter 09
Chapter 09
 
Tenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and panTenerife airport disaster klm flight 4805 and pan
Tenerife airport disaster klm flight 4805 and pan
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and Proofs
 
Set Operations
Set OperationsSet Operations
Set Operations
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statements
 
Set Theory Presentation
Set Theory PresentationSet Theory Presentation
Set Theory Presentation
 
Bab 5
Bab 5Bab 5
Bab 5
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1
 
Bab 3
Bab 3Bab 3
Bab 3
 

Similar to Discrete-Chapter 07 Probability

Note 1 probability
Note 1 probabilityNote 1 probability
Note 1 probabilityNur Suaidah
 
Statistical Analysis with R -II
Statistical Analysis with R -IIStatistical Analysis with R -II
Statistical Analysis with R -IIAkhila Prabhakaran
 
Introduction of Probability
Introduction of ProbabilityIntroduction of Probability
Introduction of Probabilityrey castro
 
4.1-4.2 Sample Spaces and Probability
4.1-4.2 Sample Spaces and Probability4.1-4.2 Sample Spaces and Probability
4.1-4.2 Sample Spaces and Probabilitymlong24
 
Probability and probability distributions ppt @ bec doms
Probability and probability distributions ppt @ bec domsProbability and probability distributions ppt @ bec doms
Probability and probability distributions ppt @ bec domsBabasab Patil
 
Making probability easy!!!
Making probability easy!!!Making probability easy!!!
Making probability easy!!!GAURAV SAHA
 
Chapter 3 probability
Chapter 3 probabilityChapter 3 probability
Chapter 3 probabilityRione Drevale
 
Indefinite integration class 12
Indefinite integration class 12Indefinite integration class 12
Indefinite integration class 12nysa tutorial
 
Probability Basics and Bayes' Theorem
Probability Basics and Bayes' TheoremProbability Basics and Bayes' Theorem
Probability Basics and Bayes' TheoremMenglinLiu1
 
Probability PART 1 - X NCERT
Probability PART 1 - X NCERTProbability PART 1 - X NCERT
Probability PART 1 - X NCERTSudheerVenkat2
 
Lecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docxLecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docxRaghavaReddy449756
 
5. probability qt 1st tri semester
5. probability qt 1st tri semester 5. probability qt 1st tri semester
5. probability qt 1st tri semester Karan Kukreja
 
Probability class 10
Probability class 10Probability class 10
Probability class 10AadhiSXA
 

Similar to Discrete-Chapter 07 Probability (20)

Note 1 probability
Note 1 probabilityNote 1 probability
Note 1 probability
 
Statistical Analysis with R -II
Statistical Analysis with R -IIStatistical Analysis with R -II
Statistical Analysis with R -II
 
Introduction of Probability
Introduction of ProbabilityIntroduction of Probability
Introduction of Probability
 
4.1-4.2 Sample Spaces and Probability
4.1-4.2 Sample Spaces and Probability4.1-4.2 Sample Spaces and Probability
4.1-4.2 Sample Spaces and Probability
 
Probability Theory 8
Probability Theory 8Probability Theory 8
Probability Theory 8
 
Probability
ProbabilityProbability
Probability
 
Probability and probability distributions ppt @ bec doms
Probability and probability distributions ppt @ bec domsProbability and probability distributions ppt @ bec doms
Probability and probability distributions ppt @ bec doms
 
Probability and Statistics - Week 1
Probability and Statistics - Week 1Probability and Statistics - Week 1
Probability and Statistics - Week 1
 
Making probability easy!!!
Making probability easy!!!Making probability easy!!!
Making probability easy!!!
 
Chapter 3 probability
Chapter 3 probabilityChapter 3 probability
Chapter 3 probability
 
Indefinite integration class 12
Indefinite integration class 12Indefinite integration class 12
Indefinite integration class 12
 
Probability Homework Help
Probability Homework HelpProbability Homework Help
Probability Homework Help
 
Probability Basics and Bayes' Theorem
Probability Basics and Bayes' TheoremProbability Basics and Bayes' Theorem
Probability Basics and Bayes' Theorem
 
Probability PART 1 - X NCERT
Probability PART 1 - X NCERTProbability PART 1 - X NCERT
Probability PART 1 - X NCERT
 
603-probability mj.pptx
603-probability mj.pptx603-probability mj.pptx
603-probability mj.pptx
 
Lecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docxLecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docx
 
PROBABILITY THEORIES.pptx
PROBABILITY THEORIES.pptxPROBABILITY THEORIES.pptx
PROBABILITY THEORIES.pptx
 
Probability
ProbabilityProbability
Probability
 
5. probability qt 1st tri semester
5. probability qt 1st tri semester 5. probability qt 1st tri semester
5. probability qt 1st tri semester
 
Probability class 10
Probability class 10Probability class 10
Probability class 10
 

More from Wongyos Keardsri

How to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramHow to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramWongyos Keardsri
 
The next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsThe next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsWongyos Keardsri
 
SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingSysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingWongyos Keardsri
 
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemSysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemWongyos Keardsri
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IDiscrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IWongyos Keardsri
 
Java-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowJava-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowWongyos Keardsri
 
Java-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsJava-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsWongyos Keardsri
 
Java-Chapter 11 Recursions
Java-Chapter 11 RecursionsJava-Chapter 11 Recursions
Java-Chapter 11 RecursionsWongyos Keardsri
 
Java-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional ArraysJava-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional ArraysWongyos Keardsri
 
Java-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and ApplicationsJava-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and ApplicationsWongyos Keardsri
 
Java-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional ArraysJava-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional ArraysWongyos Keardsri
 
Java-Chapter 06 File Operations
Java-Chapter 06 File OperationsJava-Chapter 06 File Operations
Java-Chapter 06 File OperationsWongyos Keardsri
 
Java-Chapter 05 String Operations
Java-Chapter 05 String OperationsJava-Chapter 05 String Operations
Java-Chapter 05 String OperationsWongyos Keardsri
 
Java-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration StatementsJava-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration StatementsWongyos Keardsri
 

More from Wongyos Keardsri (20)

How to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramHow to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master Program
 
The next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsThe next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applications
 
IP address anonymization
IP address anonymizationIP address anonymization
IP address anonymization
 
SysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script ProgrammingSysProg-Tutor 03 Unix Shell Script Programming
SysProg-Tutor 03 Unix Shell Script Programming
 
SysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating SystemSysProg-Tutor 02 Introduction to Unix Operating System
SysProg-Tutor 02 Introduction to Unix Operating System
 
SysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming LanguageSysProg-Tutor 01 Introduction to C Programming Language
SysProg-Tutor 01 Introduction to C Programming Language
 
Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part III
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part II
 
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IDiscrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part I
 
Discrete-Chapter 10 Trees
Discrete-Chapter 10 TreesDiscrete-Chapter 10 Trees
Discrete-Chapter 10 Trees
 
Java-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowJava-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindow
 
Java-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsJava-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and Objects
 
Java-Chapter 11 Recursions
Java-Chapter 11 RecursionsJava-Chapter 11 Recursions
Java-Chapter 11 Recursions
 
Java-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional ArraysJava-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional Arrays
 
Java-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and ApplicationsJava-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and Applications
 
Java-Chapter 08 Methods
Java-Chapter 08 MethodsJava-Chapter 08 Methods
Java-Chapter 08 Methods
 
Java-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional ArraysJava-Chapter 07 One Dimensional Arrays
Java-Chapter 07 One Dimensional Arrays
 
Java-Chapter 06 File Operations
Java-Chapter 06 File OperationsJava-Chapter 06 File Operations
Java-Chapter 06 File Operations
 
Java-Chapter 05 String Operations
Java-Chapter 05 String OperationsJava-Chapter 05 String Operations
Java-Chapter 05 String Operations
 
Java-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration StatementsJava-Chapter 04 Iteration Statements
Java-Chapter 04 Iteration Statements
 

Discrete-Chapter 07 Probability

  • 1. Probability - 07 CSC1001 Discrete Mathematics 1 CHAPTER ความน่าจะเปน ็ 7 (Probability) 1 Introduction to Discrete Probability 1. 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 S Example 1 (2 points) Bag contains four blue balls and five red balls. What is the probability that a ball chosen at 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 two dice is 7? มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 2. 2 CSC1001 Discrete Mathematics 07 - Probability Example 4 (10 points) Given a group of characters is { A, A, B, B, C, C, C, D, D, D, D, E }, if you select one character 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 cards is an ace? Example 6 (2 points) What is the probability that a randomly selected day of a leap year (with 366 possible days) is in April? Example 7 (2 points) What is the probability that the sum of the numbers on two dice is even when they are rolled? 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. Probability - 07 CSC1001 Discrete Mathematics 3 Example 9 (2 points) A sequence of 10 bits is randomly generated. What is the probability that at least one of these bits is 0? Example 10 (2 points) A sequence of 7 bits is randomly generated. What is the probability that at least one of these bits is 1? Example 11 (2 points) What is the probability that a positive integer selected at random from the set of positive 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 basket and 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 of length four is equally likely. What is the probability that it contains at least two consecutive 0s, given that its first bit is a 0? (We assume that 0 bits and 1 bits are equally likely.) มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 4. 4 CSC1001 Discrete Mathematics 07 - Probability Example 14 (2 points) A bit string of length three is generated at random so that each of the 8 bit strings of length three is equally likely. What is the probability that it contains at least two consecutive 1s, given that its first 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 E and F are independent? Example 16 (2 points) Suppose E is the event that a randomly generated bit string of length four begins with a 1 and F is the event that this bit string contains an even number of 1s. Are E and F independent, if the 16 bit strings 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. Are there independent? If given the events E, that a family with two children has two boys, and F, that a family with 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 three children are equally likely. มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี
  • 5. Probability - 07 CSC1001 Discrete Mathematics 5 Example 19 (2 points) Assume that each of the four ways a family can have two children is equally likely. Are there independent? If given the events E, that a family with two children has two boys, and F, that a family with 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 odd number 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 Value 1. Expected Value The expected value of a random variable is the sum over all elements in a sample space of the product of the probability 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 CSC1001 Discrete Mathematics 07 - Probability Example 22 (2 points) Let X be the number that comes up when a fair die is rolled. What is the expected value of X? Example 23 (2 points) A fair coin is flipped three times. Let S be the sample space of the eight possible outcomes, 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 four times? Example 25 (2 points) A coin is biased so that the probability a head comes up when it is flipped is 0.6. What is 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 Linda answers a true/false question correctly is 0.9, and the probability that she answers a multiple-choice question correctly is 0.8. What is her expected score on the final? มหาวิทยาลัยราชภัฏสวนส ุนันทา (ภาคการศึกษาที่ 2/2555) เรียบเรียงโดย อ.วงศ์ยศ เกิดศรี