Introduction To Probability
Introduction To Probability
Wawan
Hafid
Syaifudin
Probability
Probability
February 5, 2021
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability
Consider the experiment in which we throw a die once. The sample space is
S = {1, 2, 3, 4, 5, 6}
The outcome ”the top face shows a three” is the sample point 3.
The event A1 , that the die shows an even number is the subset
A1 = {2, 4, 6} of the sample space.
The event A2 , that the die shows a number larger than 4 is the subset
A2 = {5, 6} of the sample space.
Wawan
Hafid
Syaifudin
Probability
When we talk about probabilities we talk about the probability of events that
might occur in some experiment.
An experiment is some activity with an observable outcome.
The set of all possible outcomes of the experiment is called the sample
space.
A particular outcome is called a sample point.
A collection of possible outcomes is called an event.
Wawan
Hafid
Syaifudin
Probability
|A|
P(A) =
|S |
where |A| denotes the number of sample points in the event A.
Wawan
Hafid
Syaifudin
Probability
S = {1, 2, 3, 4, 5, 6} A1 = {2, 4, 6} A2 = {5, 6}
Find :
P(A1 )
P(A2 )
Solution:
|A1 | 3 1
P(A1 ) = = =
|S | 6 2
|A2 | 2 1
P(A2 ) = = =
|S | 6 3
Wawan
Hafid
Syaifudin
Probability
What about P(face is even, and larger than 4)?
|A1 ∩ A2 | 1
A1 ∩ A2 = { 6 } → P ( A1 ∩ A2 ) = =
|S | 6
Wawan
Hafid
Syaifudin
Probability
What about P(face is even, or larger than 4)?
|A1 ∪ A2 | 4 2
A1 ∪ A2 = {2, 4, 5, 6} → P(A1 ∪ A2 ) = = =
|S | 6 3
Wawan
Hafid
Syaifudin
Probability
What about P(face is not even)?
|Ac1 | 3 1
Ac1 = {1, 3, 5} → P(Ac1 ) = = =
|S | 6 2
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability
In many settings, either the sample space is infinite or all possible outcomes of
the experiment are not equally likely. We still wish to associate probabilities
with events of interest.
Luckily, there are some rules/laws that allow us to calculate and manipulate
such probabilities with ease.
Wawan
Hafid
Syaifudin
Probability
There are three axioms which we need in order to develop our laws
A set of events are mutually exclusive if at most one of the events can occur
in a given experiment.
Probability Definition 1
F is called a σ−field (or σ−algebra) on Ω if it is a set of events and satisfies:
∅, Ω ∈ F
If A ∈ F , then its complement Ac ∈ F
S∞
If A1 , A2 , ... ∈ F , then i =1 Ai ∈F
Definition 2
A function P : F → [0, 1] is called a probability measure if it satisfies
P( Ω ) = 1
If A1 , A2 , ... ∈ F , and Ai ∩ Aj = ∅ for i 6= j, then
∞ ∞
!
P ∑ P(Ai )
[
Ai =
i =1 i =1
Wawan
Hafid
Syaifudin
Probability
Definition 3
A probability space (Ω, F , P) is called a probability space.
Wawan
Hafid
Syaifudin
Ω = {HH, HT , TH, TT }
as sample space. E.g., the element HT means that the first coin shows heads
and the second coin shows tails. Suppose we can distinguish between the two
coins. Then we can take for F the class of all subsets of Ω. That is,
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability
Suppose that
A = The event that a randomly selected student from a class has a bike.
P(Ac ) = 1 − P(A)
Wawan
Hafid
Syaifudin
Probability
De Morgans’s law :
1 (A ∪ B )c = Ac ∩ B c
2 (A ∩ B )c = Ac ∪ B c
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability
Suppose one such SNP is chosen at random, what is the probability that it is
variable in either the African or the Asian population?
Wawan
Hafid Write A for the event that the SNP is variable in Africa, and B for the event
Syaifudin
that it is variable in Asia. We are told
Probability
P(A) = 0.7
P(B ) = 0.8
P(A ∩ B ) = 0.6
Wawan
Hafid
Syaifudin
Probability
Suppose
A = a randomly selected student from the class has a bike
B = a randomly selected student from the class has black eyes
What is the probability that a student has black eyes GIVEN that the student
has a bike?
Wawan
Hafid
Syaifudin
Think of P(B |A) as ’how much of A is taken up by B’
Probability
P(A ∩ B )
P(B |A) =
P(A)
Wawan
Hafid
Syaifudin
Probability
For the SNP example what is the probability that a SNP is variable in the
African population given that it is variable in the Asian population?
P(A) = 0.7
P(B ) = 0.8
P(A ∩ B ) = 0.6
We want
P(A ∩ B ) 0.6
P(B |A) = =
P(A) 0.7
Wawan
Hafid
Syaifudin
Probability
We can rearrange the conditional probability laws to obtain a general
Multiplication Law
P(A ∩ B )
P(B |A) = ⇒ P(B |A).P(A) = P(A ∩ B )
P(A)
Similarly P(A|B ).P(B ) = P(A ∩ B )
Wawan
Hafid
Syaifudin If two events A1 and A2 are mutually exclusive, then
Probability
P[(A1 ∪ A2 ) ∩ B ]
P(A1 ∪ A2 |B ) =
P(B )
P(A1 ∩ B ) ∪ P(A2 ∩ B )
=
P(B )
P(A1 ∩ B ) + P(A2 ∩ B )
=
P(B )
= P(A1 |B ) + P(A2 |B )
⇒ P(A|B ) = 1 − P(Ac |B )
⇒ 0 ≤ P(A|B ) ≤ 1
⇒ P(A1 ∪ A2 |B ) = P(A1 |B ) + P(A2 |B ) − P(A1 ∩ A2 |B )
Wawan
Hafid
Syaifudin
Suppose we toss a fair coin twice. Consider the events A: head on the first
Probability toss and B: head on both tosses.
There apperas to be some dependence. On the other hand, if we define the
event B as B: head on second toss, we do not think that the occurence of A
affects the chances that B will occur.
P(A ∩ B ) = P(A).P(B )
Wawan
Hafid
Syaifudin
The n events A1 , A2 , ..., An are said to be independent or mutually
Probability independent if
Note that, in the case (provided P(B ) > 0), if A and B are independent, then
P(A ∩ B ) P(A).P(B )
P(A|B ) = = = P(A)
P(B ) P(B )
and similarly P(B |A) = P(B ) (provided P(A) > 0).
So for independent events, knowledge that one of the events has occurred does
not change our assessment of the probability that the other event has occur.
Wawan
Hafid
Syaifudin
Suppose we toss a fair coin.
Probability
A = head on the first toss
B = head on the second toss
⇒ Clearly A and B are independent events since the outcome on each toss is
unrelated to other tosses, so:
1
P(A) =
2
1
P(B ) =
2
1
P(A ∩ B ) = P(A).P(B ) =
4
Wawan
Hafid
Syaifudin
Probability
Suppose we roll a die once.
A = the number is even
B = the number is > 3
⇒ The events A and B will be dependent, since
1
P(A) =
2
1
P(B ) =
2
2
P(A ∩ B ) = P(4 or 6 occurs) = 6= P(A).P(B )
6
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Boole’s inequality
Probability
Benferroni’s inequality
Wawan
Hafid
Syaifudin If P(A ∩ B ) = 0.52 and P(A ∩ B c ) = 0.14, what is P(A)?
Probability
P(A) is made up of two parts:
the part of A contained in B
the part of A contained in B c
Wawan
Hafid
So we have the rule:
Syaifudin
Probability
P(A) = P(A ∩ B ) + P(A ∩ B c )
n n
P(A) = ∑ P(A ∩ Bi ) = ∑ P(Bi )P(A|Bi )
i =1 i =1
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability Two cards are drawn without replacement from a deck of cards. Let A1
denote the event of getting ”an ace on the first draw” and A2 denote the
event of getting ”an ace on the second draw.”
A1 Ac1
A2 4.3 48.4 4.51
Ac2 4.48 48.47 48.51
4.51 48.51 52.51
The probability of getting ”an ace on the first draw and an ace on the second
draw” is given by
4 3
P(A1 ∩ A2 ) = .
52 51
Wawan
Hafid
Syaifudin
Probability Suppose we are interested in P(A1 ) without regard to what happens on the
second draw. First note that A1 may be partitioned as
Wawan
Hafid
Syaifudin
Probability
The conditional probability that an ace is drawn on the second draw given
that an ace was obtained on the first draw is
P(A1 ∩ A2 )
P ( A2 | A1 ) =
P ( A1 )
(4.3)/(52.51)
=
(4)/(52)
3
=
51
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Let S be a set and let A = {A1 , A2 , ..., An } be a collection of subsets of S.
Probability The collection A is called a partition of S if
Sn
S= i =1 Ai
Ai ∩ Aj = ∅ for i 6= j
Wawan
Hafid
Syaifudin
P(A ∩ B )
P(B |A) =
P(A)
Using the Multiplication Law we can re-write this as
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability
Two boxes containing marbles are placed on a table. The boxes are labeled B1
and B2 . Box B1 contains 7 green marbles and 4 white marbles. Box B2
contains 3 green marbles and 10 yellow marbles. The boxes are arranged so
that the probability of selecting box B1 is 31 and the probability of selecting
box B2 is 23 . Kathy is blindfolded and asked to select a marble. She will win a
color TV if she selects a green marble.
1 What is the probability that Kathy will win the TV (that is, she will
select a green marble)?
2 If Kathy wins the color TV, what is the probability that the green marble
was selected from the first box?
Wawan
Hafid
Syaifudin
Probability
Probability
P(A|B1 ).P(B1 )
P(B1 |A) =
P(A|B1 ).P(B1 ) + P(A|B2 ).P(B2 )
7
1
11 3
= 7
1
3 2
11 3 + 13 3
91
=
157
Wawan Hafid Syaifudin Probability 48
Exercise 3
Probability
Wawan
Hafid
Syaifudin
A box contains 100 microchips, some of which were produced by factory 1 and
Probability
the rest by factory 2. Some of the microchips are defective and some are good
(nondefective). An experiment consists of choosing one microchip at random
from the box and testing whether it is good or defective.
Let A be the event ”obtaining a defective microchip”; consequently, Ac is the
event ”obtaining a good microchip”. Let B1 be the event ”produced by shift
1” (factory 1), B2 the event ”produced by shift 2” (factory 1), and B3 the
event ”produced by factory 2”. The table below gives the number of
microchips in each category.
B1 B2 B3 Totals
A 5 10 5 20
Ac 20 25 35 80
Totals 25 35 40 100
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability
Find:
1 P(B1 ), P(B2 ) and P(B3 )
2 P(A), and P(Ac )
3 P(A|B1 ), P(A|B2 ), and P(A|B3 )
4 P(A)
5 P(A) using law of total probability
Wawan
Hafid
Syaifudin
Wawan
Hafid
Syaifudin It might be of interest to know the probability that the man arrives at point
A4 . This can be computed from the Law of Total Probability:
Probability
P(A4 ) = P(B1 )P(A4 |B1 ) + P(B2 )P(A4 |B2 ) + P(B3 )P(A4 |B3 )
1 1 1 1 1 1
= + + (0) =
3 4 3 2 3 4
Suppose the man arrives at point A4 , but it is not known which route he took.
The probability that he passed through a particular point,B1 , B2 or B3 , can be
computed from Bayes’ Rule. For example,
P(B1 )P(A4 |B1 )
P(B1 |A4 ) =
P(B1 )P(A4 |B1 ) + P(B2 )P(A4 |B2 ) + P(B3 )P(A4 |B3 )
(1/3)(1/4) 1
= =
(1/3)(1/4) + (1/3)(1/2) + (1/3)(0) 3
Wawan
Hafid
Syaifudin
If there are N possible outcomes of each of r trials of an experiment, then
Probability there are N r possible outcomes in the sample space.
For example: How many ways can a 20-question true-false test be answered?
The answer is 220 .
Another example:
If five cards are drawn from a deck of 52 cards with replacement, then there
are 525 possible hands.
If the five cards are drawn without replacement, then the more general
multiplication principle may be applied to determine that there are
52.51.50.49.48 possible hands.
In the first case, the same card may occur more than once in the same hand.
In the second case, however, a card may not be repeated.
Wawan
Hafid
Syaifudin
Probability
Note that in both cases in the above example, order is considered impor-
tant.
If order had not been considered important, both of these outcomes would
be considered the same.
This introduces the concept of distinguishable and indistinguishable ele-
ments.
It is common practice to assume that order is not important when drawing
without replacement, unless otherwise specified.
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability
Consider 2 objects A B
A: 2 ways AB BA
Wawan
Hafid Consider 2 objects A B C
Syaifudin
Consider 2 objects A B C D
A: 24 ways
Wawan
Hafid
Syaifudin
n (n − 1)(n − 2)...(3)(2)(1) = n!
We say there are n Pr permutations of r objects chosen from n. The formula
n!
n Pr =
(n − r ) !
Wawan
Hafid
Syaifudin
Probability
Now consider the number of ways of choosing 2 objects from 4 when the order
doesnt matter. We just want to count the number of possible combinations.
AB AC AD BC BD CD
BA CA DA CB DB DC
Notice how the permutations are grouped in 2s which are the same
combination of letters.
Thus there are 12/2 = 6 possible combinations.
AB AC AD BC BD CD
Wawan
Hafid
Syaifudin
Probability
We say there are n Cr combinations of r objects chosen from n. The formula
for n Cr is given by:
n!
n Cr =
(n − r )!r !
n Pr
n Cr =
r!
Wawan
Hafid
Syaifudin
In the National Lottery you need to choose 6 balls from 49.
Probability
Wawan
Hafid
Syaifudin
Probability
Let us select r objects fromn distinct objects and place them in a box or
”cell,” and then place the remaining n − r objects in a second cell. Clearly,
there are (xn ) ways of doing this (because permuting the objects within a cell
will not produce a new result), and this is referred to as the number of ways of
partitioning n objects into two cells with r objects in one cell and n − r in the
other, The concept generalizes readily to partitioning n distinct objects into
more than two cells.
Wawan
Hafid
Syaifudin
Probability
n!
r1 !r2 ! · · · rk !
where ∑ki=1 ri = n
Wawan
Hafid
Syaifudin
Probability
How many ways can you distribute 12 different popsicles equally among four
children?
Solution:
12!
= 369, 600
3!3!3!3!
Wawan
Hafid
Syaifudin
Probability
A box contains 10 black marbles and 20 white marbles, and five marbles are
selected without replacement The probability of getting exactly two black
marbles is
(10 20
2 )( 3 )
P(exactly 2 black) = = 0.360
(30
5)
Wawan
Hafid
Syaifudin
Probability
A box contains 10 black marbles and 20 white marbles, and five marbles are
selected with replacement The probability of getting exactly two black marbles
is
2 3
5 10 20
P(exactly 2 black) =
2 30 30
Note that in this case the outcomes on each draw are independent.
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability
Bill, George, and Ross, in order, roll a die. The first one to roll an even
number wins and the game is ended. What is the probability that Bill will win
the game?
Wawan
Hafid
Syaifudin
Probability
Five fair dice are thrown. What is the probability that a full house is thrown
(that is, where two dice show one number and other three dice show a second
number)?
Wawan
Hafid
Syaifudin
Probability
An urn contains 3 red balls, 2 green balls and 1 yellow ball. Three balls are
selected at random and without replacement from the urn. What is the
probability that at least 1 color is not drawn?
Wawan
Hafid
Syaifudin
Probability
Mr. Joe plants 10 rose bushes in a row. Eight of the bushes are white and two
are red, and he plants them in random order. What is the probability that he
will consecutively plant seven or more white bushes?
Wawan
Hafid
Syaifudin
Probability
Let A and B be independent events with P(A) = P(B ) and P(A ∪ B ) = 0.5.
What is the probability of the event A?
Wawan
Hafid
Syaifudin
Probability
English and American spelling are rigour and rigor, respectively. A man
staying at Al Rashid hotel writes this word, and a letter taken at random from
his spelling is found to be a vowel. If 40 percent of the English-speaking men
at the hotel are English and 60 percent are American, what is the probability
that the writer is an Englishman?
Wawan
Hafid
Syaifudin
Probability
Wawan
Hafid
Syaifudin
Probability
Suppose Q and S are independent events such that the probability that at
least one of them occurs is 13 and the probability that Q occurs but S does
not occur is 91 . What is the probability of S?
Wawan
Hafid
Syaifudin
Probability
A cookie jar has 3 red marbles and 1 white marble. A shoebox has 1 red
marble and 1 white marble. Three marbles are chosen at random without
replacement from the cookie jar and placed in the shoebox. Then 2 marbles
are chosen at random and without replacement from the shoebox. What is
the probability that both marbles chosen from the shoebox are red?