Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi,
I am interested in generating random numbers from a Beta distribution with parameters a and b, where the generated numbers are distributed on the interval [Z1,Z2] and not [0,1]. I know the latter can be obtained by using rbeta(n,a,b).
Thanks
Hussein
Z1 + (Z2 - Z1)*rbeta(n,a,b)
Alan
AlanStevens wrote:
Z1 + (Z2 - Z1)*rbeta(n,a,b)
Alan
better
rAlanStevens(n, α, β, a, b) := a + (b - a)*rbeta(n, α , β)
I have saw in one sheet 100*runif(n, 0, 1)
And the second.
Do you know why we have rbeta, rgamma but not ralpha?
Thanks. I thought may be Beta has a specific function.