STAT 134 - Instructor: Adam Lucas Midterm 1 SOLUTIONS Friday, Mar 5, 2020 Print your name: SID Number: Exam Information and Instructions: • You will have 55 minutes to take this exam. You have an additional 15 minutes to upload the solution to Gradescope. • The exam will be scored out of 50 points. Each question is worth 10 points. • Closed book/notes/etc. No calculator, computer, or collaborating. • To receive full credit, you must provide calculations or brief reasoning in every answer. • We will be using Gradescope to grade this exam. Write any work you want graded on the front of each page, in the space below each question. • Unless stated otherwise, you may leave answers as unsimplified numerical and al- gebraic expressions, and in terms of the Normal c.d.f. Φ. Finite sums are fine, but simplify any infinite sums. I certify that all materials in the enclosed exam are my own original work. Sign your name: GOOD LUCK! 1 SID: 1. Card game. Suppose a group of 26 students are playing a game with a standard deck of 52 cards. If each of them draw a card from the deck ... (a) ... without replacement, what is the probability that exactly 7 students get spades? (b) ... with replacement, what is the probability that at least 2 students get the Ace of spades, approximately? (Hint: You may leave e as is, but no calculators!) Answer. (a) This is hypergeometric with N = 52, n = 26, G = 13, g = 7, B = 39, b = 6, hence the answer is ( 13 7 )( 39 19 )( 52 26 ) . (b) Let X denotes the number of students who get the Ace of spades. Then X ∼ Binomial(26, 1/52), here the small p indicates that we should use Poisson approxi- mation with λ = 25/52 = 1/2. Therefore, P (X ≥ 2) = 1− (P (X = 0) + P (X = 1)) ≈ 1− e− 12 (1 + 1 2 ). 2 SID: 2. Antibodies. Suppose if you apply for Covid-19 vaccination, you have 1/6 chance of not getting a vaccine, 1/3 chance of getting Pfizer, 1/2 chance of getting Moderna. It is known that 80% of people who got Pfizer and 60% of people who get Moderna gets antibody for Covid-19. A person does not get antibodies if they do not take the vaccine. Given that one didn’t get antibody after the application, find the probability that the person did get vaccinated by either Pfizer or Moderna. Hint: LetA = {getting antibody}, B1 = {not getting vaccinated}, B2 = {getting Moderna} and B3 = {getting Pfizer}. Answer. The given conditions can be translated as P(B1) = 1/6,P(B2) = 1/2,P(B3) = 1/3,P(A|B2) = 3/5,P(A|B3) = 4/5. By Bayes rule, P(B2 ∪B3|Ac) = P(B2)P(A c|B2) + P(B3)P(Ac|B3) P(B1)P(Ac|B1) + P(B2)P(Ac|B2) + P(B3)P(Ac|B3) = 1/2 · 2/5 + 1/3 · 1/5 1/6 · 1 + 1/2 · 2/5 + 1/3 · 1/5 = 8/13 3 SID: 3. Candy. Suppose you buy a candy with 7 different flavors. You don’t know which taste it will be until you eat the candy. Let N be the number of candies you eat until you taste all 7 different flavors. Find E[N ]. (Hint: Don’t suffer finding P(N = n), try to express N as sum of random variables so that we know the distribution of them.) Answer. For i = 1, 2, . . . , 7, let Ai be the number of candies we need to eat until we eat exactly i different tastes. Then N = A7. Note that Ai − Ai−1 is number of candies we need to eat to find a new flavor (Assume A0 = 0.) Between Ai−1th candy and Ai − Ai−1th candy, we already tasted i flavors, so that for each candy, probability of eating new flavor is p = 7−i 7 . This means that Ai−Ai−1 ∼ geom ( 7−i 7 ) . Therefore, we have E[N ] = E[A7] = E[(A7 − A6) + (A6 − A5) + . . .+ (A1 − A0)] = E[A7 − A6] + E[A6 − A5] + . . .+ E[A1 − A0] = 7 1 + 7 2 + 7 3 + 7 4 + 7 5 + 7 6 + 7 7 . 4 SID: 4. A coffee problem. Each day, you brew a random number of cups of coffee, (0,1,2,3,4 cups etc), with a daily mean of three cups and a daily standard deviation of two cups. What (approximately) is the probability that you will brew between 270 and 330 cups of coffee over a 100–day period? State any assumptions you make. Answer. Assume that: the number of cups brewed each day are i.i.d. We are told in the problem already that the number of cups is discretely valued, taking values 0, 1, 2, . . . (this is important to specify because it determines the continuity correction). The total number N of cups brewed over a 100–day period is then a sum of 100 i.i.d. random variables with mean three and variance four, so E(N) = 300 and (by independence) V ar(N) = 400. The probability in question is P (270 ≤ N ≤ 330). The CLT justifies the approximation of this probability as P (270 ≤ N ≤ 330) = P ( 270− E(N)√ V ar(N) ≤ N − E(N)√ V ar(N) ≤ 330− E(N)√ V ar(N) ) ≈ Φ ( 330 + 0.5− E(N)√ V ar(N) ) − Φ ( 270− 0.5− E(N)√ V ar(N) ) where the continuity correction of ±0.5 arises from the fact that the total number of cups N is discrete and takes values in 0, 1, 2, . . . (although the correction makes little difference here, because V ar(N) is large). Plugging–in E(N) and V ar(N), we have P (270 ≤ N ≤ 330) ≈ Φ ( 330 + 0.5− 300√ 400 ) − Φ ( 270− 0.5− 300√ 400 ) ≈ 0.873. Note: without the continuity correction, the approximate answer is 0.866. 5 SID: 5. Poke´mon. McDonald’s is giving away a pack of 4 different Poke´mon cards with every Happy Meal. There are in total 25 unique Poke´mon cards which are being given away. Assume that any 4 of these cards are equally likely to show up in a given Happy Meal. Hint: Read this problem carefully. (a) Given that Pikachu is one of those 25 Poke´mons, find the chance that Pikachu appears in a Happy Meal. (b) If you purchase 10 Happy Meals, what is the expected number of unique cards you have collected? (c) If you purchase 10 Happy Meals, what is the variance of the number of unique cards you have collected? Answer. (a) Most simply there is a 1/25 chance that Pikachu is any of the 4 Poke´mon cards in the Happy meal. Alternativey, Pr(a meal contains Pikachu) = 1− Pr(the meal doesn’t Pikachu) = 1− ( 24 4 )( 25 4 ) = 4/25 (b) Let Ii be an indicator for the ith Poke´mon card appearing in one of the Happy Meals, where i ∈ {1, . . . , 25}. The number X of unique cards collected can be written as X = 25∑ i=1 Ii By linearity of expectation E[X] = 25∑ i=1 E[Ii] = 25E[I1] where the last equality holds by symmetry. We can compute E[I1] = 1− Pr(no meal contains card 1) = 1− [( 24 4 )( 25 4 )]10 Plugging this into the above, the desired expectation is E[X] = 25 1− [(244 )(25 4 )]10 Note: ( 24 4 ) / ( 25 4 ) = 1− (4/25) 6 SID: (c) Var(X) = E[X2]− E[X]2 it remains to calculate E[X2]. E[X2] = 25∑ i=1 E[I2i ] + 2 ∑ i
E[IiIj] = 25E[I1] + 2 ( 25 2 ) E[I1I2] By taking the complement, we can compute E[I1I2] = 1− P(no card 1 ∪ no card 2) = 1− {P(no card 1) + P(no card 2)− P(no card 1, no card 2)} = 1− 2 [( 24 4 )( 25 4 )]10 − [(234 )(25 4 )]10 Plugging everything in we get V ar(X) equals 25 1− [(244 )(25 4 )]10 + 2(25 2 )1− 2 [( 24 4 )( 25 4 )]10 − [(234 )(25 4 )]10 − 25 1− [(244 )(25 4 )]10 2 7 欢迎咨询51作业君