sol13 - CS 70 Fall 2010 Discrete Mathematics and...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 70 Discrete Mathematics and Probability Theory Fall 2010 Tse/Wagner Soln 13 1. (25 pts.) Probabilistically Buying Probability Books Chuck will go shopping for probability books for K hours. Here, K is a random variable and is equally likely to be 1, 2, or 3. The number of books N that he buys is random and depends on how long he shops. We are told that Pr [ N = n | K = k ] = c k , for n = 1 ,..., k for some constant c . (a) Compute c . Answer: For any k , we know that probabilities conditioned on K = k must sum to 1, i.e n Pr [ N = n | K = k ] = 1 , so it must be that 1 = k n = 1 Pr [ N = n | K = k ] = k × c k = c . Thus, c = 1. (b) Find the joint distribution of K and N . Answer: The joint distribution specifies Pr [ N = n K = k ] for all n and k . Note that Pr [ N = n K = k ] = Pr [ N = n | K = k ] Pr [ K = k ] and we know Pr [ N = n | K = k ] and Pr [ K = k ] (it says all k ∈ { 1 , 2 , 3 } are equally likely). We use this formula to calculate Pr [ N = n K = k ] for each n , k and list the result in a table: n \ k 1 2 3 1 1 3 1 6 1 9 2 0 1 6 1 9 3 0 0 1 9 (c) Find the marginal distribution of N . Answer: The marginal distribution of N is given by the value of Pr [ N = n ] , for each possible value of n . By the total probability rule, Pr [ N = n ] = Pr [ N = n K = 1 ]+ Pr [ N = n K = 2 ]+ Pr [ N = n K = 3 ] . Thus, we get Pr [ N = n ] = 1 3 + 1 6 + 1 9 if n = 1 1 6 + 1 9 if n = 2 1 9 if n = 3 = 11 18 if n = 1 5 18 if n = 2 2 18 if n = 3 CS 70, Fall 2010, Soln 13 1
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
(d) Find the conditional distribution of K given that N = 1. Answer: By definition, Pr [ K = k | N = 1 ] = Pr [ K = k N = 1 ] Pr [ N = 1 ] . The numerator comes from the joint distribu- tion of N and K (part (b)), and the denominator comes from the marginal distribution of N (part (c)). Plugging in, we get Pr [ K = k | N = 1 ] = 1 3 11 18 if k = 1 1 6 11 18 if k = 2 1 9 11 18 if k = 3 = 6 11 if k = 1 3 11 if k = 2 2 11 if k = 3 (e) We are now told that he bought at least 1 but no more than 2 books. Find the conditional mean and variance of K , given this piece of information. Answer: We first compute the distribution Pr [ K = k | N = 1 N = 2 ] as we did in part (d): Pr [ K = k | N = 1 N = 2 ] = 1 3 16 18 if k = 1 1 6 + 1 6 16 18 if k = 2 1 9 + 1 9 16 18 if k = 3 = 3 8 if k = 1 3 8 if k = 2 2 8 if k = 3 Now, the mean will be E ( K | N = 1 N = 2 ) = 1 × 3 8 + 2 × 3 8 + 3 × 2 8 = 15 8 and the variance will be Var ( K | N = 1 N = 2 ) = E ( K 2 | N = 1 N = 2 ) - E ( K | N = 1 N = 2 ) 2 = 1 2 × 3 8 + 2 2 × 3 8 + 3 2 × 2 8 - 15 8 2 = 39 64 0 . 61 (f) The cost of each book is a random variable with mean 3. What is the expectation of his total expendi- ture? Hint: Condition on events N = 1 ,..., N = 3 and use the total expectation theorem. Answer: Let X be his total expenditure. Using the total expectation theorem, we have E ( X ) = E ( X | N = 1 ) Pr [ N = 1 ]+ E ( X | N = 2 ) Pr [ N = 2 ]+ E ( X | N = 3 ) Pr [ N = 3 ] Since each book has an expected price of 3, E ( X | N = n ) = 3 × n , giving E ( X ) = E ( X | N = 1 ) Pr [ N = 1 ]+ E ( X | N = 2 ) Pr [ N = 2 ]+ E ( X | N = 3 ) Pr [ N = 3 ] = 3 × 11 18 + 6 × 5 18 + 9 × 2 18 = 9 2 .
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern