1. (12.1)(condi0onal(probability( 2. (12.2)(independence( · example(12.1((tay]sachs(disease)(•...

24
Chapter 12: Condi0onal Probability & Independence 1. (12.1) Condi0onal Probability 2. (12.2) Independence

Upload: others

Post on 17-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Chapter  12:  Condi0onal  Probability  &  Independence  

1.  (12.1)  Condi0onal  Probability  2.  (12.2)  Independence  

Page 2: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Mo0va0ng  Example  

•  In  this  chapter  we  explore  finding  the  probability  of  an  event  given  certain  condi0ons  or  prior  informa0on.  

•  For  example,  consider  the  experiment  of  rolling  two  dice.  The  probability  of  the  event  A  =  “sum  of  6”  is  easy  to  find:  

•  Suppose,  however,  that  you  roll  two  dice  and  you  don’t  look  at  them.  I  tell  you  that  you  rolled  doubles.  Now  what  is  the  probability  that  the  sum  is  6?  

•  Solu0on:  Let  event  A  =  “sum  of  6”  and  B  =  “rolled  doubles.”  We  now  want  to  know  the  probability  of  event  A  given  event  B.  Intui0vely,  we  expect  that  the  answer  should  be  1/6  since  there  are  six  ways  to  roll  doubles  and  only  one  of  them  sums  to  6.  

1.  (12.1)  Condi0onal  Probability  

P A( ) =AS

=15, 24, 33, 42, 51{ }

S=536

Page 3: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Defini0on:  Condi0onal  Probability  

•  Let  B  be  an  event  with  P(B)  >  0.  Then  we  define  the  condi&onal  probability  of  event  A  given  B  by:  

•  Heuris0cally,  consider  the  diagram  below  and  adopt  the  “dartboard”  point  of  view  described  in  Chapter  12:  

1.  (12.1)  Condi0onal  Probability  

P AB( ) =P A∩ B( )P B( )

Given  that  event  B  has  occurred,  we  know  that  our  “dart”  has  landed  somewhere  in  B.  Thus,  the  probability  that  it  also  landed  in  A  is  the  area  of  the  shaded  region,  R,  divided  by  the    area  of  rectangle  B.  

=area of R( ) area of S( )area of B( ) area of S( )

=area of Rarea of B

R

Page 4: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Mo0va0ng  Example  (Again)  

•  Recall  our  solu0on  for  the  mo0va0ng  example:  Let  event  A  =  “sum  of  6”  and  B  =  “rolled  doubles.”  Intui0vely,  we  expect  that  the  the  probability  of  A  given  B  should  be  1/6  since  there  are  six  ways  to  roll  doubles  and  only  one  of  them  sums  to  6.  

•  We  now  check  this  against  our  defini0on:  

1.  (12.1)  Condi0onal  Probability  

P AB( ) =P A∩ B( )P B( )

=33{ } S

11,22,33,44,55,66{ } S=1 366 36

=16

Page 5: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.1  (Tay-­‐Sachs  Disease)  

•  Tay-­‐Sachs  disease  is  a  serious  disorder  of  the  nervous  system  that  usually  results  in  death  by  age  2  or  3.  Affected  individuals  have  genotype  `,  while  normal  (non-­‐affected)  individuals  have  genotype  Tt  or  TT.    

•  Judy  has  a  li`le  brother  with  Tay-­‐Sachs  disease  and  is  worried  she  may  carry  the  recessive  allele.  What  is  the  probability  of  this?    

•  Solu0on:  First,  no0ce  that  both  of  Judy’s  parents  must  be  Tt  if  her  li`le  brother  has  the  disease.  (We  assume  that  neither  parent  can  be  `  since  they  each  lived  to  adulthood.)  

1.  (12.1)  Condi0onal  Probability  

Page 6: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.1  (Tay-­‐Sachs  Disease)  

•  The  Punne`  square  gives  the  possible  genotypes  for  Judy  without  being  given  any  other  informa0on:              Since  Judy  does  not  have  the  disease,  we  

         eliminate  the  `  as  a  possibility.  Looking  at            the  Punne`  square,  we  intui0vely  guess  

that  the  probability  should  be  2/3  .  Let  us  show  this  is  true  using  the  defini0on  of  condi0onal  probability.  

•  Let  A  =  “Judy  is  Tt”  and  B  =  “Judy  is  not  `.  Then,  

1.  (12.1)  Condi0onal  Probability  

P AB( ) =P A∩ B( )P B( )

=Tt,tT{ } S

TT,Tt,tT{ } S=2 43 4

=23

Page 7: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.2  (Drug  Tes0ng)  

•  A  test  for  a  new  sleeping  pill  involved  200  individuals  where  100  of  the  individuals  were  given  the  sleeping  pill,  and  the  other  100  were  given  a  sugar  pill.  The  results  of  the  test  are  shown  in  the  following  table:                      What  is  the  probability  that  if  

                 you  take  the  sleeping  pill  you                    will  sleep  be`er?    

•  Solu0on:  Let  event  A  =  “took  sleeping  pill,”  and  event  B  =  “slept  be`er.”  We  want  to  find  the  probability  that  you  will  sleep  be`er  given  that  you  took  the  sleeping  pill,  i.e.  P(B|A).    

1.  (12.1)  Condi0onal  Probability  

P BA( ) =P B∩ A( )P A( )

=B∩ A SA S

=71 200100 200

= 0.71

Page 8: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.2  (Drug  Tes0ng)  

                   What  is  the  probability  that  if                    you  slept  be`er,  you  took                    the  sleeping  pill?  

•  Solu0on:  (This  is  the  converse  of  the  previous  ques0on.)  Let  event  A  =  “took  sleeping  pill,”  and  event  B  =  “slept  be`er.”  Now  we  want  to  find  P(A|B):    

1.  (12.1)  Condi0onal  Probability  

P AB( ) =P A∩ B( )P B( )

=A∩ B SB S

=71 200129 200

= 0.55

Page 9: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Some  More  Probability  Laws:  P(Ā|B)  

•  Let  A  &  B  be  events  in  S.  Then,  

•  The  deriva0on  is  straigheorward:  

1.  (12.1)  Condi0onal  Probability  

P A B( ) =1− P A B( )

P A B( ) =P A ∩ B( )

P B( )=

P B∩ A ( )P B( )

=P B( ) − P B∩ A( )

P B( )

=1−P A∩ B( )P B( )

=1− P AB( )

Note,  however,  that  this  does    not  work  for  the  other    posi0on.  That  is:  

P A B ( ) ≠1− P A B( )

Page 10: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Probability  Law:  P(A∩B)  

•  Let  A  &  B  be  events  in  S.  If  If  P(B)  ≠  0  then,  

 •  The  deriva0on  follows  immediately  from  the  defini0on  of  

condi0onal  probability:  

•  No0ce  that  since  set  intersec0on  is  commuta0ve  (that  is,  A∩B  =  B∩A),  we  automa0cally  get:  

1.  (12.1)  Condi0onal  Probability  

P A∩ B( ) = P AB( )P B( )

P AB( ) =P A∩ B( )P B( )

⇒ P A∩ B( ) = P AB( )P B( )

P A∩ B( ) = P B A( )P A( )

Page 11: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.3.a  (Beetle  Sampling  without  Replacement)  

We  have  a  popula0on  of  150  beetles.  Thirty  percent  have  wings  and  the  rest  are  wingless.  You  select  a  beetle  at  random  and  record  whether  or  not  it  has  wings,  and  do  not  put  it  back.  Then  you  select  another  beetle.    

What  is  the  probability  that  the  first  and  second  beetle  have  wings?    

Solu0on:  Let  event  A  =  “first  beetle  is  winged,”  and  event  B  =  “second  beetle  is  winged.”  First  we  note  that,  at  the  start,  there  are  0.3×150  =  45  winged  beetles.  Then:  

1.  (12.1)  Condi0onal  Probability  

P B∩ A( ) = P B A( )P A( )

=44149"

# $

%

& ' ⋅

45150"

# $

%

& ' ≈ 0.0886

Page 12: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Defini0on  

Suppose  the  probability  of  some  event  is  not  affected  by  the  occurrence  of  another  event.  It  seems  natural  in  such  a  case  to  consider  these  events  independent  of  one  another.  We  formalize  the  no0on:    We  say  events  A  and  B  are  independent  if  P(A|B)  =  P(A).  

No0ce  that,  formally,  if  we  swap  the  le`ers  A  &  B  in  the  defini0on,  we  get  P(B|A)  =  P(B).  We  should  verify  that  this  is  consistent  with  our  defini0on  for  condi0onal  probability:  Suppose  that  A  and  B  are  independent.  Then,  

2.  (12.2)  Independence  

P A( ) = P AB( )

=P A∩ B( )P B( )

P A( )P B( ) = P A∩ B( )

P B( ) =P B∩ A( )P A( )

= P B A( )We  want  to  take  special    note  of  this  rela0onship.  

Page 13: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Probability  Law  

•  Let  A  &  B  be  independent  events  in  S.  Then,  

 •  No0ce,  when  two  events  are  mutually  exclusive,  the  

probability  of  either/or  event  is  the  sum  of  the  probabili0es  of  each  event.  However,  when  two  events  are  independent,  the  probability  of  both  events  occurring  is  the  product  of  the  probabili0es  of  each  event:  

2.  (12.2)  Independence  

P A∩ B( ) = P A( )P B( )

P(A∪B)   P(A∩B)  

Mutually  exclusive   P(A)  +  P(B)  

Independent   ?   P(A)  P(B)  

Page 14: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Mutually  Exclusive  &  Independent?  

•  Recall  that  if  events  A  and  B  are  mutually  exclusive,  then  P(A∩B)  =  0.  So  if  P(B)  ≠  0,  then  by  the  defini0on  of  condi0onal  probability  we  have:  

 •  Now  we  ask,  can  events  A  and  B  be  both  independent  and  

mutually  exclusive?    •  Suppose,  they  were  then  P(A|B)  =  P(A)  and  P(A|B)  =  0,  and  

thus  P(A)  =  0.  Furthermore,  P(B|A)  =  P(B)  and  P(B|A)  =  0,  and  thus  P(B)  =  0.    

•  Therefore,  if  events  A  and  B  are  both  independent  and  mutually  exclusive,  then  P(A)  =  0  and  P(B)  =  0.  That  is,  events  that  are  both  mutually  exclusive  and  independent  are  only  events  with  zero  probability.  

2.  (12.2)  Independence  

P AB( ) =P A∩ B( )P B( )

= 0

Page 15: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.4  

Two  dice  are  tossed,  one  at  a  0me.  Let  A  =  “6  on  first  die”,  B  =  “sum  of  7”,  and  C  =  “sum  of  8”.  Which  events  are  independent?  Which  events  are  mutually  exclusive?    

Solu0on:    B&C:  Clearly,  B  and  C  are  mutually  exclusive  with  non-­‐zero  

probabili0es,  and  therefore  not  independent.    To  answer  the  ques0on  for  A&B  and  A&C,  we  need  the  following  

probabili0es:    There  are  six  possible  outcomes  on  a  die  and  only  one  way  to  roll  a  6.  Thus,  P(A)  =  1/6  .  In  rolling  two  dice,  there  are  6  ×  6  =  36  possible  outcomes.  There  are  six  ways  to  get  a  “sum  of  7”,  {(16),  (25),  (34),  (43),  (52),  (61)}.  Thus,  P(B)  =  6/36  =  1/6.  There  are  five  ways  to  get  a  “sum  of  8”,  {(26),  (35),  (44),  (53),  (62)}.  Thus,  P(C)  =  5/36.  Event  (A∩B)  can  only  occur  with  a  6  on  the  first  die  and  a  1  on  the  second  die.  Thus,  P(A∩B)  =  1/36.  Event  (A∩C)  can  only  occur  with  a  6  on  the  first  die  and  a  2  on  the  second  die.  Thus,  P(A∩C  )  =  1/36.  

2.  (12.2)  Independence  

Page 16: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.4  

And  we  have  the  following:    A&B:    

   Thus,  A&B  are  independent  (and  not  mutually  exclusive.)    A&C:    

   Thus,  A&C  are  not  independent  (and  not  mutually    exclusive.)  

2.  (12.2)  Independence  

P AB( ) =P A∩ B( )P B( )

=1 366 36

=16

= P A( )

P AC( ) =P A∩C( )P C( )

=1 365 36

=15≠ P A( )

Page 17: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

When  to  Assume  Independence?  

When  is  it  reasonable  to  assume  independence?  Some  examples  relevant  to  our  chapter:  

1.  Result  of  second  sample  is  independent  of  first  if  first  is  placed  back  into  sampling  pool.    

2.  Sex  of  second  child  is  independent  of  first  child.    3.  Random  selec0on  of  alleles  on  genes  located  on  separate  

chromosomes  (Mendel’s  Second  Law  of  Independent  Assortment).  

4.  The  genotypes  of  non-­‐related  individuals  are  independent  events.  

2.  (12.2)  Independence  

Page 18: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.5  (Beetle  Sampling  with  Replacement)  

Suppose  we  have  a  popula0on  of  150  beetles.  Forty-­‐five  of  the  beetles  have  wings  and  the  rest  are  wingless.  You  select  a  beetle  at  random  and  record  whether  or  not  it  has  wings,  and  then  put  it  back  amongst  the  other  beetles.  Then  you  select  another  beetle.  Let  events  A  =  “first  beetle  has  wings”  and  B  =  “second  beetle  has  wings”    

What  is  the  probability  that  (a)  the  first  and  second  beetle  have  wings?  and  (b)  the  first  beetle  has  wings  and  the  second  beetle  does  not  have  wings?  

Solu0on:  (a)  (b)  

2.  (12.2)  Independence  

P A∩ B( ) = P A( )P B( ) = 0.3× 0.3 = 0.09

P A∩ B ( ) = P A( )P B ( ) = 0.3× 0.7 = 0.21

Page 19: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.6  (Blood  Typing)  

Suppose  Jacob  has  O+  blood  with  genotype  OO/Rr,  and  Anna  has  B−  blood  with  genotype  BO/rr.  What  is  the  probability  that  a  child  of  Jacob  and  Anna  will  have  (a)  B+  blood,  and  (b)  O−  blood?  

Solu0on:  We  start  by  making  a  Punne`  square  for  each  gene:        Thus:  (a)  (b)    

2.  (12.2)  Independence  

P B +( ) = P B( )P +( ) = 0.5 × 0.5 = 0.25

P O−( ) = P O( )P −( ) = 0.5 × 0.5 = 0.25

Page 20: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.7  (Tay  Sachs  Disease)    

This  example  uses  both  condi0onal  probability  and  independence.  

Jack  and  Judy  each  had  brothers  afflicted  with  Tay-­‐Sachs  disease.  From  Example  12.1,  the  probability  of  being  a  carrier  if  your  sibling  has  Tay-­‐Sachs  disease  is  2/3.  What  is  the  probability  that  Jack  and  Judy  have  a  child  with  Tay-­‐Sachs  disease?    

Solu0on:  The  only  way  the  child  can  be  `  is  if  Jack  and  Judy  are  both  Tt.  Let  events  A  =  “Judy  is  Tt”,  B  =  “Jack  is  Tt”,  C  =  “child  is  `”.  Thus:  

2.  (12.2)  Independence  

P C∩ A∩ B( )( ) = P C A∩ B( )( )P A∩ B( )

= P C A∩ B( )( )P A( )P B( )

=14⋅23⋅23

=19

Page 21: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.8  (Family  Planning)  

Assume  the  births  of  boys  and  girls  are  equiprobable  and  independent.  Let  events  A  =  “first  child  is  a  girl,”  B  =  “second  child  is  a  girl,”  and  C  =  “third  child  is  a  girl.”  These  are  all  independent  events.  

(a)  What  is  the  probability  that  in  a  family  with  two  children,  the  children  are  both  girls?  

   (b)      What  is  the  probability  that  in  a  family  with  three  children,  

the  children  are  all  girls?  

2.  (12.2)  Independence  

P A∩ B( ) = P A( )P B( ) =12⋅12

=14

P A∩ B∩C( ) = P A( )P B( )P C( ) =12⋅12⋅12

=18

Page 22: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.8  (Family  Planning)  

(c)  What  is  the  probability  that  in  a  family  with  six  children,  the  children  are  all  the  same  sex?      The  probability  that  all  six  children  are  the  same  sex  equals  the  probability  they  are  all  boys  plus  the  probability  they  are  all  girls.  Let  events  A1,  A2,  .  .  .  ,  A6  be  the  events  that  the  first,  second,  .  .  .  ,  sixth  (respec0vely)  child  is  a  girl.  Then:  

   

2.  (12.2)  Independence  

P A1∩ A2∩∩ A6( ) = P A1( )P A2( )P A6( ) =12#

$ % &

' ( 6

=164

P A 1∩ A 2∩∩ A 6( ) = P A 1( )P A 2( )P A 6( ) =12#

$ % &

' ( 6

=164

P all same sex( ) =1

64+

164

=132

Page 23: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Example  12.8  (Family  Planning)  

(d)  What  is  the  probability  that  in  a  family  with  six  children,  there  is  at  least  one  girl?    Let  A  =  “at  least  one  girl”.  Then  Ā  =  “no  girls”,  i.e.  all  boys.  Then:  

2.  (12.2)  Independence  

P A( ) =1− P A ( ) =1− 164

=6364

≈ 0.9844

Page 24: 1. (12.1)(Condi0onal(Probability( 2. (12.2)(Independence( · Example(12.1((Tay]Sachs(Disease)(• Tay]Sachs(disease(is(aserious(disorder(of(the(nervous(system(thatusually(results(in(death(by(age(2(or(3.(Affected

Homework  

Chapter  12:  1ab,  2,  4,  5,  6,  7,  9    Some  answers: