1. For a discrete random variable Y, prove that E[aY + b] = ae[y] + b and V(aY + b) = a 2 V(Y). Solution: E[aY + b] = E[aY] + E[b] = ae[y] + b where each step follows from a theorem on expected value from Chapter 3. V(aY + b) = E [((ay + b) E[aY + b]) 2 ] = E [(ay + b ae[y] b) 2 ] = E [a 2 (Y E[Y]) 2 ] = a 2 E [(Y E[Y]) 2 ] = a 2 V(Y) 2. (a) If Y is a random variable with moment generating function m(t), show that for a random variable W = ay + b, its moment generating function is m W (t) = e bt m(at). Solution: m W (t) = E[e t(ay+b) ] = E[e bt e (at)y ] = e bt E[e (at)y ] = e bt m Y (at) (b) Using the result in part (a), show the following: If Y is a binomial random variable with parameters n and p, and Y = n Y, then the moment generating function of Y is m (t) = (qe t + p) n where q = 1 p. Based on that moment generating function, what distribution does Y have? Explain why this makes sense. Solution: For a binomial random variable Y, m Y (t) = (pe t + q) n. Using part (a) with a = 1 and b = n gives m (t) = e nt m Y ( t) = e nt (pe t + q) n = (pe t e t + qe t ) n = (qe t + p) n which is the moment generating function for a binomial random variable with parameters q and n. This makes sense because Y is the number of failures in n trials where failure occurs with probability q. 3. A five card poker hand is being dealt one card at a time from a deck of 52 cards. If the first two cards dealt form a pair, what is the probability that the player eventually gets four-of-a-kind in their hand?
Solution: The number of ways to get three more cards from the fifty cards remaining in the deck is ( 5 ). 3 There are only 48 ways to get four-of-a-kind since you just have to pick which of the 48 other cards will fill out your hand. So, the probability of eventually getting four of a kind is 48 ( 5 = 48 3 ) 196 = 3 1225.244898 4. A weatherman is 9% accurate at predicting rain. That means that on days when it does rain, there is a 9% chance that the weatherman predicted rain on that day and on days when it doesn t rain, there is a ten percent chance that he predicted rain on that day. (a) In Waverly where it rains approximately 9 days per year, if the weatherman predicts rain, what is the probability that it will actually rain? Solution: Consider the events R: it rains, R: it doesn t rain and W: rain is predicted. The information in the problem is that P(W R) =.9 and P(W R) =.1. For Waverly, = 9/365. We are looking for P(R W) and will use Bayes Rule P(W R) P(R W) = P(W R) + P(W R)P( R).9(9/365) =.9(9/365) +.1(275/365) = 162 217.746544 (b) In San Diego, CA where it rains only 2 days per year, if the weatherman predicts rain, what is the probability that it will actually rain? Solution: As above, but using = 2/365 P(R W) =.9(2/365).9(2/365) +.1(345/365) = 12 35 =.3428571 (c) Compare your answers to parts (a) and (b). Solution: Although the accuracy is the same, due to the lack of rainy days in San Diego, the weatherman s predictions are much less useful than in Waverly since in San Diego, he is wrong 66% of the time!
5. Suppose that you have three programmers writing computer code for a project: Alice has designed 6% of the code, Barb 3% and Chuck 1%. Suppose further that Alice has a bug in 3% of her work, Barb in 7% of her work, and Chuck in 5% of his. What is the probability that the project contains a bug? Given that you found a bug, who is most likely to have been responsible? Solution: For a given line of code, consider the events A: Alice wrote it, B: Barb wrote it and C: Chuck wrote it. Then we know that P(A) =.6, P(B) =.3 and P(C) =.1. If R is the event that the line has a bug in it then P(R A) =.3, P(R B) =.7 and P(R C) =.5. Since A, B and C form a partition of the entire project, we can use the law of total probability = P(R A)P(A) + P(R B)P(B) + P(R C)P(C) =.6(.3) +.3(.7) +.1(.5) =.44 Given that R occurred, we can compute the probability that each person was responsible P(A R) P(A R) = P(B R) P(B R) = P(C R) P(C R) = = P(R A)P(A) = P(R B)P(B) = P(R C)P(C) so Barb is most likely to have been responsible. =.6(.3).44 =.3(.7).44 =.1(.5).44 =.49 =.4772 =.1136 6. (a) If A and B are events, prove that P(A) = P(A B) + P(A B). Solution: Since S = B B, A = A S = A (B B) = (A B) (A B) where the last equality is one of DeMorgan s laws. Because B B = and A B B and A B B then A B and A B are disjoint. Thus,. P(A) = P ((A B) (A B)) = P(A B) + P(A B) (b) Assuming further that B A, use the above to prove that P(B) P(A). Solution: If B A then A B = B so P(A) = P(B) + P(A B) and since P(A B) because of the second axiom of probability then P(A) P(B).
7. The percentage of couples where both people work is 52.1%. In a randomly selected sample of 1 couples, what is the probability that at least half of those couples have both people working. Solution: For a binomial random variable X with n = 1 and p =.521, P(X 5) = 1 P(X 4) 1.3265 =.6735. 8. Consider the following data from a classic work of statistics. Ladislaus von Bortkiewicz collected data on how many Prussian cavalry soldiers were fatally kicked by horses in 2 cavalry troops over 1 years. For the 2 observations, he recorded how many people had died in that troop in that year. His observations can be summarized in the following table Number of Deaths Occurrences 19 1 65 2 22 3 3 4 1 (a) Find the average number of people who died from horse kicks in a year in one troop of the Prussian cavalry. Solution: X = (19) + 1(65) + 2(22) + 3(3) + 4(1) 19 + 65 + 22 + 3 + 1 = 61 1 (b) Using this average as the parameter of a Poisson random variable, find the theoretical proportion of years that should have y deaths for y =, 1, 2, 3and4. Solution: p() = λ e λ! p(1) = (.61)1 e.61 1! p(2) = (.61)2 e.61 2! p(3) = (.61)3 e.61 3! p(4) = (.61)4 e.61 4! = e.61.5434.3314.111.26.31
(c) Does the Poisson distribution fit the observed data well? Solution: Yes. Consider the following table where the expected number of deaths is just 2p(j). The expected and observed numbers are close in every case. j Observed Expected 19 18.7 1 65 66.3 2 22 2.2 3 3 4.1 4 1.63 9. The response times for an online mortgage quote have a gamma distribution with mean four seconds and variance eight seconds 2. Give the probability distribution for the response time and using Tchebysheff s theorem, find an interval that contains at least 9% of the response times. Solution: The gamma distribution has µ = αβ and σ = αβ 2 so setting αβ = 4 and αβ 2 = 8 and solving gives α = 2, β = 2 which gives a probability density function of f (y) = yα 1 e y/β β α Γ(α) = y2 1 e y/2 2 2 Γ(2) = ye y/2 4 for positive values of y and f (y) = otherwise. Note that Γ(2) = (2 1)! = 1. Using Tchebysheff s theorem, with 1 1/k 2 =.9 k = 1 gives P(4 1 8 Y 4 + 1 8).9 but since we know that P(Y ) =, we can say that P( Y 12.94).9 1. The Kumaraswamy distribution, like the beta distribution, is supported on the interval [, 1]. The probability density function is abx f (x) = a 1 (1 x a ) b 1 x 1 otherw ise By integrating the PDF, find the cumulative distribution function. (Hint: try u = x a.)
Solution: F(x) = = = x x x a f (t) dt abt a 1 (1 t a ) b 1 dt b(1 u) b 1 du where u = t a = (1 u) b x a = (1 x a ) ( 1) = 1 (1 x a ) 11. The scores on each component of the SAT are scaled so that they have a normal distribution with µ = 5 and σ = 1. Find the probability of scoring over 75 on one component of the SAT. Solution: By standardizing, P(Y > 75) = P (Z > 75 5 ) = P(Z > 2.5).6297 1 12. Suppose Alice flips three fair coins and let X be the number of heads showing. Suppose Barbara flips five fair coins and let Y be the number of heads showing. If Z = X Y, find P(Z = z) for all possible values of z. Solution: Both X and Y have binomial distributions with p =.5 and n = 3 and n = 5 respectively. Form a grid 1 2 3 1/256 3/256 3/256 1/256 1 5/256 15/256 15/256 5/256 2 5/128 15/128 15/128 5/128 3 5/128 15/128 15/128 5/128 4 5/256 15/256 15/256 5/256 5 1/256 3/256 3/256 1/256 where the (i, j) cell gives P(Y = i, X = j) = p Y (i)p X (j). Then, we can sum along the diagonals to get the probabilities for each value of Z. For example, P(Z = ) = P(X =, Y = ) + P(X = 1, Y = 1) + P(X = 2, Y = 2) + P(x = 3, Y = 3) = 1/256 + 15/256 + 15/128 + 5/128 = 56/256. Doing this for all of the diagonals gives
z -5-4 -3-2 -1 1 2 3 p(z) 1/256 8/256 28/256 56/256 7/256 56/256 28/256 8/256 1/256 and just to check p(z) = 1 + 8 + 28 + 56 + 7 + 56 + 28 + 8 + 1 256 = 256 256 = 1