Name: CSE 312 Midterm Exam May 7, 2014 Instructions: You have 50 minutes to complete the exam. Feel free to ask for clarification if something is unclear. Please do not turn the page until you are instructed to do so. You can use 1 pages of notes during the exam. Do NOT simplify any of your answers. You do not need to reprove anything that is in the text or anything that was stated on the slides (e.g. the formula for expectation of a geometric distribution). The last 2 pages of the exam are extra credit problems. (There are two extra credit problems in total.) You do not need to do any of them to get a perfect score on the test or a 4.0 in the class (the latter assumes of course that you do well on all your other work). You shouldn t work on extra credit problems until you are satisfied with what you ve done on the regular problems. If you hit a problem you are finding difficult, I recommend moving on to other problems and then coming back. Good luck! 1
1 /40 2 /30 3 /20 4 /25 5 /25 total /140 Extra Credit Total (out of 30): 1. (40 points total) Short answer, 5 points each. No explanations needed or wanted. (a) If random variable X has expected value 3 and variance 2, what is E(X 2 )? (b) How many ways are there to rearrange the letters in the word banana? (c) A certain department offers 8 different lower-level courses, and 10 different higher level courses. A valid curriculum consists of 5 lower level courses and 3 higher level courses. What is the probability that a random selection of 8 courses is valid? 2
(d) What is the coefficient of x 3 in (4x 8) 8? (e) What is the minimum number of people for which, no matter when they were born, we are guaranteed that at least 3 of them were born in the same month? (f) What is the probability that a 6 card hand (randomly selected out of the 52 cards in a standard deck) contains two sets of 3-of-a-kind? (For example, three aces and three 9 s.) (Note the unusual, for this class, number of cards in the hand.) (g) How many different ways are there to select 3 dozen colored roses if red, yellow, pink, white, purple and orange roses are available? (h) Two identical 52-card decks are mixed together. How many distinct permutations of the 104 cards are there? 3
2. (30 points total) We flip a biased coin with probability p of getting heads until we either get heads or we flip the coin three times. Thus, the possible outcomes of this random experiment are <H>,<T,H>,<T,T,H>and <T,T,T >. (a) (8 points) What is the probability mass function of X, where X is the number of heads. (Notice that X is 1 for the first three outcomes, and 0 in the last outcome.) (b) (4 points) What is the probability that the coin is flipped more than once? (c) (8 points) Are the events there is a second flip and it is heads and there is a third flip and it is heads independent? Justify your answer. (d) (10 points) Given that we flipped more than once and ended up with heads, what is the probability that we got heads on the second flip? (No need to simplify your answer.) 4
3. (20 points) The NSA wishes to assess the chances that a particular individual (in a population of interest ) is a terrorist (event T ) conditioned on the fact that they have associated with a known terrorist (event A). 1 Suppose that the overall fraction of terrorists in the population of interest is 0.1. Suppose also that the probability that a person associates with terrorists given that they are a terrorist is 0.5, and the probability that a person associates with terrorists given that they are not a terrorist is 0.01. What is the probability a person is a terrorist conditioned on the fact that they have associated with a known terrorist i.e., Pr(T A)? Do not simplify your answer. 1 For the NSA, you are considered to have associated with a person if you have had a phone conversation with someone who has had a phone conversation with that person. 5
4. (25 points) You are considering three investments. Investment A yields a return which is X dollars where X is Poisson with parameter 2. Investment B yields a return of Y dollars where Y is Geometric with parameter 1/2. Investment C yields a return of Z dollars which is Binomial with parameters n =20andp =0.1. The returns of the three investments are independent. (a) (12 points) Suppose you invest simultaneously in all three of these possible investments. What is the expected value and the variance of your total return? (b) (13 points) Suppose instead that you choose uniformly at random from among the 3 investments (i.e., you choose each one with probability 1/3). Use the law of total probability to write an expression for the probability that the return is 10 dollars. Your final expression should contain numbers only. No need to simplify your answer. 6
5. (25 points) Consider 101 people, and suppose that each pair of them are friends independently with probability 0.02. (a) (5 points) What is the expected number of friends each person has? (b) (5 points) What is the probability that a particular person has 30 friends? (c) (15 points) What is the expected number of people with exactly 5 friends? 7
6. Extra Credit: (10 points) Prove that n2 n 1 = n ( ) n k. k k=1 You may give either an algebraic proof or a combinatorial proof. (Recall that a combinatorial proof is an argument that shows that both sides of the equation are counting the number of elements in the same set, by giving two different ways to count the number of elements in the set.) 8
7. Extra Credit: (20 points) Consider a set of n distinct numbers presented to you one by one in a random order. (You don t have any prior knowledge of what the numbers are.) As each number is presented, you have the choice of whether to pick it or not, and you can only pick one number. If you pick the highest number, you will win a prize of a million dollars. Suppose you use the following strategy: You wait until you have seen r numbers, and then take the first number after that that is the highest seen so far. (So for example, if n =6andr =3,andthenumbersarriveintheorder 5, 3, 1, 4, 6, 8, you will take the number 6 and you won t win the prize. If the numbers arrive in the order 5, 3, 8, 1, 6, you won t take any number and won t win. Finally, if the numbers arrive in the order 5, 3, 1, 4, 8, 6, then you will take the 8 and win.) What is the probability that you win using this strategy? (Hint: use the law of total probability, conditioning on the location of the maximum.) 9