Nguyễn Ngọc Tứ
Lecture 2
Nguyễn Ngọc Tứ       Lecture 2    2023   1 / 19
Lecture outline
   Reading chapter 2
   Conditional probability
   Three important tools:
    - Multiplication rule
    - Total probability theorem
    - Bayes’ rule
   Independence
     Nguyễn Ngọc Tứ               Lecture 2   2023   2 / 19
Conditional probability
   Definition
   Let A, B be events. The conditional probability P(A|B) the event of
   "A occurs given that B occured" is
                                 P(A ∩ B)
                      P(A|B) =            ,     P(B) ̸= 0.
                                  P(B)
Example. Rolling two dice.
Let A be the event "the second die shows a greater than the first"
and B be the event "the first die shows a ". Then
     Nguyễn Ngọc Tứ                 Lecture 2                2023        3 / 19
Conditional probability
   Definition
   Let A, B be events. The conditional probability P(A|B) the event of
   "A occurs given that B occured" is
                                 P(A ∩ B)
                      P(A|B) =            ,     P(B) ̸= 0.
                                  P(B)
Example. Rolling two dice.
Let A be the event "the second die shows a greater than the first"
and B be the event "the first die shows a ". Then
               B = {( , ), ( , ), ( , ), ( , ), ( , ), ( , )}
         A ∩ B = {( , )}.
                      P(A ∩ B)   |A ∩ B|   1
Hence, P(A|B) =                =         =
                       P(B)        |B|     6
     Nguyễn Ngọc Tứ                 Lecture 2                2023        3 / 19
Example
45. The population of a particular country consists of three ethnic groups.
Each individual belongs to one of the four major blood groups. The accom-
panying joint probability table gives the proportions of individuals in the
various ethnic group–blood group combinations.
                                                Blood Group
                              O          A           B          AB
                        1   0.082      0.106       0.008       0.004
       Ethnic Group     2   0.135      0.141       0.018       0.006
                        3   0.215      0.200       0.065       0.020
Suppose that an individual is randomly selected from the population, and
define events by A ="type A selected", B ="type B selected", C ="ethnic
group 3 selected".
a. Calculate P(A), P(C ), P(A ∩ C ), P(A|C ) and P(C |A).
b. If the selected individual does not have type B blood, what is the prob-
ability that he or she is from ethnic group 1?
     Nguyễn Ngọc Tứ                 Lecture 2                 2023      4 / 19
Example
                                                Blood Group
                              O          A           B          AB
                        1   0.082      0.106       0.008       0.004
       Ethnic Group     2   0.135      0.141       0.018       0.006
                        3   0.215      0.200       0.065       0.020
a. Calculate P(A), P(C ), P(A ∩ C ), P(A|C ) and P(C |A).
b. If the selected individual does not have type B blood, what is the prob-
ability that he or she is from ethnic group 1?
     Nguyễn Ngọc Tứ                 Lecture 2                 2023      5 / 19
Models based on conditional probabilities
Event A: Airplane is flying above
Event B: Something registers on radar screen
     Nguyễn Ngọc Tứ              Lecture 2     2023   6 / 19
Models based on conditional probabilities
Event A: Airplane is flying above
Event B: Something registers on radar screen
                                                P(A ∩ B)
                                       P(A|B) =
                                                  P(B)
                                       P(A ∩ B) = P(B|A)P(A)
                                                 = 0.99 × 0.05
                                       P(B) = P(A ∩ B) + P(Ac ∩ B)
                                             = P(B|A)P(A) + P(B|Ac )P(Ac )
                                             = 0.99 × 0.05 + 0.10 × 0.95
     Nguyễn Ngọc Tứ              Lecture 2                       2023      6 / 19
Multiplication rule - Total probability theorem
  Theorem – Multiplication rule
  (i) P(A ∩ B) = P(A|B)P(B) = P(B|A)P(A)
  (ii) P(A ∩ B ∩ C ) = P(A)P(B|A)P(C |AB)
  (iii) Let A1 , A2 , . . . , An be events with P(A1 ∩A2 ∩. . .∩An ) ̸= 0. Then
  P(A1 ∩ A2 ∩ . . . ∩ An ) = P(An |An−1 . . . A1 ) × . . . × P(A2 |A1 )P(A1 )
  Theorem – Total probability theorem
  Let A1 , A2 , . . . , An be disjoint events that form a partition of sample
  space and assume that P(Ai ) > 0, for all i = 1, . . . , n. Then, for any
  event B, we have
              P(B) = P(B|A1 )P(A1 ) + . . . + P(B|An )P(An )
    Nguyễn Ngọc Tứ                   Lecture 2                    2023            7 / 19
Total probability theorem - Exercise
60. 72% of the light aircraft that disappear while in flight in a certain country are
subsequently discovered. Of the aircraft that are discovered, 65% have an emer-
gency locator, whereas 80% of the aircraft not discovered do not have such a
locator. Suppose a light aircraft has disappeared.
a. If it has an emergency locator, what is the probability that it will not be discov-
ered?
b. If it does not have an emergency locator, what is the probability that it will be
discovered?
      Nguyễn Ngọc Tứ                   Lecture 2                     2023          8 / 19
Bayes’ rule
   Theorem – Bayes’ rule
   Let A1 , A2 , . . . , An be disjoint events that form a partition of sample
   space and assume that P(Ai ) > 0, for all i = 1, . . . , n. Then, for any
   event B such that P(B) > 0, we have
                  P(Ai ∩ B)        P(B|Ai )P(Ai )        P(B|Ai )P(Ai )
   P(Ai |B) =                   =                  = Pn
                      P(B)              P(B)            i=1 P(B|Ai )P(Ai )
59. At a certain gas station, 45% of the customers use regular gas (A1), 30% use
plus gas (A2), and 25% use premium (A3). Of those customers using regular gas,
only 50% fill their tanks (event B). Of those customers using plus, 70% fill their
tanks, whereas of those using premium, 40% fill their tanks.
a. What is the probability that the next customer will request plus gas and fill the
tank?
b. What is the probability that the next customer will fill the tank?
c. If the next customer fills the tank, what is the probability that regular gas is
requested?    Plus? Premium?
       Nguyễn Ngọc Tứ                 Lecture 2                     2023          9 / 19
Bayes’ rule - Exercise
    Nguyễn Ngọc Tứ       Lecture 2   2023   10 / 19
Homework
62. A company that manufactures video cameras produces a basic model
and a deluxe model. Over the past year, 60% of the cameras sold have
been of the basic model. Of those buying the basic model, 40% purchase an
extended warranty, whereas 60% of all deluxe purchasers do so. If you learn
that a randomly selected purchaser has an extended warranty, how likely is
it that he or she has a basic model?
     Nguyễn Ngọc Tứ               Lecture 2                 2023        11 / 19
Homework
104. A company uses three different assembly lines—A1 , A2 , and A3 —to
manufacture a particular component. Of those manufactured by line A1 ,
6% need rework to remedy a defect, whereas 9% of A2 ’s components need
rework and 12% of A3 ’s need rework. Suppose that 55% of all components
are produced by line A1 , 25% are produced by line A2 , and 20% come
from line A3 . If a randomly selected component needs rework, what is the
probability that it came from line A1 ? From line A2 ? From line A3 ?
     Nguyễn Ngọc Tứ              Lecture 2                2023        12 / 19
Homework
103. A certain company sends 35% of its overnight mail parcels via express
mail service E1 , 55% of the overnight parcels are sent via express mail service
E2 and the remaining 10% are sent via E3 . Of these parcels sent via E1 , 2%
arrive after the guaranteed delivery time (denote the event “late delivery”
by L). Of those sent via E2 , only 1% arrive late, whereas 4% of the parcels
handled by E3 arrive late.
a. What is the probability that a randomly selected parcel arrived late?
b. If a randomly selected parcel has arrived on time, what is the probability
that it was not sent via E1 ?
      Nguyễn Ngọc Tứ                Lecture 2                   2023        13 / 19
Independence of two events
Two events A, B are said to be independent if the chance of one occuring
is not altered by the other’s occurence; that is, P(A|B) = P(A). The mul-
tiplication rule implies that
                      P(A ∩ B) = P(A|B)P(B) = P(A)P(B)
and, by symmetry, P(B|A) = P(B).
   Definition
   Two events A, B are independent if
                            P(A ∩ B) = P(A)P(B)
     Nguyễn Ngọc Tứ                Lecture 2              2023        14 / 19
Independence of two events
  Example (a)
  Roll two fair dice.
     A = { 1st roll is a 1 }
     B = { sum of two roll is a 7 }
     A ∩ B = { the result of the two rolls (1,6) }
  P(A) =? P(B) =? P(A ∩ B) =?
Independence of two events
  Example (a)
  Roll two fair dice.
     A = { 1st roll is a 1 }
     B = { sum of two roll is a 7 }
     A ∩ B = { the result of the two rolls (1,6) }
  P(A) =? P(B) =? P(A ∩ B) =?
                6              6
        P(A) =     and P(B) =
               36             36
                    1
        P(A ∩ B) =
                   36
  Hence, P(A ∩ B) = P(A)P(B), and the independence of A and B is
  verified.
    Nguyễn Ngọc Tứ              Lecture 2             2023         15 / 19
Independence of two events
  Example (b)
  Roll two fair dice.
     A = { maximum of the two rolls is 2 }
     B = { minimum of the two rolls is 2 }
     A ∩ B = { the result of the two rolls (2,2) }
  P(A) =? P(B) =? P(A ∩ B) =?
Independence of two events
  Example (b)
  Roll two fair dice.
     A = { maximum of the two rolls is 2 }
     B = { minimum of the two rolls is 2 }
     A ∩ B = { the result of the two rolls (2,2) }
  P(A) =? P(B) =? P(A ∩ B) =?
               3              9
      P(A) =      and P(B) =
              36             36
                   1
      P(A ∩ B) =
                  36
  Hence, P(A ∩ B) ̸= P(A)P(B), and A and B is not independent.
    Nguyễn Ngọc Tứ              Lecture 2             2023       16 / 19
Independence of several events
  Definition
  The events A1 , A2 , . . . , An are independent if and only if
                    Y
     P(∩i∈I Ai ) =        P(Ai ), for every subsets I of {1, 2, . . . , n}.
                      i∈I
  For n = 3, there events A1 , A2 , A3 are independent if and only if
   (i) P(A1 ∩ A2 ) = P(A1 )P(A2 )
   (ii) P(A1 ∩ A3 ) = P(A1 )P(A3 )
  (iii) P(A2 ∩ A3 ) = P(A2 )P(A3 )
  (iv) P(A1 ∩ A2 ∩ A3 ) = P(A1 )P(A2 )P(A3 )
    Nguyễn Ngọc Tứ                   Lecture 2                     2023       17 / 19
Independence of several events
82. Consider independently rolling two fair dice, one red and the other green.
Let A be the event that the red die shows 2 dots, B be the event that the
green die shows 5 dots, and C be the event that the total number of dots
showing on the two dice is 7.
a. Are these events pairwise independent (i.e., are A and B independent
events, are A and C independent, and are B and C independent)?
b. Are the three events mutually independent?
     Nguyễn Ngọc Tứ                 Lecture 2                  2023       18 / 19
Independence of several events
82. Consider independently rolling two fair dice, one red and the other green.
Let A be the event that the red die shows 2 dots, B be the event that the
green die shows 5 dots, and C be the event that the total number of dots
showing on the two dice is 7.
a. Are these events pairwise independent (i.e., are A and B independent
events, are A and C independent, and are B and C independent)?
b. Are the three events mutually independent?
   Remark
     1. Pairwise independent does not imply independence.
     2. The equality P(A1 ∩ A2 ∩ A3 ) = P(A1 )P(A2 )P(A3 ) is not
        enough for independence.
     Nguyễn Ngọc Tứ                 Lecture 2                  2023       18 / 19
Homework
87. Consider randomly selecting a single individual and having that person test
drive 3 different vehicles. Define events A1 , A2 , and A3 by
A1 = likes vehicle #1; A2 = likes vehicle #2; A3 = likes vehicle #3. Suppose that
         P(A1 ) = 0.55, P(A2 ) = 0.65, P(A3 ) = 0.70, P(A1 ∪ A2 ) = 0.80,
                 P(A2 ∩ A3 ) = 0.40, and P(A1 ∪ A2 ∪ A3 ) = 0.88.
a. Are A2 and A3 independent events? Answer in two different ways.
b. If you learn that the individual did not like vehicle #1, what now is the probability
that he/she liked at least one of the other two vehicles?
      Nguyễn Ngọc Tứ                    Lecture 2                      2023         19 / 19