Solution Found!
Simulating a continuous random variable. A computer has a
Chapter , Problem 10(choose chapter or problem)
Simulating a continuous random variable. A computer has a subroutine that can generate values of a random variable U that is uniformly distributed in the interval [0, 1] . Such a subroutine can be used to generate values of a continuous random variable with given CDF F(x) as follows. If U takes a value u, we let the value of X be a number x that satisfies F(x) = u. For simplicity, we assume that the given CDF is strictly increasing over the range S of values of interest. where S = {x I 0 < F( x) < I}. This condition guarantees that for any u E (0. 1). there is a unique x that satisfies F(x) = u. (a) Show that the CDF of the random variable X thus generated is indeed equal to the given CDF. (b) Describe how this procedure can be used to simulate an exponential random variable with parameter 'x. (c) How can this procedure be generalized to simulate a discrete integer-valued random variable? Solution. (a) By definition, the random variables X and U satisfy the relation F(X) = U. Since F is strictly increasing, we have for every x, X x if and only if F(X) F(x). Therefore, P(X x) = P(F(X) F(x)) = p(U F(x)) = F(x) , where the last equality follows because U is uniform. Thus, X has the desired CDF. (b) The exponential CDF has the form F(x) = 1 - e->'x for x O. Thus, to generate values of X. we should generate values u E (0. 1) of a uniformly distributed random variable U. and set X to the value for which 1 - e->'x = u, or x = - In(1 - u)/,x. (c) Let again F be the desired CDF. To any u E (0. 1), there corresponds a unique integer Xu such that F(xu - 1) < u F(xu). This correspondence defines a random variable X as a function of the random variable U. We then have. for every integer k. P(X = k) = P(F(k - 1) < U F(k)) = F(k) - F(k - 1). Therefore, the CDF of X is equal to F, as desired.
Questions & Answers
QUESTION:
Simulating a continuous random variable. A computer has a subroutine that can generate values of a random variable U that is uniformly distributed in the interval [0, 1] . Such a subroutine can be used to generate values of a continuous random variable with given CDF F(x) as follows. If U takes a value u, we let the value of X be a number x that satisfies F(x) = u. For simplicity, we assume that the given CDF is strictly increasing over the range S of values of interest. where S = {x I 0 < F( x) < I}. This condition guarantees that for any u E (0. 1). there is a unique x that satisfies F(x) = u. (a) Show that the CDF of the random variable X thus generated is indeed equal to the given CDF. (b) Describe how this procedure can be used to simulate an exponential random variable with parameter 'x. (c) How can this procedure be generalized to simulate a discrete integer-valued random variable? Solution. (a) By definition, the random variables X and U satisfy the relation F(X) = U. Since F is strictly increasing, we have for every x, X x if and only if F(X) F(x). Therefore, P(X x) = P(F(X) F(x)) = p(U F(x)) = F(x) , where the last equality follows because U is uniform. Thus, X has the desired CDF. (b) The exponential CDF has the form F(x) = 1 - e->'x for x O. Thus, to generate values of X. we should generate values u E (0. 1) of a uniformly distributed random variable U. and set X to the value for which 1 - e->'x = u, or x = - In(1 - u)/,x. (c) Let again F be the desired CDF. To any u E (0. 1), there corresponds a unique integer Xu such that F(xu - 1) < u F(xu). This correspondence defines a random variable X as a function of the random variable U. We then have. for every integer k. P(X = k) = P(F(k - 1) < U F(k)) = F(k) - F(k - 1). Therefore, the CDF of X is equal to F, as desired.
ANSWER:Step 1 of 4
Given:
A random variable U is uniformly distributed in the interval [0, 1].
If U takes a value u, we let the value of X be a number x that satisfies F(x) = u.