160a06_mdrev_sol

# 160a06_mdrev_sol - X 1 and X 2 ? Both X 1 and X 2 are...

This preview shows page 1. Sign up to view the full content.

Pstat160a Winter 2006 Midterm Review Problem 1. (30 points) In this problem, we want to simulate the random variable with pdf given by p X (0) = . 2 , p X (1) = . 4 , p X (2) = . 3 , p X (3) = . 1 1) Recall that the inverse transformation method was the basic algorithm we saw in class. Describe it in the context of this example. Let F ( i ) = i j =0 p X ( j ). Generate U uniform (0 , 1). Set X = i for i such that F ( i - 1) < U F ( i ) (can set F ( - 1) = 0). In this problem, set X as X = 0 if U . 2 X = 1 if . 2 < U . 6 X = 2 if . 6 < U . 9 X = 3 if U > . 9 2) You are given the following 3 pseudo random numbers: .1234, .7656, .2343. Use them to generate 3 random variables with the pdf given above using the method from part 1). X 1 = 0 since . 1234 . 2 X 2 = 2 since . 6 < . 7656 . 9 X 3 = 1 since . 2 < . 2343 . 6 Problem 2. John and Mary play a game. Each of them roll a die until a six shows up. The one that get a six in the least number of throw wins. Let X 1 be the score of John and X 2 Mary’s. a) What is the distribution (pdf) of
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: X 1 and X 2 ? Both X 1 and X 2 are geometric with parameter 1 / 6. b) What is the probability that they tie? (Hint: you may want write this in terms of the X ’s and use conditioning) This is a simpliﬁed version of the hw #3, Pb 63 problem. Have to ﬁnd the probability P ( X 1 = X 2 ), that we get by conditioning, or equivalently by considering all possible values for X 1 and X 2 : P ( X 1 = X 2 ) = ∞ X 1= i P ( X 1 = X 2 = i ) = ∞ X 1= i 1 / 6(5 / 6) i-1 1 / 6(5 / 6) i-1 = 1 / 36 ∞ X 1= i (25 / 36) i-1 = 1 36 1 1-25 / 36 = 1 / 11 c) What is the probability that John wins? By symmetry, 1 = P (John wins)+ P (Mary wins)+ P (they tie) = 2 P (John wins)+ P (they tie). So by a) we get that P (John wins) = 5 / 11...
View Full Document

## This note was uploaded on 10/02/2009 for the course PSTAT 5E taught by Professor Eduardomontoya during the Spring '08 term at UCSB.

Ask a homework question - tutors are online