precept3 - heads the first time 2 rubles if it shows the...

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

View Full Document Right Arrow Icon
Computer Science 340 Reasoning About Computation Precept 3 Problem 1 a) Prove that if X 1 and X 2 are independent random variables then E [ X 1 · X 2 ] = E [ X 1 ] E [ X 2 ]. b) Does E [ X 1 · X 2 ] = E [ X 1 ] E [ X 2 ] imply that X 1 and X 2 are independent random vari- ables? Problem 2 Suppose you write the following C code to compute the maximum number stored in an array of size n : max = a[0]; for (int i = 1; i < n; i++) { if (max < a[i]) { max = a[i]; } } Assume that the array a is a permutation of the integers { 1 , 2 , . . . , n } and each per- mutation is equally likely. What is the expected number of times the line max = a[i]; is executed? Problem 3 We define conditional expectation E [ X | A ], of a random variable X , given A , to be: E [ X | A ] = k k · Pr( X = k | A ) If the sample space is a disjoint union of events A 1 , ..., A n prove that: E [ X ] = i E [ X | A i ] · Pr( A i ) Problem 4 The St. Petersburg Casino offers the following game: the gambler bets a fixed wager, and then the dealer flips a fair coin (dealers do not flip coins in US casinos, but they do
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: heads the first time, 2 rubles if it shows the first head at second toss, and in general 2 k-1 if the dealer tosses the coin k times to get the first head. 1. Suppose the fixed wager is 10 rubles. What is the expected amount of money that the gambler will win in this game? Suppose the fixed wager is 10,000 rubles? 2. What is the probability that the gambler does not lose money in a game when the fixed wager is 10 , 000 rubles ? 3. In reality, it would not be reasonable for the gambler to play the game with the fixed wager at 10 , 000 rubles. Why? (Hint: Suppose the casino has a limit of a billion rubles.) Problem 5 If the random variable X takes values in non-negative integers, prove that: E [ X ] = ∞ X t =0 Pr( X > t )...
View Full 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