Question

Say I want to generate random variables from the probability distribution p={ 2-2x 0<x<1 0 ....

Say I want to generate random variables from the probability distribution

p={ 2-2x 0<x<1

0 . elsewhere

My scheme is to generate U's from [0,1],double them and plug them into the probability distribution. So U = 0.3 gives me p(0.6)=0.8 as random variable. Prove my idea is right or wrong.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Probability Density Function s given by:

,

           for 0 < x < 1

Cumulative Distribution Function F(x) is got by integrating f(x) from 0 to x as follows:

For generating random numbers following Probability Density Function f(x):

Generate random number u following Uniform Distribution in (0,1) and equate to F(x) as follows:

Solving this for x, we get:

,

where u is a random number in (0,1)

For example, for u = 0.3 gives you:

Add a comment
Know the answer?
Add Answer to:
Say I want to generate random variables from the probability distribution p={ 2-2x 0<x<1 0 ....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT