Midterm 1 - Math 5010 - Spring 2016 Name: Firas Rassoul-Agha Solve the following 4 problems. You have to clearly explain your solution. The answer carries no points. Only the work does. CALCULATORS ARE NOT ALLOWED. Problem 1: A fair coin is tossed. If it comes up heads the number 1 is recorded. However, if it comes up tails then a die is rolled and its outcome is recorded. (a) Let X be the number we record. What is its mass function? (b) Given we recorded a 2, what is the probability the coin landed heads? (c) Given we recorded a 1, what is the probability the coin landed heads? (a) X takes the values 1 through 6. It takes the value 1 if the coin comes up heads or if it comes up tails and the die rolls a 1. This has probability 1/2 + 1/2 × 1/6. It takes the value 2 only if the coin comes up tails and the die rolls a 2. This has probability 1/2 × 1/6. The same happens for the values 3 through 6: each of them is taken with probability 1/2 × 1/6. (b) If we know a 2 was recorded then we know the die must have been rolled and the coin came up tails. So the probability of heads given we recorded a 2 is zero. (c) Let A be the event that the coin landed heads and B the event that . we recorded a 1. We want to compute P (A | B) = P P(A∩B) (B) A ∩ B is the event that the coin landed heads and we recorded a 1. But if the coin lands heads we will record a 1. So recording a 1 is a redundant information. In other words, A ⊂ B. Therefore, A ∩ B = A. We know P (A) = 1/2, thus P (A ∩ B) = 1/2. As to P (B), this is the probability of recording a 1 which we already computed in part (a) to be 1/2 + 1/2 × 1/6 = 7/12. In summary, P (A | B) = 1/2 6 P (A ∩ B) = = . P (B) 7/12 7 1 Problem 2: Let F be the function 0 x2 +1 8 x F (x) = 3 1 x + 31 6 1 defined by: if if if if if x < 0, 0 ≤ x < 1, 1 < x < 2, 2 ≤ x < 4, x ≥ 4. (a) What value should F have at x = 1 for it to have a chance at being a cumulative distribution function? (b) Verify that with your answer to (a), F is indeed a cumulative distribution function. (c) Let X be a random variable which corresponds to F . Is X discrete or continuous? (d) Compute P {X = 0} and P {X = 21 }. (e) Compute P {X < 1}. (f) Compute P {X = 1 or 1 2 ≤ X < 32 }. (g) Compute P {0 ≤ X ≤ 2}. (a) F needs to be right-continuous. So to get its value at 1 we take a limit of F (x) as x converges to 1 from the right. This means we plug x = 1 into x/3 and get that F (1) = 1/3. (b) The functions making up the different parts of F are all nondecreasing. F has two jumps: at 0 it goes from 0 to an 1/8 and at 1 it goes from 1/4 to 1/3. In both cases it goes up. Hence, F itself is nondecreasing. With our choice of F (1) we made F right-continuous at 1. It is also right-continuous at 0 since F (0) is the limit of F (x) as x → 0 from the right. Other than at 0 and at 1 function F is continuous. Hence, F is right-continuous. Since for x < 0 we have F (x) = 0 and for x > 4 we have F (x) = 1 we do have that limx→−∞ F (x) = 0 and limx→∞ F (x) = 1. These are the requirements needed for a CDF. (c) Since F is not piecewise constant, it is not the CDF of a discrete random variable. Since F has jumps it is not the CDF of a continuous random variable either. 2 Extra Page (d) P {X = 0} is the size of the jump at 0 which is 1/8 − 0 = 1/8. Similarly, P {X = 1/2} is the size of the jump at 1/2. Since the function is continuous at 1/2 this probability is zero. (e) P {X < 1} = P {X ≤ 1} − P {X = 1}. Now P {X ≤ 1} = F (1) = 1/3 (from part (a)). On the other hand, P {X = 1} is the size of the jump at 1 which is 1/3 − 1/4. Hence, P {X < 1} = 1/4. In other words, to compute P {X < a} we take the limit of F (x) from the left at x = a. (f) X = 1 implies 1/2 ≤ X < 3/2. So their union is the bigger event 1/2 ≤ X < 3/2. In other words, the probability in question equals P {1/2 ≤ X < 3/2}. In turn, we have P {1/2 ≤ X < 3/2} = P {X < 3/2} − P {X < 1/2} = (P {X ≤ 3/2} − P {X = 3/2}) − (P {X ≤ 1/2} − P {X = 1/2}). Again, we now use P {X ≤ a} = F (a) and P {X = a} is the jump at a to compute the above probabilities and get P {1/2 ≤ X < 3/2} = P {X < 3/2}−P {X < 1/2} = (1/2)2 + 1 −0 − −0 . 3 8 3/2 (g) Using P {X ≤ 0} = F (0) and P {X = 0} from (d) we get P {0 ≤ X ≤ 2} = P {X ≤ 2} − P {X < 0} = P {X ≤ 2} − (P {X ≤ 0} − P {X = 0}) 2 2 = − (1/8 − 1/8) = . 3 3 Problem 3: Consider a random variable X with probability density function f (x) = 12 e−|x| . Calculate the probability that X 2 > 2X. First note that X 2 > 2X is equivalent to X(X − 2) > 0 which happens only when both factors are of the same sign. This happens exactly when “X > 2 or X < 0”. The probability of this is then equal to Z ∞ Z 0 f (x) dx + f (x) dx. −∞ 2 On the second integral we have |x| and thus Z ∞ Z 1 ∞ −x e−2 f (x) dx = e dx = . 2 2 2 2 For the first integral we have x < 0 and so |x| = −x. The integral is then Z 0 Z 1 0 x 1 f (x) dx = e dx = . 2 −∞ 2 −∞ The probability in question is thus equal to 1/2 + e−2 /2. Alternatively, one could compute the probability as one minus the probability of 0 ≤ X ≤ 2 which equals Z Z 2 1 1 2 −x e dx = 1 − (1 − e−2 ). 1− f (x) dx = 1 − 2 0 2 0 3 Problem 4: A store has 10,000 table tennis balls in a big box, 6000 of which are white and 4000 are orange. You pull 30 of the balls from the box at random. We want to estimate the probability you will have at least half the balls white. (a) Of course, the balls are pulled without replacement. Write a formula for the probability you have 15 or fewer orange balls. I expect your answer to be a long sum and I do not expect that you will be able to give a final number. (b) Write a formula for the probability of getting 15 of fewer orange balls, if instead the balls are chosen with replacement. This is an estimate of your answer to (a), since 10,000 balls is so large that things do not really change much when we take out 30 balls. I again expect a long sum but still not a final number. (c) If X is the random variable that indicates the number of orange balls among the 30 chosen with replacement, then what is the distribution of X? Is it a Bernoulli, Binomial, Geometric, Poisson, Uniform, Exponential, Cauchy, Normal, or none of these? (d) Use the central limit theorem to approximate your answer to (b) (which in turn would approximate your answer to (a)). Now, I expect a num√ ber. (You can use the attached normal table and that 3/ 7.2 is about 1.12.) (a) The probability in question is the sum of the probabilities of getting exactly 0 orange balls, exactly one orange ball, . . . , exactly 15 orange balls. To get exactly k orange balls without replacement we need to pick k of the 4, 000 orange balls and 30 − k of the 6, 000 white ones. The number of ways 6000 to do this is 4000 . The total number of ways to pick 30 balls out of k 30−k 10,000 10, 000 is 30 . So 6000 the probability of picking exactly k orange balls equals 4000 10,000 / . The probability in question then equals k 30−k 30 15 X k=0 4000 6000 k 30−k 10,000 30 4 . Extra Page (b) Again, the probability in question is the sum of the probabilities of getting exactly 0 orange balls, exactly one orange ball, . . . , exactly 15 orange balls. Since we now are picking with replacement, the probability of a given ball to be orange is 0.4 and the probability of it being white is 0.6. There are 30 ways to pick which of the 30 balls will be the k orange ones. Therefore, k 30 k the probability of picking exactly k orange balls equals k (0.4) (0.6)30−k . The probability in question then equals 15 X 30 (0.4)k (0.6)30−k . k k=0 (c) If we consider getting an orange ball a success then X is a Binomial random variable with parameters 30 (number of trials) and 0.4 (probability of success). (d) A Binomial random variable can be approximated by a Normal ranp dom variable with parameters µ = np and σ = np(1 − p). In other words, if compute 30 × 0.4 = 12 and 30 × 0.4 × 0.6 = 7.2 and rewrite X − 12 15 − 12 √ ≤ √ 7.2 7.2 √ then we can pretend (X − 12)/ 7.2 is a standard Normal and this will approximate the above probability for us. Hence, √ P (X ≤ 15) ≈ Φ(3/ 7.2) ≈ Φ(1.12) ≈ 0.8686. P (X ≤ 15) = P