Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Math Forum
»
Discussions
»
Software
»
comp.softsys.matlab
Notice: We are no longer accepting new posts, but the forums will continue to be readable.
Topic:
How to generat Gamma random variables betwenn 0 and 1
Replies:
8
Last Post:
Oct 10, 2013 3:26 PM



Torsten
Posts:
1,717
Registered:
11/8/10


Re: How to generat Gamma random variables betwenn 0 and 1
Posted:
Oct 9, 2013 5:22 AM


"Zhou Yang" wrote in message <l331i1$n6o$1@newscl01ah.mathworks.com>... > I can generate gamma random variable using GAMRND(A,B). I estimate A and B using PARMHAT = GAMFIT(X). I imported my data set from Excel to "X". The results give random variables with some values greater than 1. But I want to generate random variables between 0 and 1. Is it possible with "parmhat", if so what is the syntax? > Thanks
I don't know the background of your question, but maybe you will have to estimate the parameters A and B of a truncated gamma distribution (truncated at x=1). Generating random numbers of this distribution will result in values between 0 and 1.
Best wishes Torsten.



