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

Info iconThis 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 ] = X k k · Pr( X = k | A ) If the sample space is a disjoint union of events A 1 , ..., A n prove that: E [ X ] = 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
Background image of page 1

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

View Full DocumentRight Arrow Icon
in St. Petersburg) until it comes up heads. The gambler receives 1 ruble if the coin shows
Background 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

This homework help was uploaded on 01/29/2008 for the course COS 340 taught by Professor Charikarandchazelle during the Fall '07 term at Princeton.

Page1 / 2

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online