160a06_mdrev - /k ). When a key is put in a box that...

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

View Full Document Right Arrow Icon
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. 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). 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 X 1 and X 2 ? b) What is the probability that they tie? (Hint: you may want write this in terms of the X ’s and use conditioning) c) What is the probability that John wins?
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Problem 3. (40 points) Suppose that we are given k boxes and r keys to be put at random one after another into these k boxes. Each box is equaly likely to recieve a key (so the probability to put a key in any box is 1
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: /k ). When a key is put in a box that already contains a key, we say that a collision occurs. The goal is to nd the expected number of such collisions X . We also let Y be the number of boxes with at least one key (at the end of the allocation process). For instance, if we have 3 boxes and 4 keys, with no keys in the rst box, 4 in the second and 1 in the third, X is 3 (3 keys were added to the rst one in box 2) and Y is 2. The problem is divided in several elementary steps, and you should not be surprised to nd strong similarity with one of the homework problems: 1) What is the probability that a given box will recieve no keys at all? At least one? 2) Using the familiar trick of dening random variables with values 0 or 1, nd the expected value of Y . 3) Find a simple relationship between X and Y , and use it to compute the expected value of X (Hint: 3=5-2 in our example)...
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.

Page1 / 2

160a06_mdrev - /k ). When a key is put in a box that...

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