You are on page 1of 3

Laboratory

1. A fair coin is tossed repeatedly. Compute analytically the probability that the first success (success = heads) occurs on the fifth toss. Verify your answer with a computer simulation. In your code, define a variable as described in the note above, and include a plot of zi vs. i. (1! points). Sol. "hen tossin# a faic coin ! times, the probability of observe the first $head% on the fifth toss can be calcuated of the followin# way& 'et P(c k = a) the probability for the coin to obtain $a% in the k(th toss. As we assume the coin is fair, then the probability for every $a% side is e)ual to 1*+ (,ach possible value has the same posibility). -hen, the probability for havin# $heads% in a specific throw, is e)ual to P (c k =. head . ) =1 + , and the probability for not havin# a $head% in a coss is 1 P (c k =. head . ) = P (c k =. tail . ) =1 + . /efine Fn = k as the event of #et 0 $heads% on a series of n tosses, includin# the nth toss. "hat we want is the probability of have F! =1 , so&

P( F! = 1) = C P( F! ) =
1

1 2

P(c = . tail . ) P(c = . head . )


k ! k =1

++
k =1

1 1

1 = 2.231+! 3+

+. A fair coin is tossed repeatedly. Compute analytically the probability that the third success (success = heads) occurs on the fifth toss. Verify your answer with a computer simulation. In your code, define a variable as described in the note above, and include a plot of i vs. i. (1! points) Sol. -his e4ercise can be solved similarly to the above. If Fn = k is defined as the event of #et 0 $heads% on a series of n tosses, includin# the nth toss, then F! = 3 is the event of #ettin# three $heads% in five tosses, and that the third $head% is obtained in the fifth one, so&

P(F! = 3) = C+1 P(c k = .tail. ) P(c k = . head . ) P(c!= . head . )


k= 1 k= 3

1 11 3 P(F! = 3) = C = = 2.156! k = 1 + k = 1 + + 17
1 +

+ +

3. A fair coin is tossed repeatedly. Compute analytically the probability of three successes (success = heads) on five tosses. Verify your answer with a computer simulation. In your code, define a variable as described in the note above, and include a plot of zi vs. i. (1! points) Sol. -his e4ercise can be thou#ht in the followin# way& the probability of tossin# a coin n times, an obtain k $heads%. 8o, let Tn = k the event of #ettin# a total of k $heads% in a series of n tosses, then T! = 3 would represent the probability of #ettin# 3 $heads% in ! tosses&

P(T! = 3) = C

! 3 +

P(c = . tail . ) P(c = . head . )


k k k =1 k =3 !

1 1 ! P(T! = 3) = C 3! = = 2.31+! + + 17 k =1 k=3

You might also like