Mathematics for Computer Science

(avery) #1

Chapter 18 Random Variables788


a fair,n-sided die to get a number from 1 ton, then flips a fair coin. If the coin is
heads, he bakesmloaves of bread , wheremis the number on the die that day, and
if the coin is tails, he bakes2mloaves.


(a)For any positive integerk2n, what is the probability that Peeta will makek
loaves of bread on any given day? (Hint: you can express your solution by cases.)


(b)What is the expected number of loaves that Peeta would bake on any given
day?


(c)Continuing this process, Peeta bakes bread every day for 30 days. What is the
expected total number of loaves that Peeta would bake?


Exam Problems


Problem 18.32.
A box initially containsnballs, all colored black. A ball is drawn from the box at
random.


 If the drawn ball is black, then a biased coin with probability,p > 0, of
coming up heads is flipped. If the coin comes up heads, a white ball is put
into the box; otherwise the black ball is returned to the box.

 If the drawn ball is white, then it is returned to the box.

This process is repeated until the box containsnwhite balls.
LetDbe the number of balls drawn until the process ends with the box full of
white balls. Prove that ExŒDçDnHn=p, whereHnis thenth Harmonic number.
Hint:LetDibe the number of draws after theith white ball until the draw when
the.iC1/st white ball is put into the box.

Free download pdf