# Second Midterm Exam

### Directions:

• Answer the problems on the exam pages.
• There are seven problems on pages 2-7, for 100 total points. Actual scale was A=87, C=57.
• If you need extra space use the back of a page.
• No books, notes, calculators, or collaboration.
• The first five questions are true/false, with five points for the correct boolean answer and up to five for a correct justification.
• Question 6 has numerical answers -- you may give your answer in the form of an expression using arithmetic operations, powers, falling powers, or the factorial function. If you give your answer using the "choose" notation, also give it using only operations on this list.

```  Q1: 10 points
Q2: 10 points
Q3: 10 points
Q4: 10 points
Q5: 10 points
Q6: 30 points
Q7: 20 points
Total: 100 points
```

• Question 1 (10): True or false with justification: A professor is making up a test with five true/false questions. He chooses whether to make each correct answer true or false independently and randomly, with equal probability for each. Let T be the number of "true" answers. Then Pr((T = 2) ∨ (T = 3)) < 3/4.

• Question 2 (10): True or false with justification: The random variable X has expected value 2, has variance 4, and always has X ≥ 0. Then the probability that X ≥ 6 must be at most 1/4.

• Question 3 (10): True or false with justification: Donuts come in four flavors, A, B, C, and D. I fill a box of 12 donuts by choosing the flavor of each uniformly and independently, so that the probability of each donut having a given flavor is 1/4. Then the probability that the box has 12 donuts of flavor A is 1/(12+4-1 choose 4-1).

• Question 4 (10): True or false with justification: The random variable Y takes one of the values in the set {2,3,4,5,6,7,8,9}, each with probability 1/8. Let A be the event that Y is odd, and B be the event that Y is prime. Then Pr(A|B) = Pr(B|A).

• Question 5 (10): True or false with justification: Let Z be the event that a five-card poker hand, chosen from a standard deck of 52 cards with 13 cards of each suit, has at least one card from each suit. Then Pr(Z) ≥ 1 - 4(39 choose 5)/(52 choose 5). (Hint: What is the probability that the hand has no spades?)

• Question 6 (30): A party of n guests arrive at a restaurant and each person gives a hat to the hat-check person. When they leave, the n hats are randomly given to the n guests, with each of the n! one-to-one assignments of hats to guests being equally likely. Let C be the random variable indicating how many people receive their own hat.

• (a,5) Let Hi be the probability that person i gets their own hat back. What is Pr(Hi)?

• (b,5) If i and j are two different numbers in {1,..., n}, are Hi and Hj independent events? Prove your answer.

• (d,5) Find the probability that C = n and the probability that C = n-1.

• (e,10) Regardless of your answer to (b), assume for the moment that the events H1,..., Hn are independent. Under this assumption, compute the probability that C = 0. Find the limit of this probability as n goes to infinity.

• Question 7 (20): James is a secret agent who has been assigned to defeat an enemy by winning \$1M (one million dollars) from him in a card game. Assume that the game consists of a series of independent hands, each of which is equally likely to be a win or a loss. James' plan is to bet \$1M on the first hand. If he wins, he will stop. Otherwise he will bet \$2M in the second hand. He will stop if he wins that hand, and otherwise bet \$4M on the third hand, \$8M on the fourth, and so on until he either wins (and stops with \$1M profit) or runs out of money. Let Gk be the random variable giving his net winnings if he has enough money to play at most k hands.
• (a,15) We can analyze the k-hand game by looking at the first hand. With probability 1/2, Gk = \$1M, and with probability 1/2, Gk = -\$1M + 2Gk-1. (This is because the second through k'th hands of the k-hand game are the same as a (k-1)-hand game with the stakes doubled.) Using this formula, prove by induction that for any k, E(Gk) = 0.
• (b,5) Using the result of (a) or otherwise, determine the probability of James winning or losing the k-hand game, and determine how much money he wins or loses.