Mathematics for Computer Science

(avery) #1

19.7. Really Great Expectations 831



  1. Given that the first two lines of code selected in therandom sampleare the
    same kind of statement—they might both be assignment statements, or both
    be conditional statements, or both loop statements,... —the probability that
    the first line is buggy may be greater thanb.

  2. There is zero probability that all the lines in therandom samplewill be dif-
    ferent.


Problem 19.26.
LetG 1 ;G 2 ;G 3 ;:::;be an infinite sequence of pairwise independent random vari-
ables with the same expectation,, and the same finite variance. Let


f.n;/WWDPr

ˇˇ


ˇˇ


Pn
iD 1 Gi
n




ˇ


ˇ


ˇˇ





:


The Weak Law of Large Numbers can be expressed as a logical formula of the
form:
8  > 0Q 1 Q 2 ::: Œf.n;/ 1 ıç


whereQ 1 Q 2 :::is a sequence of quantifiers from among:


8 n 9 n 8 n 0 9 n 0 8 nn 0 9 nn 0
8 ı > 0 9 ı > 0 8 ı 0 9 ı 0

Here thenandn 0 range over nonnegative integers, andıandrange over real
numbers.
Write out the proper sequenceQ 1 Q 2 :::


Problems for Section 19.6


Practice Problems


Problem 19.27.
A gambler plays 120 hands of draw poker, 60 hands of black jack, and 20 hands of
stud poker per day. He wins a hand of draw poker with probability 1/6, a hand of
black jack with probability 1/2, and a hand of stud poker with probability 1/5.


(a)What is the expected number of hands the gambler wins in a day?
Free download pdf