Question: 1 (Sampling from geometric distribution via Inverse Transform): Assume X is geometric w/ parameter p. Its probability function is given by P (X = n)

1 (Sampling from geometric distribution via Inverse Transform): Assume X is geometric w/ parameter p. Its probability function is given by P (X = n) = (1 p)n1p. As discussed during the lecture, to sample from geometric distribution we do as follows: 1. generate U U(0, 1) 2. set X = j if j1 k=1 (1 p)k1p < U j k=1 (1 p)k1p (a) show that step 2 is equivalent to X = int ( log(U ) log(1 p) ) + 1 (b) how does this method compare to the coin-tossing method for generating X? Problem 2 (Composition Example): We discussed using composition method to sample from the following distribution f (x) = 1 2 (x1 + (1 x)1) where 0 x 1 and > 0, > 0. This distribution is a mixture of two PDFs: f1(x) = x1 f2(x) = (1 x)1 with the following CDFs: F1(x) = x F2(x) = 1 (1 x) To sample from each CDF we can use inverse transform method. Sampling from F1(x): X = U 1 , U U(0, 1) and utilizing inverse transform method, sampling

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!