This preview shows pages 1–13. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 11COMP170Discrete Mathematical Toolsfor Computer ScienceMore on“time until first success”Version 2.0: Last updated, May 13, 200721Example 122Example 1Throw a fair die until you see a1.23Example 1Throw a fair die until you see a1.Then throw it until you see a2.24Example 1Throw a fair die until you see a1.Then throw it until you see a2.Continue until you see all of3,4,5,6, in that order.25Example 1Throw a fair die until you see a1.How many times, on average, do you throw the die?Then throw it until you see a2.Continue until you see all of3,4,5,6, in that order.26Example 1Throw a fair die until you see a1.SetX1= # of throws until you see1.Fori >1 :Xi= # of throws, starting from when you seei1for the first time, until you seeifor the first time.How many times, on average, do you throw the die?Then throw it until you see a2.Continue until you see all of3,4,5,6, in that order.27Example 1Throw a fair die until you see a1.SetX1= # of throws until you see1.Fori >1 :Xi= # of throws, starting from when you seei1for the first time, until you seeifor the first time.How many times, on average, do you throw the die?Then throw it until you see a2.Continue until you see all of3,4,5,6, in that order.2 51{z}3 1 42{z}6 5 4 43{z}1 34{z}6 4 1 25{z}1 4 36{z}X1= 3X2= 4X3= 5X4= 3X5= 5X6= 431X=X1+X2+...+X6.Total number of throws is2 51{z}3 1 42{z}6 5 4 43{z}1 34{z}6 4 1 25{z}1 4 36{z}X1= 3X2= 4X3= 5X4= 3X5= 5X6= 432X=X1+X2+...+X6.Total number of throws is2 51{z}3 1 42{z}6 5 4 43{z}1 34{z}6 4 1 25{z}1 4 36{z}X1= 3X2= 4X3= 5X4= 3X5= 5X6= 4X= 1933X=X1+X2+...+X6.Total number of throws isXiis a geometric random variable withp= 1/6,⇒E(Xi) =1p= 6.2 51{z}3 1 42{z}6 5 4 43{z}1 34{z}6 4 1 25{z}1 4 36{z}X1= 3X2= 4X3= 5X4= 3X5= 5X6= 4X= 1934X=X1+X2+...+X6.Total number of throws isE(X) =E(X1) +E(X2) +...+E(X6) = 6·6 = 36....
View
Full
Document
 Spring '10
 M.J.Golin
 Computer Science

Click to edit the document details