Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Give an efficient algorithm to simulate the value of a random variable with probability mass function

p1 = .15 p2 = .2 p3 = .35 p4 = .30

Short Answer

Expert verified

The algorithm is define Xusing the Uniform continuous distribution Uover (0,1).

Step by step solution

01

Given Information

We have given the probability mass function

p1=.15p2=.2p3=.35p4=.30

02

Simplify

Generating U~Unif(0,1).

Now, declare Xas follows

X=1,Uโˆˆ0,0.152,Uโˆˆ0.15,0.353,Uโˆˆ0.35,0.74,Uโˆˆ0.7,1

Consider that because of the construction we have, for example

P(X-1)=P(Uโˆˆ(0,0.15))=0.15=p1

and similarly for all other values

P(X=i)=pi

So, we haveXfollows the required discrete distribution.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

In Example 2c we simulated the absolute value of a unit normal by using the rejection procedure on exponential random variables with rate 1. This raises the question of whether we could obtain a more efficient algorithm by using a different exponential densityโ€”that is, we could use the density g(x) = ฮปeโˆ’ฮปx. Show that the mean number of iterations needed in the rejection scheme is minimized when ฮป = 1.

Let (X, Y) be uniformly distributed in the circle of radius 1 centered at the origin. Its joint density is thus

f(x,y)=1ฯ€0โ‰คx2+y2โ‰ค1

Let R = (X2 + Y2)1/2 and = tanโˆ’1(Y/X) denote

the polar coordinates of (X, Y). Show that R and are

independent, with R2 being uniform on (0, 1) and being

uniform on (0, 2ฯ€).

Let X be a random variable on (0, 1) whose density is f(x). Show that we can estimate # 1 0 g(x) dx by simulating X and then taking g(X)/f(X) as our estimate. This method, called importance sampling, tries to choose f similar in shape to g, so that g(X)/f(X) has a small variance.

The following algorithm will generate a random permutation of the elements 1, 2, ... , n. It is somewhat faster than the one presented in Example 1a but is such that no position is fixed until the algorithm ends. In this algorithm, P(i) can be interpreted as the element in position i. Step 1. Set k = 1. Step 2. Set P(1) = 1. Step 3. If k = n, stop. Otherwise, let k = k + 1. Step 4. Generate a random number U and let P(k) = P([kU] + 1) P([kU] + 1) = k Go to step 3. (a) Explain in words what the algorithm is doing. (b) Show that at iteration kโ€”that is, when the value of P(k) is initially setโ€”P(1),P(2), ... ,P(k) is a random permutation of 1, 2, ... , k.

Give an approach for simulating a random variable having probability density function

f(x) = 30(x2 โˆ’ 2x3 + x4) 0 < x < 1

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free