You are on page 1of 65

COMP. 233.

PROBABILITY AND STATISTICS.

Page 1 of 65
POINTS OF INTEREST.

1. Course outline is on Moodle.

2. There will be four assignments for this course.

3. There will be one midterm, late in the semester.

4. There will be a final exam.

5. There will be notes posted on Moodle throughout the semester,


normally before the corresponding lecture. It is the responsibility of
the student to download, printout, LEARN, and bring to class these
notes. The purpose of this is to save time from having to introduce
the Theorems, Lemmas, Corollaries, formulas, and concepts, during
lecture time. These notes must be learned before the next lecture.

6. There exists two or three tutorials for this course. Tutorials are
where you ask all your questions. One is not restricted to attending
just one tutorial. Feel free to attend more than one tutorial, or a
tutorial in which you are comfortable. They are not mandatory.

If you have questions regarding my notes, or proofs, problems from


the textbook, I will be holding a short weekly in office question
period. One may ask these types of questions there.

7. The course is heavily based on Calculus. Specifically differentiation


and Integration. Some knowledge of limits will also be necessary. It
would behoove one to review thoroughly these three topics.

Page 2 of 65
8. Final note. This course, as could be seen from the course outline,
covers many topics, in a very short time span. Falling behind is not an
option. Stay current, up to date. Catching up later will be difficult.

9. The Lecture Notes on a topic will be posted on Moodle before


the topic is covered.

10. Dr. Doedel’s Lecture notes are on Moodle as reference notes.

11. The book Probability and Statistics, by Shahab Shahabli, is also on


Moodle as a reference book.

12. Midterm will be up to and including: Lecture Notes_Distributions.

13. During lectures, many problems will be given for the student to
solve. To learn, it is imperative one solves these problems before
the solutions are given.

DO OR DO NOT, THERE IS NO TRY.


YODA.

Page 3 of 65
PROBABILITY.

Page 4 of 65
Page 5 of 65
Page 6 of 65
Page 7 of 65
Page 8 of 65
Page 9 of 65
Page 10 of 65
Page 11 of 65
Page 12 of 65
For those of you who failed the Probability test, I have some lottery
tickets to sell you.

Patient: "Will I survive this risky operation?"


Surgeon: "Yes, I'm absolutely sure that you will survive the operation."
Patient: "How can you be so sure?"
Surgeon: "9 out of 10 patients die in this operation, and yesterday died
my ninth patient."

Page 13 of 65
Def.: Permutation;
A Permutation of a set of distinct objects is an arrangement of the
objects in a specific order, without repetition. Order matters. AB ≠ BA.

Theorem. Number of Permutations of n distinct objects taken r at a


time.
𝒏𝒏!
𝒏𝒏𝑷𝑷𝒓𝒓 =
(𝒏𝒏 − 𝒓𝒓)!

Notation. !: Factorial.
Nota Bene: n! = n(n - 1)(n - 2)(n - 3)…..(1)
0! = 1
1! = 1
n! = n(n - 1)!

E.G.:
2! = 2
3! = 6
4! = 24
5! = 120
7! = 5,040

E.G.:
Given ABC. How many Permutations exist of ABC, taking 2 at a time?
Enumerate all the Permutations.

n = 3; r =2.
𝟑𝟑! 𝟔𝟔
𝟑𝟑𝑷𝑷𝟐𝟐 = = = 𝟔𝟔.
(𝟑𝟑 − 𝟐𝟐)! 𝟏𝟏

AB, AC, BC, BA, CA, CB.

Page 14 of 65
E.G.:
Given ABCD. How many Permutations exist of ABCD, taking 3 at a time?
Enumerate all the Permutations.

n = 4; r =3.
𝟒𝟒! 𝟐𝟐𝟐𝟐
𝟒𝟒𝑷𝑷𝟑𝟑 = = = 𝟐𝟐𝟐𝟐.
(𝟒𝟒 − 𝟑𝟑)! 𝟏𝟏

ABC, ABD, ACD, BCD


ACB, ADB, ADC, BDC
CAB, BAD, CAD, CBD
CBA, BDA, CDA, CDB
BAC, DAB, DAC, DBC
BCA, DBA, DCA, DCB

Def.: Combination;
A Combination of a set of distinct objects is an arrangement of the
objects in any order, without repetition. Order does not matter.
AB = BA.

Theorem. Number of Combinations of n distinct objects taken r at a


time.

𝒏𝒏 𝒏𝒏!
� � = n𝑪𝑪𝒓𝒓 =
𝒓𝒓 𝒓𝒓! (𝒏𝒏 − 𝒓𝒓)!

Page 15 of 65
E.G.:
Given ABC. How many Combinations exist of ABC, taking 2 at a time?
Enumerate all the Combinations.

n = 3; r =2.
𝟑𝟑! 𝟔𝟔
𝟑𝟑𝑪𝑪𝟐𝟐 = = = 𝟑𝟑.
𝟐𝟐! (𝟑𝟑 − 𝟐𝟐)! 𝟐𝟐(𝟏𝟏)

AB, AC, BC.

E.G.:
Given ABCD. How many Combinations exist of ABCD, taking 3 at a time?
Enumerate all the Combinations.

n = 4; r =3.
𝟒𝟒! 𝟐𝟐𝟐𝟐
𝟒𝟒𝑪𝑪𝟑𝟑 = = = 𝟒𝟒.
𝟑𝟑! (𝟒𝟒 − 𝟑𝟑)! 𝟔𝟔(𝟏𝟏)

ABC, ABD, ACD, BCD.

Page 16 of 65
Def.: Sample Space (S.S.);
Let set S be the total number of outcomes of an experiment. Each trial
of the experiment will yield one and only one outcome.
The set S is called the Sample Space of the experiment.

Notation. ||: Cardinality of a Set. Number of distinct elements in the


set.

E.G.:
Experiment: toss a coin, once. What is the S.S.?
S = {H, T}. |S| = 2.

Experiment: toss a coin, twice. What is the S.S.?


S = {(H, T), (T, T), (H, H), (T, H)}. |S| = 4.

Experiment: toss a die, once. What is the S.S.?


S = {1, 2, 3, 4, 5, 6}. |S| = 6.

Experiment: toss a die, twice. What is the |S.S.|?


|S| = 36.

Experiment: toss a coin, and two die, once. What is the |S.S.|?
|S| = 72.

Def.: Probability;
Let E: an event of an experiment.

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑜𝑜𝑜𝑜 𝐸𝐸


P(E) =
𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑖𝑖𝑖𝑖 𝑆𝑆.𝑆𝑆.
.

Given a (H, T) coin. What is P(H)?

Page 17 of 65
New word: FAIR.
A coin is said to be fair if the probability of each outcome is the same:
P(H) = P(T) = 0.5.

A die is said to be fair if the probability of each outcome is the same:


P(1) = P(2) = P(3) = P(4) = P(5) = P(6) = 1/6.

A coin or die which is not fair, is said to be biased, or loaded.

Theorem: Axioms of Probability;


Let ∃ an experiment.

Let 𝐸𝐸𝑖𝑖 , i = 1, 2, 3, ….., N be all the events generated by the experiment.


𝐸𝐸𝑖𝑖 , 𝐸𝐸𝑗𝑗 , i ≠ j are independent.
S: Sample Space.

Axiom 1: 0 ≤ 𝑃𝑃(𝐸𝐸 ) ≤ 1.
Axiom 2: P(S) = 1.
Axiom 3:
𝑃𝑃�⋃𝑁𝑁 𝑁𝑁
𝑖𝑖=1 𝐸𝐸𝑖𝑖 � = ∑𝑖𝑖=1 𝑃𝑃 (𝐸𝐸𝑖𝑖 ) = 1 N = 1, 2, 3, …..

Page 18 of 65
E.G.:
Given a 10 sided die.

P(1) = 8/50
P(2) = 7/50
P(3) = 9/50
P(4) = 8/50
P(5) = 1/50
P(6) = 5/50
P(7) = 1/50
P(8) = 2/50
P(9) = 3/50
P(10) = 6/50
-------
50/50 = 1

P(at least a 4 is rolled)?

Page 19 of 65
Solution.
P(1) + P(2) + P(3) + P(4) + P(5) + P(6) + P(7) + P(8) + P(9) + P(10) = 1

P(4) + P(5) + P(6) + P(7) + P(8) + P(9) + P(10) = 1 – (P(1) + P(2) + P(3) )

= 1 – (8/50 + 7/50 + 9/50)

= 26/50 .

EXAMPLE SET 1.
Problems.

1. A horse race consisting of 10 horses.


How many first three places are possible?

2. A committee of 7 distinct humans exist.


A. In how many ways can a subcommittee of 3 be formed?

B. In how many ways can a Pres., V.P., Secretary be selected?

3. Standard 52 card deck (S.C.D.).


A. How many 5-card hands will have all hearts?

B. P(all 5 cards are hearts)?

4. S.C.D.
A. How many 7-card hands will have exactly 5 spades and 2 hearts?

B. P(5 Spades, 2 Hearts)?

Page 20 of 65
5. ∃ 8 distinct points on the circumference of a circle.
A. How many chords could be drawn?

B. How many triangles?

6. A computer store receives a shipment of 24 laser printers. Five are


defective. Three of these printers are to be put on display.
A. How many selections are possible?

B. How many of these selections will contain 0 defective printers?

C. P(0 defective printers on display)?

D. P(at least 1 defective printer on display)?

7. How many ways could 5 distinct humans be seated in a row?

8. ∃ a combination lock having 3 wheels. Each wheel contains the


digits 0 – 9. ∃ only one correct opening combination.
A. If repetitions are allowed, what is the probability of guessing the
correct combination?

B. If no repetitions are allowed?

9. ∃ three coins. Two are fair, one has 2 heads.


One toss of the three coins.
A. P(exactly 1 head)?

B. P(3 heads)?

C. P(more than 1 head)?

Page 21 of 65
10. S.C.D.
5-card deal.
A. P(5 face cards or aces)?

B. P(10, J, Q, K, A of the same suit)?

C. P(2 aces, 3 queens)?

10.1. Experiment. S.C.D.


Three card deal.
A. P(3 hearts)?

B. Cardinality of the sample space?

11. ∃ 5 job positions.


6 Female(F), 5 Male(M) applicants (all distinct).
Compute the following probs. of these positions being filled by:
A. P(3F, 2M)?

B. P(4F, 1M)?

C. P(5F)?

D. P(at least 4F)?

Page 22 of 65
Solutions.

1. A horse race consisting of 10 horses.


How many first three places are possible?

(# of possible 1st. places)(# of possible 2nd. places)(# of possible 3rd.


places) = (10)(9)(8) = 720 = 10𝑃𝑃3 .

2. A committee of 7 distinct humans exist.


A. In how many ways can a subcommittee of 3 be formed?

Order does not matter. 7𝐶𝐶3 = 35.

B. In how many ways can a Pres., V.P., Secretary be selected?

Order matters. 7𝑃𝑃3 = 210 = (7)(6)(5).

3. Standard 52 card deck (S.C.D.).


A. How many 5-card hands will have all hearts?

Order does not matter. 13𝐶𝐶5 = 1,287.

B. P(all 5 cards are hearts)?

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 5 ℎ𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒


P(all 5 cards are hearts) =
𝑛𝑛𝑛𝑛𝑚𝑚𝑏𝑏𝑏𝑏𝑏𝑏 𝑜𝑜𝑜𝑜 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑖𝑖𝑖𝑖 𝑆𝑆.𝑆𝑆.

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 5 ℎ𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒


=
𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑎𝑎𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙 5 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

13𝐶𝐶5
= = 0.000495.
52𝐶𝐶5

Page 23 of 65
4. S.C.D.
A. How many 7-card hands will have exactly 5 spades and 2 hearts?

Order does not matter. ( 13𝐶𝐶5 )( 13𝐶𝐶2 ) = 100,386.

B. P(5 Spades, 2 Hearts)?

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 5 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠, 2 ℎ𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒


P(5 Spades, 2 Hearts) =
𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑖𝑖𝑖𝑖 𝑆𝑆.𝑆𝑆.

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 5 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠, 2 ℎ𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒


=
𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 7 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

( 13𝐶𝐶5 )( 13𝐶𝐶2 ) 100,386


= = .
( 52𝐶𝐶7 ) 133,784,560

5. ∃ 8 distinct points on the circumference of a circle.


A. How many chords could be drawn?

8𝐶𝐶2 = 28.

B. How many triangles?

8𝐶𝐶3 = 56.

6. A computer store receives a shipment of 24 laser printers. Five are


defective. Three of these printers are to be put on display.
A. How many selections are possible?
Order does not matter.
24𝐶𝐶3 = 2,024.

Page 24 of 65
B. How many of these selections will contain 0 defective printers?
Remove the defective (5) from the lot (24), leaving 19.
How many ways to choose 3 from 19
19𝐶𝐶3 = 969.

C. P(0 defective printers on display)?

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 0 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑


P(0 defective printers on display) =
𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑖𝑖𝑖𝑖 𝑆𝑆.𝑆𝑆.

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 0 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑


=
𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑟𝑟 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 3 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝

19𝐶𝐶3 969
= = .
24𝐶𝐶3 2024

D. P(at least 1 defective printer on display)?

P(at least 1 defective printer on display) = 1 – P(0 defective)

969
=1−
2024

1055
= .
2024

7. How many ways could 5 distinct humans be seated in a row?


Order matters.
5𝑃𝑃5 = 5! = 120 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤.

Page 25 of 65
8. ∃ a combination lock having 3 wheels. Each wheel contains the
digits 0 – 9. ∃ only one correct opening combination.
A. If repetitions are allowed, what is the probability of guessing the
correct combination in one guess?

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐


P(1 guess) =
𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑖𝑖𝑖𝑖 𝑆𝑆.𝑆𝑆.

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐


= .
𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

Let A: number of ways of choosing a number on first wheel.


B: number of ways of choosing a number on second wheel.
C: number of ways of choosing a number on third wheel.

|S.S.| = (A)(B)(C) = (10)(10)(10) = 1000.


∴,
1
P(1 guess) = .
1000

B. If no repetitions are allowed?

|S.S.| = (A)(B)(C) = (10)(9)(8) = 720.


∴,
1 1
P(1 guess) = = .
720 10𝑃𝑃3

9. ∃ three coins. Two are fair, one has 2 heads.


One toss of the three coins.
A. P(exactly 1 head)?
(fair coin)(fair coin)(2 headed coin).

P(exactly 1H) = (T)(T)(H) = (1/2)(1/2)(1) = 1/4.


Page 26 of 65
B. P(3 heads)?

P(3 heads) = (H)(H)(H) = (1/2)(1/2)(1) = 1/4.

C. P(more than 1 head)?

P(more than 1 head) = (H)(T)(H) + (T)(H)(H) + (H)(H)(H)

= (1/2)(1/2)(1) + (1/2)(1/2)(1) + (1/2)(1/2)(1)

= 3/4

= 1 – P(1 head).

10. S.C.D.
5-card deal.
A. P(5 face cards or aces)?
There are 16 face cards plus aces.

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 5 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑜𝑜𝑜𝑜 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎


P(5 face cards or aces) =
𝑛𝑛𝑛𝑛𝑚𝑚𝑏𝑏𝑏𝑏𝑏𝑏 𝑜𝑜𝑜𝑜 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑖𝑖𝑖𝑖 𝑆𝑆.𝑆𝑆.

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 5 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑜𝑜𝑜𝑜 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎


=
𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 5 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

16𝐶𝐶5
= = 0.00168.
52𝐶𝐶5

Page 27 of 65
B. P(10, J, Q, K, A of the same suit)?
Choose one suit, for example spades.

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 10,𝐽𝐽,𝑄𝑄,𝐾𝐾,𝐴𝐴 𝑜𝑜𝑜𝑜 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠


P(10, J, Q, K, A of spades) =
𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑖𝑖𝑖𝑖 𝑆𝑆.𝑆𝑆.

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 10,𝐽𝐽,𝑄𝑄,𝐾𝐾,𝐴𝐴 𝑜𝑜𝑜𝑜 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠


=
𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 5 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

1
= .
52𝐶𝐶5

BUT! There are four suits!


∴,
1
P(10, J, Q, K, A of the same suit) = (4)� � = 0.0000015.
52𝐶𝐶5

C. P(2 aces, 3 queens)?

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 2 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎, 3 𝑞𝑞𝑞𝑞𝑞𝑞𝑞𝑞𝑞𝑞𝑞𝑞


P(2 aces, 3 queens) =
𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 𝑖𝑖𝑖𝑖 𝑆𝑆.𝑆𝑆.

𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 2 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎, 3 𝑞𝑞𝑞𝑞𝑞𝑞𝑞𝑞𝑞𝑞𝑞𝑞


=
𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑙𝑙 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑜𝑜𝑜𝑜 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 5 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

( 4𝐶𝐶2 )( 4𝐶𝐶3 )
= = 0.000009.
( 52𝐶𝐶5 )

Page 28 of 65
10.1. Experiment. S.C.D.
Three card deal.
A. P(3 hearts)?

13𝐶𝐶3
P(3 hearts) = ≈ 0.0129.
52𝐶𝐶3

B. Cardinality of the sample space? (Order matters)!

All elements in the S.S. are distinct! Hence, order matters!

13𝑃𝑃3 3!( 13𝐶𝐶3 ) 13𝐶𝐶3


P(3 hearts) = = = ≈ 0.0129.
52𝑃𝑃3 3!( 52𝐶𝐶3 ) 52𝐶𝐶3
∴,
|S.S.| = 52𝑃𝑃3 = 132,600 ≠ 52𝐶𝐶3 = 22,100.

Nota Bene:
𝑛𝑛! 𝑛𝑛!
𝑛𝑛𝑃𝑃𝑟𝑟 = ; 𝑛𝑛𝐶𝐶𝑟𝑟 = .
(𝑛𝑛−𝑟𝑟 )! 𝑟𝑟!(𝑛𝑛−𝑟𝑟 )!

𝑛𝑛𝑃𝑃𝑟𝑟 = 𝑟𝑟! ( 𝑛𝑛𝐶𝐶𝑟𝑟 ) .

Page 29 of 65
11. ∃ 5 job positions.
6 Female(F), 5 Male(M) applicants (all distinct).
Compute the following probs. of these positions being filled by:
A. P(3F, 2M)?

6𝐶𝐶3 5𝐶𝐶2
P(3F, 2M) = = 0.433.
11𝐶𝐶5

B. P(4F, 1M)?

6𝐶𝐶4 5𝐶𝐶1
P(4F, 1M) = = 0.162.
11𝐶𝐶5

C. P(5F)?

6𝐶𝐶5
P(5F) = = 0.013.
11𝐶𝐶5

D. P(at least 4F)?

P(at least 4F) = P(4F, 1M) + P(5F)


= 0.162 + 0.013
= 0.175.

Page 30 of 65
EXAMPLE SET 2.
PROBLEMS.
1. How many non-negative integer solutions exist for the equation:

𝑥𝑥1 + 𝑥𝑥2 + 𝑥𝑥3 + 𝑥𝑥4 = 12?

2. In how many ways could 10 unlabeled (non-distinct) balls be put into


3 labeled bins?

Page 31 of 65
SOLUTIONS.
1. How many non-negative integer solutions exist for the equation:

𝑥𝑥1 + 𝑥𝑥2 + 𝑥𝑥3 + 𝑥𝑥4 = 12?

Solution.
General form: ∑𝑛𝑛𝑖𝑖=1 𝑥𝑥𝑖𝑖 = 𝑁𝑁.

N = 12.
n = 4.

Since N = 12, twelve 1’s will be partitioned using n – 1 = 3 partitions.

Twelve 1’s: 1 1 1 1 1 1 1 1 1 1 1 1
Three partitions: |||

𝑥𝑥1 : number of 1’s before the first partition.


𝑥𝑥2 : number of 1’s between first and second partition.
𝑥𝑥3 : number of 1’s between second and third partition.
𝑥𝑥4 : number of 1’s after third partition.

Examples of partitions (each partitioned set is 15 positions long):

111|1111|111|11

𝑥𝑥1 = 3; 𝑥𝑥2 = 4; 𝑥𝑥3 = 3; 𝑥𝑥4 = 2.

111|11111|111|1

𝑥𝑥1 = 3; 𝑥𝑥2 = 5; 𝑥𝑥3 = 3; 𝑥𝑥4 = 1.

Page 32 of 65
111111|1|11111|

𝑥𝑥1 = 6; 𝑥𝑥2 = 1; 𝑥𝑥3 = 5; 𝑥𝑥4 = 0.

|111111||111111

𝑥𝑥1 = 0; 𝑥𝑥2 = 6; 𝑥𝑥3 = 0; 𝑥𝑥4 = 6.

1111|11|11|1111

𝑥𝑥1 = 4; 𝑥𝑥2 = 2; 𝑥𝑥3 = 2; 𝑥𝑥4 = 4.

Final answer: in how many ways could the positions of the 3 partitions
15
be chosen: � 3 � = 455 ways.
∴,
There exists 455 non-negative integer solutions for the given
equation.

Page 33 of 65
2. In how many ways could 10 unlabeled (non-distinct) balls be put into
3 labeled bins?

Solution.
The solution is synonymous with the following problem.

How many non-negative integer solutions exist for the equation:

𝑥𝑥1 + 𝑥𝑥2 + 𝑥𝑥3 = 10.

12
Hence, � 2 � = 66.

(Nota Bene. Ref.: Pg. 47, Dr. Doedel’s book).

Page 34 of 65
Theorem.
∃ �𝑁𝑁 +𝑛𝑛−1
𝑛𝑛 − 1
� non-negative integer solutions to the
equation:
∑𝑛𝑛𝑖𝑖=1 𝑥𝑥𝑖𝑖 = 𝑁𝑁.

E.G.: 𝑥𝑥1 + 𝑥𝑥2 + 𝑥𝑥3 = 15.

Theorem. Multinomial Formula.

𝑛𝑛!
M(𝑛𝑛; 𝑛𝑛1 , 𝑛𝑛2 , 𝑛𝑛3 , … . . , 𝑛𝑛𝑖𝑖 ) = .
𝑛𝑛1 ! 𝑛𝑛2 ! 𝑛𝑛3 !….. 𝑛𝑛𝑖𝑖 !

𝑖𝑖

� 𝑛𝑛𝑘𝑘 = 𝑛𝑛.
𝑘𝑘=1

M: total number of permutations of n objects where:


𝑛𝑛1 : are of type 1.
𝑛𝑛2 : are of type 2.
𝑛𝑛3 : are of type 3.
⁞ ⁞
𝑛𝑛𝑖𝑖 : are of type i.

Page 35 of 65
E.G.
How many different permutations are possible from the string:
SOS.

n = 3.
𝑛𝑛1 : S; 𝑛𝑛1 = 2.
𝑛𝑛2 : O; 𝑛𝑛2 = 1.

3!
M(3; 2, 1) = = 3.
2! 1!

SOS
SSO
OSS

E.G.
How many different permutations are possible from the string:
STATISTICS.

n = 10.
𝑛𝑛1 : A; 𝑛𝑛1 = 1.
𝑛𝑛2 : S; 𝑛𝑛2 = 3.
𝑛𝑛3 : T; 𝑛𝑛3 = 3.
𝑛𝑛4 : C; 𝑛𝑛4 = 1.
𝑛𝑛5 : I; 𝑛𝑛5 = 2.

10!
M(10; 1, 3, 3, 1, 2) = = 50,400.
1! 3! 3! 1! 2!

Page 36 of 65
E.G.
How many different permutations are possible from the string:
AB12.

n = 4.
𝑛𝑛1 : letters; 𝑛𝑛1 = 2.
𝑛𝑛2 : digits; 𝑛𝑛2 = 2.

4!
M(4; 2, 2) = = 6.
2! 2!

AB12
2B1A
A1B2
A21B
1BA2
12AB.

EXAMPLE.
1. In how many ways could three labeled balls be put into 2 labeled
bins?
Solution.
(𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏)𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏 = (2)3 = 8.
Bin 1 Bin 2
123
123
1 23
23 1
2 13
13 2
3 12
12 3

Page 37 of 65
PLEASE REFER TO MOODLE FOR NOTES ON “SETS”.

THEOREM. Principle of Inclusion-Exclusion.


Let A and B be sets.

|A ∪ B| = |A| + |B|− |A ∩ B|.

P(A ∪ B) = P(A) + P(B)− P(A ∩ B).

THEOREM. Pigeonhole Principle.


If k ∈ ℕ, and k + 1 or more objects are placed into k boxes then ∃ at
least one box containing two or more of the objects.

THEOREM. Generalized Pigeonhole Principle.


If N objects are placed into k boxes then ∃ at least one box containing
𝑁𝑁
at least � � objects.
𝑘𝑘

EXAMPLE SET 3.
PROBLEMS.
1. How many bit strings of length 7 are there?

2. Six place license plates.


First 3 positions are letters (lowercase), last 3 positions are digits.
A. If repetitions are allowed, how many plates could be generated?

B. If no repetitions?

C. If letters and digits could be in any order (mixed), and if repetitions


are not allowed, how many plates could be generated?

3. How many bit strings of length 8 start with a 1 or end with 00?
Page 38 of 65
4. How many strings of 4 lowercase letters are there which have the
letter x in them? Repetitions allowed.

5. How many permutations of the string ABCDEFGH contain the


substring “ABC”?

6. How many bit strings of length 10 contain:


A. Exactly four 1’s?

B. At most four 1’s?

C. At least four 1’s?

7. What is the probability of a full house in a Poker hand?

8. (S.C.D.) 5 card hand.


A. P(0 aces)?

B. P(1 ace)?

C. P(at least 1 ace)?

Page 39 of 65
EXAMPLE SET 3.
SOLUTIONS.
1. How many bit strings of length 7 are there?

Seven positions. Each position could take 2 values.

(2)(2)(2)(2)(2)(2)(2) = 27 = 128.

2. Six place license plates.


First 3 positions are letters (lowercase), last 3 positions are digits.
A. If repetitions are allowed, how many plates could be generated?

(26)(26)(26)(10)(10)(10) = 17,576,000.

B. If no repetitions?

(26)(25)(24)(10)(9)(8) = 11,232,000.

C. If letters and digits could be in any order (mixed), and if repetitions


are not allowed, how many plates could be generated?

(26)(25)(24)(10)(9)(8)6!

3. How many bit strings of length 8 start with a 1 or end with 00?

Let A: set of bit strings starting with 1.


B: set of bit strings ending with 00.

|A ∪ B|?

|A ∪ B| = |A| + |B|− |A ∩ B|.

Page 40 of 65
|A| = (1)(2)(2)(2)(2)(2)(2)(2) = 27 = 128.
|B| = (2)(2)(2)(2)(2)(2)(1)(1) = 26 = 64.
|A ∩ B| = (1)(2)(2)(2)(2)(2)(1)(1) = 25 = 32.

∴,
|A ∪ B| = 128 + 64 – 32 = 160.

4. How many strings of 4 lowercase letters are there which have the
letter x in them? Repetitions allowed.

Let A: Set of length 4 strings with no x.


B: Set of length 4 strings.
C: Set of length 4 strings with an x.

|C|?

|C| = |B| - |A|

|C| = (26)4 − (25)4 = 66,351.

5. How many permutations of the string ABCDEFGH contain the


substring “ABC”?

Let X = “ABC”.
∴,
How many ways to permute XDEFGH ⇒ 6! = 720 ways.

Page 41 of 65
6. How many bit strings of length 10 contain:
A. Exactly four 1’s?

10𝐶𝐶4 = 210.

B. At most four 1’s?

(# of 0 1’s) + (# of 1 1’s) + (# of 2 1’s) + (# of 3 1’s) + (# of 4 1’s)

= 10𝐶𝐶0 + 10𝐶𝐶1 + 10𝐶𝐶2 + 10𝐶𝐶3 + 10𝐶𝐶4

= 1 + 10 + 45 + 120 + 210 = 386.

C. At least four 1’s?

(total number of bit strings) – (number of at most 4 1’s) + (number


of exactly 4 1’s) = 210 – 386 + 210 = 848.

7. What is the probability of a full house in a Poker hand?

Full House is a hand containing 3 of one type of card (3 4’s or 3 J’s,


etc.), and 2 of another type (2 7’s or 2 Q’s, etc.)

There are 4𝐶𝐶3 ways of choosing 3 cards of one type.


But, there are 13 types to choose from.

Hence, there are 13 ( 4𝐶𝐶3 ) ways of choosing 3 cards of one type.

Page 42 of 65
There are 4𝐶𝐶2 ways of choosing 2 cards of one type.
But now there are 12 types to choose from.

Hence, there are 12 ( 4𝐶𝐶2 ) ways of choosing 2 cards of another type.


∴,
13� 4𝐶𝐶3 � 12( 4𝐶𝐶2 ) 3,744
P(full house) = = = 0.0014.
52𝐶𝐶5 2,598,960

8. (S.C.D.) 5 card hand.


A. P(0 aces)?

48𝐶𝐶5
P(0 aces) = = 0.6588.
52𝐶𝐶5

B. P(1 ace)?

� 4𝐶𝐶1 � � 48𝐶𝐶4 �
P(1 ace) = = 0.3.
52𝐶𝐶5

C. P(at least 1 ace)?

P(at least 1 ace) = 1 – P(0 aces)

= 1 – 0.6588

= 0.3412.

Page 43 of 65
EXAMPLE.
1. Given 4 circular disks, with holes in their centers, to be placed on 3
pegs.

Radius disk 1 < radius disk 2 < radius disk 3 < radius disk 4.

Problem.
In how many ways could these 4 disks be stacked on the 3 pegs so
that no disk of larger radii rests on a disk of smaller radii?

Page 44 of 65
Solution.
Step 1: Place larger disk, disk 4, on any of 3 pegs. Three possible ways.
Step 2: Place next larger disk, disk 3, on any of 3 pegs. Three possible
ways.
Step 3: Place next larger disk, disk 2, on any of 3 pegs. Three possible
ways.
Step 4: Place next larger disk, disk 1, on any of 3 pegs. Three possible
ways.

Total number of ways: (3)(3)(3)(3) = 81.

2. At a conference on Drug Abuse and Prevention, a researcher


classified a person as addicted if the person displayed at
least two symptoms from the following list:

Page 45 of 65
How many ways could a person be diagnosed as being addicted?

Page 46 of 65
There are 11 symptoms on the list.
Let the set S be the set of the 11 symptoms.
Total number of subsets of S: 211 , which is the Power Set of S. (Refer to
notes on sets).
One of the elements of S is the null set, ∅.

Answer: 211 − 11 − 1 = 2,036.

EXAMPLE.
1. How many solutions exist for the equation:

𝑥𝑥1 + 𝑥𝑥2 + 𝑥𝑥3 = 5 𝑥𝑥𝑖𝑖 ∈ ℤ+ ? (1)

Solution.
Use the substitution 𝑥𝑥𝑖𝑖 = 𝑥𝑥̅𝑖𝑖 + 1 i = 1, 2, 3 in equation (1).

𝑥𝑥̅1 + 𝑥𝑥̅2 + 𝑥𝑥̅3 = 2 (2)

Now then, how many solutions exist to equation (2), where 𝑥𝑥̅𝑖𝑖 ∉ ℤ− ?

N = 2; n = 3.
�𝑁𝑁 + 𝑛𝑛 − 1
𝑛𝑛 − 1
� = �42� = 6 solutions exist.

Solutions to (2); (𝑥𝑥̅𝑖𝑖 ) Solutions to (1); (𝑥𝑥𝑖𝑖 )


110 221
101 212
011 122
200 311
020 131
002 113

Page 47 of 65
PLEASE REFER TO MOODLE FOR NOTES ON
“ELEMENTARY CONDITIONAL PROBABILITY”.

CONDITIONAL PROBABILITY.

THEOREM. Conditional Probability.

Let A and B be events.

𝑃𝑃(𝐴𝐴𝐴𝐴)
P(A|B) = P(B) > 0.
𝑃𝑃(𝐵𝐵)

P(A|B): probability of event A, given event B occurred; OR


probability of A, given B.

P(A): Prior (Priori) probability.


P(A|B): Posterior (Posteriori) probability.

P(A|B): In an experiment, P(A) is sought after event B has occurred.


E.G.: What is the prob. of drawing a king of spades on the
second draw given a queen of spades was drawn on the
first draw?

Page 48 of 65
EXAMPLE SET 4.
Problems.
1. Experiment: Two fair die are rolled, one at a time.
What is the probability the sum of the rolled dice is eight, given the
first die rolled a three?

2. Experiment: An urn contains:


10 white balls
5 yellow balls
10 black balls.

A ball is chosen from the urn, and it is noted it is not a black


ball. What is the probability it is a yellow ball?

3. Experiment: A fair coin is flipped twice. What is the probability both


flips yielded heads, given the first flip was heads?

4. Experiment: A Manager wants to buy a computer system. He is


undecided whether to choose Option A or Option B. He prefers
Option B. He estimates his satisfaction with Option A (probability
of being satisfied) at 1/2, and with Option B at 1/3.
He decides to base his decision on the flip of a fair coin.
What is the probability he will be satisfied with Option B?

5. Experiment: An urn contains:


8 red marbles
4 white marbles.

Two marbles are drawn, without replacement, one marble at a time.


What is the probability both marbles are red?

Page 49 of 65
EXAMPLE SET 4.
Solutions.
1. Experiment: Two fair die are rolled, one at a time.
What is the probability the sum of the rolled dice is eight, given the
first die rolled a three?

Events: A: event sum of the dice is eight.


B: event first die rolled a three.

P(A|B)?

𝑃𝑃(𝐴𝐴𝐴𝐴) (1/36) 1
P(A|B) = = (1/6)
= .
𝑃𝑃(𝐵𝐵) 6

2. Experiment: An urn contains:


10 white balls
5 yellow balls
10 black balls.

A black ball is chosen from the urn, and it is noted it is not a black
ball. What is the probability it is a yellow ball?

Events: Y: event ball selected was yellow.


𝐵𝐵�: event ball selected was not black.

P(Y|𝐵𝐵�)?

𝑃𝑃(𝑌𝑌𝐵𝐵�) (5/25) 1
P(Y|𝐵𝐵�) = =( = . (Note: Y ∩ 𝐵𝐵� = Y).
𝑃𝑃(𝐵𝐵�) 15/25) 3

Page 50 of 65
3. Experiment: A fair coin is flipped twice. What is the probability both
flips yielded heads, given the first flip was heads?

Events: A: event both flips resulted in heads.


B: event first flip resulted in head.

P(A|B)?

𝑃𝑃(𝐴𝐴𝐴𝐴) (1/4) 1
P(A|B) = =( = .
𝑃𝑃(𝐵𝐵) 1/2) 2

4. Experiment: A Manager wants to buy a computer system. He is


undecided whether to choose Option A or Option B. He prefers
Option B. He estimates his satisfaction with Option A (probability
of being satisfied) at 1/2, and with Option B at 1/3.
He decides to base his decision on the flip of a fair coin.
What is the probability he will be satisfied with Option B?

Events: E: event of choosing Option B.


F: event of being satisfied with Option B.

P(EF)?
1 1 1
P(EF) = P(E) P(F|E) = �
2
� �3� = 6
.

Page 51 of 65
5. Experiment: An urn contains:
8 red marbles
4 white marbles.

Two marbles are drawn, without replacement, one marble at a time.


What is the probability both marbles are red?

Events: A: event first marble drawn is red.


B: event second marble drawn is red.

P(AB)?

8 7 14
P(AB) = P(A) P(B|A) = � � � � = .
12 11 33

Page 52 of 65
BAYES’S THEOREM.

THEOREM. BAYES’S THEOREM.


Let 𝐸𝐸, 𝐹𝐹1 , 𝐹𝐹2 be events.

𝐸𝐸𝐸𝐸1

𝐸𝐸𝐸𝐸2

𝐸𝐸 = 𝐸𝐸𝐸𝐸1 ∪ 𝐸𝐸𝐹𝐹2 . 𝐸𝐸𝐸𝐸1 ∩ 𝐸𝐸𝐹𝐹2 = ∅ ⇒ 𝐸𝐸𝐸𝐸1 𝑎𝑎𝑎𝑎𝑎𝑎 𝐸𝐸𝐹𝐹2 are


mutually exclusive (M.E.).

∴, P(E) = 𝑃𝑃(𝐸𝐸𝐸𝐸1 ∪ 𝐸𝐸𝐹𝐹2 ) = 𝑃𝑃(𝐸𝐸𝐸𝐸1 ) + 𝑃𝑃(𝐸𝐸𝐹𝐹2 )

P(E) = 𝑃𝑃(𝐹𝐹1 ) 𝑃𝑃(𝐸𝐸|𝐹𝐹1 ) + 𝑃𝑃(𝐹𝐹2 ) 𝑃𝑃(𝐸𝐸 |𝐹𝐹2 ).

Page 53 of 65
EXAMPLE.
Problems.
1. Experiment. Two urns.

URN 1 URN 2
2 white balls 1 white ball
4 red balls 1 red ball

A ball is randomly chosen from urn 1 and placed into urn2.


A ball is then randomly chosen from urn2.

A. What is the probability the ball chosen from urn 2 is white?

B. What is the probability the transferred ball was white, given a white
ball was chosen from urn 2?

2. A Cancer Test for a certain type of Cancer is 95% effective in


detecting the disease, when in fact, it is present. However, the test
yields a “false positive” result of 1% for a person not having the
disease. If 0.5% of the population actually has the disease, what is the
probability that a person has the disease given that his test result is
positive?

Page 54 of 65
EXAMPLE.
Solutions.
1. Experiment. Two urns.

URN 1 URN 2
2 white balls 1 white ball
4 red balls 1 red ball

A ball is randomly chosen from urn 1 and placed into urn2.


A ball is then randomly chosen from urn2.

A. What is the probability the ball chosen from urn 2 is white?

Events: W: event transferred ball was white


E: event ball chosen from urn 2 was white.

P(E)?

�)
P(E) = P(EW ∪ E𝑊𝑊 � are M.E.
EW and E𝑊𝑊

�)
= P(EW) + P(E𝑊𝑊

� ) P(E|𝑊𝑊
= P(W) P(E|W) + P(𝑊𝑊 �)

2 2 4 1 4
=�
6
� �3� + �6� �3� = 9 .

Page 55 of 65
B. What is the probability the transferred ball was white, given a white
ball was chosen from urn 2?

P(W|E)?

𝑃𝑃(𝑊𝑊𝑊𝑊)
P(W|E) =
𝑃𝑃(𝐸𝐸)

𝑃𝑃(𝑊𝑊) 𝑃𝑃(𝐸𝐸|𝑊𝑊)
=
𝑃𝑃(𝐸𝐸)

2 2
� �� �
6 3
= 4
� �
9

1
= .
2

2. A Cancer Test for a certain type of Cancer is 95% effective in


detecting the disease, when in fact, it is present. However, the test
yields a “false positive” result of 1% for a person not having the
disease. If 0.5% of the population actually has the disease, what is the
probability a person has the disease given his test result is
positive?

Solution:

Events: D: Event tested person has the disease.


E: Event tested person’s test result is positive.

Page 56 of 65
P(D|E)?

𝑃𝑃(𝐷𝐷𝐷𝐷)
P(D|E) =
𝑃𝑃(𝐸𝐸)

𝑃𝑃(𝐷𝐷) 𝑃𝑃(𝐸𝐸|𝐷𝐷)
=
𝑃𝑃(𝐸𝐸)

𝑃𝑃(𝐷𝐷) 𝑃𝑃(𝐸𝐸|𝐷𝐷)
= �)
� are M.E.
𝐸𝐸𝐸𝐸 𝑎𝑎𝑎𝑎𝑎𝑎 𝐸𝐸𝐷𝐷
𝑃𝑃(𝐸𝐸𝐸𝐸 ∪ 𝐸𝐸𝐷𝐷

𝑃𝑃(𝐷𝐷) 𝑃𝑃(𝐸𝐸|𝐷𝐷)
= �)
𝑃𝑃(𝐸𝐸𝐸𝐸) + 𝑃𝑃(𝐸𝐸𝐷𝐷

𝑃𝑃 (𝐷𝐷) 𝑃𝑃(𝐸𝐸|𝐷𝐷)
= � ) 𝑃𝑃(𝐸𝐸|𝐷𝐷
�)
𝑃𝑃(𝐷𝐷) 𝑃𝑃(𝐸𝐸|𝐷𝐷) + 𝑃𝑃(𝐷𝐷

(0.005) (0.95)
= (0.005) (0.95) + (0.995) (0.01)

95
= ≈ 0.323.
294

Page 57 of 65
Page 58 of 65
EXAMPLE SET 5.
Problems.
1. Experiment: Three cards (identical in form) are in a box. Each card
is coloured on both sides.
Card C1 is coloured red on both sides.
Card C2 is coloured black on both sides.
Card C3 is coloured red on one side, black on the other.

The cards are mixed, and one card is randomly chosen and put
down on the table. If the upper side of the chosen card is red,
what is the probability the other side is black?

2. A company decides to sponsor one event: a football game, a soap


opera, a game show, or a news program. The respective
probabilities are: 0.2, 0.4, 0.3, 0.1.
The probabilities of receiving high ratings when sponsoring
these events are respectively: 0.85, 0.45, 0.35, 0.15.
If the company got a high rating, what is the probability it
sponsored the soap opera?

Page 59 of 65
EXAMPLE SET 5.
Solutions.
1. Experiment: Three cards (identical in form) are in a box. Each card
is coloured on both sides.
Card C1 is coloured red on both sides.
Card C2 is coloured black on both sides.
Card C3 is coloured red on one side, black on the other.

The cards are mixed, and one card is randomly chosen and put
down on the table. If the upper side of the chosen card is red,
what is the probability the other side is black?

Solution:

Events: R: Event upturned side of chosen card is red.


C1, C2, C3: Given above.

P(C3|R)?

𝑃𝑃(𝐶𝐶3 𝑅𝑅)
P(C3|R) =
𝑃𝑃(𝑅𝑅)

𝑃𝑃(𝐶𝐶3) 𝑃𝑃(𝑅𝑅|𝐶𝐶3)
=
𝑃𝑃(𝑅𝑅)

𝑃𝑃 (𝐶𝐶3) 𝑃𝑃(𝑅𝑅|𝐶𝐶3)
= RC1, RC2, and RC3 are M.E.
𝑃𝑃(𝑅𝑅𝑅𝑅1 ∪ 𝑅𝑅𝑅𝑅2 ∪ 𝑅𝑅𝑅𝑅3)

𝑃𝑃 (𝐶𝐶3) 𝑃𝑃(𝑅𝑅|𝐶𝐶3)
=
𝑃𝑃(𝑅𝑅𝑅𝑅1) + 𝑃𝑃(𝑅𝑅𝑅𝑅2) + 𝑃𝑃(𝑅𝑅𝑅𝑅3)

Page 60 of 65
𝑃𝑃 (𝐶𝐶3) 𝑃𝑃(𝑅𝑅|𝐶𝐶3)
=
𝑃𝑃(𝐶𝐶1) 𝑃𝑃(𝑅𝑅|𝐶𝐶1) + 𝑃𝑃(𝐶𝐶2) 𝑃𝑃(𝑅𝑅|𝐶𝐶2) + 𝑃𝑃(𝐶𝐶3) 𝑃𝑃(𝑅𝑅|𝐶𝐶3)

(1/3) (1/2)
= (1/3) (1) + (1/3)(0) + (1/3)(1/2)

1
= .
3

2. A company decides to sponsor one event: a football game, a soap


opera, a game show, or a news program. The respective
probabilities are: 0.2, 0.4, 0.3, 0.1.
The probabilities of receiving high ratings when sponsoring
these events are respectively: 0.85, 0.45, 0.35, 0.15.
If the company got a high rating, what is the probability it
sponsored the soap opera?

Solution:

Events: A: Event company got a high rating.


B1: Event company sponsored a football game.
B2: Event company sponsored a soap opera.
B3: Event company sponsored a game show.
B4: Event company sponsored a news program.

P(B2|A)?

𝑃𝑃(𝐵𝐵2 𝐴𝐴)
P(B2|A) =
𝑃𝑃(𝐴𝐴)

Page 61 of 65
𝑃𝑃(𝐵𝐵2) 𝑃𝑃(𝐴𝐴|𝐵𝐵2)
=
𝑃𝑃(𝐴𝐴)

𝑃𝑃 (𝐵𝐵2) 𝑃𝑃(𝐴𝐴|𝐵𝐵2)
= AB1, AB2, AB3, AB4 are M.E.
𝑃𝑃(𝐴𝐴𝐴𝐴1 ∪ 𝐴𝐴𝐴𝐴2 ∪ 𝐴𝐴𝐴𝐴3 ∪ 𝐴𝐴𝐴𝐴4)

𝑃𝑃(𝐵𝐵2) 𝑃𝑃(𝐴𝐴|𝐵𝐵2)
= ( ) ( ) ( )
𝑃𝑃 𝐴𝐴𝐴𝐴1 + 𝑃𝑃 𝐴𝐴𝐴𝐴2 + 𝑃𝑃 𝐴𝐴𝐴𝐴3 + 𝑃𝑃(𝐴𝐴𝐴𝐴4)

𝑃𝑃(𝐵𝐵2) 𝑃𝑃(𝐴𝐴|𝐵𝐵2)
=
𝑃𝑃(𝐵𝐵1) 𝑃𝑃(𝐴𝐴|𝐵𝐵1) + 𝑃𝑃(𝐵𝐵2) 𝑃𝑃(𝐴𝐴|𝐵𝐵2) + 𝑃𝑃(𝐵𝐵3) 𝑃𝑃(𝐴𝐴|𝐵𝐵3) + 𝑃𝑃(𝐵𝐵4) 𝑃𝑃(𝐴𝐴|𝐵𝐵4)

(0.4) (0.45)
= (0.2) (0.85) + (0.4)(0.45) + (0.3)(0.35) + (0.1)(0.15)

= 0.38 .

DEF.: INDEPENDENT EVENTS;


Let A, B, C be events.

A and B are said to be Independent if:


P(AB) = P(A)P(B); P(A|B) = P(A).

Nota Bene: A and B are said to be Independent if the outcome of one,


does not affect the outcome of the other.

Page 62 of 65
A, B, and C are said to be Independent if:
P(ABC) = P(A)P(B)P(C)
P(AB) = P(A)P(B)
P(AC) = P(A)P(C)
P(BC) = P(B)P(C).

Nota Bene: If events A, B or A, B, C are not Independent, they are said


to be Dependent.

THEOREM.
If A and B are Independent events then so are A and 𝐵𝐵�.

EXAMPLE SET 6.
Problems.
1. S.C.D.
Experiment. Draw one card.

Let A: event of drawing a king.


B: event of drawing a spade.

Are A and B Independent?

2. Experiment. Roll of two die.

Let S: event sum of the two die is 7.


D: event die 1 rolled a 4.

Are S and D Independent?

Page 63 of 65
EXAMPLE SET 6.
Solutions.
1. S.C.D.
Experiment. Draw one card.

Let A: event of drawing a king.


B: event of drawing a spade.

Are A and B Independent?

Must prove: P(AB) = P(A)P(B).

P(AB) = P(A)P(B)
P(B) P(A|B) = P(A)P(B)

13 1 4 13
�52� �13� = �52� �52�

1 1
= ⇒ A and B are Independent.
52 52

Page 64 of 65
2. Experiment. Roll of two die.

Let S: event sum of the two die is 7.


D: event die 1 rolled a 4.

Are S and D Independent?

Must prove: P(SD) = P(S)P(D).

P(SD) = P(S)P(D)
P(D) P(S|D) = P(S)P(D)

1 1 6 1
�6� �6� = �36� �6�

1 1
= ⇒ S and D are Independent.
36 36

Page 65 of 65

You might also like