Due Thursday, September 28 at 11:59 PM via Canvas. PDF format required.

1. (1 points) Exercise 2.1, part b. That is, prove using the axioms of probability that if for measureable events α and β we have α ⊆ β, then P(α) ≤ P(β).

2. (1 points) The Chicago Bulls are playing a game tonight, but a star player Dwanye Wade has a mild ankle sprain and may or may not play. Wade has a 50 percent chance of being able to play, the Bulls have a 50 percent chance of winning overall, and the probability that Wade plays *and* the Bulls win is 40%. Write out the conditional probability table P(Bulls Win | Wade Plays).

3. (1 points) Prove the Contraction property:
(X _|_ W | Z, Y) and (X _|_ Y | Z) => (X _|_ Y, W | Z)

Note: you may use the decomposition or weak union properties in your proof, if you like.

4. 

a. (1 point) Before reading the rest of this exercise: quickly type out a
random sequence of 50 coin flips, using your own brain as a random
generator (that is, don't use a coin, computer or other
device, just mentally pick a sequence of Hs and Ts, trying to be as random 
as possible).

b. (2 points) Now, write a computer program to generate a sequence of random coin flips,
where both heads and tails are equally probable. Include your code and
a output sequence of 300 flips as a single string (see part (c) below).

c. (1 point) Consider the following string of 300 coin flips:
TTHTHTHHTTHTTHTHTHHHTHTHTHTHTTTHTTTTHTTHHHTTTHTHTTTHTHHHTHTTHHHHHHHTHTTTTH

HHHTHHTHTHHTTHHTTHTTTTHTTHTHHTHHHTHHTHHTHTTTHTHHTHTHTTHTHHTHHTTHTHTHTTHHH

THTHTHTHTHTHTHHHTHHTTTHTHHHTHHHTTTHHTTHTTHTHTTHTHHTHTHHHHTTHHTHTTHTHHTHHT

HTHTTHTHHTTTHTTHTTHTHHTTTHTHHTTHHHTHHTHTTHHTTTTHTHHHTHTTHTTTTTHTHHTTHHTHTH

HTHTHT

Before you move on to part (d), in one or two sentences describe important differences you see, if any, between your sequence of flips in part (b) and the one above.

d. (0.5 point) Your sequence from part (b) will surely have multiple different "runs" of the same letter, of varying length. For example, the sequence "HHHTHTT" has one run of length 3, one of length 2, and two of length one. Count in your sequence the number of runs of length i for i={1, 2, 3, 4, 5 or more}. For example, the answer for the sequence in part (c) is [116, 47, 18, 6, 2]. What important differences exist between the counts for your sequence in part (b) and those for the sequence in part (c)?

e. (2.5 points) Assume the sequence in part (c) was generated by the following process: first, a fair coin generates the first flip. Thereafter, each flip i is the same as the previous flip with probability gamma, and is otherwise the opposite. NOTE: the gamma parameter has a very different role in generating a sequence of flips than does the theta parameter from the lecture notes, so be aware.
(i) Is there a setting of gamma that corresponds to using a fair coin for the entire sequence?
(ii) What is the maximum likelihood estimate of gamma for the sequence in part (c)?
(iii) Assume the gamma parameter was chosen for the sequence in part (c) from a prior that only takes positive values for gamma=0.6, or gamma=0.4. Specifically, P(gamma=0.6)=0.99, and P(gamma=0.4)=0.01. What's the MAP estimate of gamma given the sequence in part (c) and the prior?
(iv) Assume the gamma parameter is Beta(20,10) distributed. What is the MAP estimate for gamma given the sequence in part (c) and this prior knowledge?
(v) Now the fun part. One might hypothesize that a person's mental randomness is less like a fair coin than it is like the process described above, with a gamma value slightly lower than 0.5. What does this hypothesis mean, in a single sentence of plain english?
(vi) To test the above hypothesis, compute the likelihood of your sequence from part (a) under the process with gamma=0.45. Is this higher or lower than that of a fair coin (i.e. (1/2)^50)? Do your results support or contradict the hypothesis?