1. a problem !!!

hello ,veryone!
I have a problem with number generator of IMSL 5.0 for C#.
How can I find random number for Beta distribution ? "nextbeta()" get random number which the "x" btween 0 and 1,but what about "x" btween 0 and 50
Which function should I use and how?
eagerly Regards

2. Since NextBeta() returns (0,1) and you need that distribution on (0,50), just multiply the result by 50.

3. thank you for your help! ed ! what about x(a,b)[b>a]?how can i do that?

4. Originally Posted by beardgh
what about x(a,b)[b>a]? how can i do that?
I'm not sure what you're asking here -- can you clarify?

5. thank you ,ed!
"nextbeta()" get random number which the "x" btween 0 and 1,but what about "x" btween "a" and "b"?
Which function should I use and how?

6. I see now. To get a number in the range (a,b) from a distribution that gives you (0,1), you just need to multiply by the new range (b-a) and then add a as in:

v = NextBeta(p,q) * (b-a) + a

7. I began to think that this is the case：v = NextBeta(p,q) * (b-a).You helped me a lot of busy,ed.Thank you !!

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•