I am trying to find a methodology (or even better, the code) to do the following in Netlogo. Any help is appreciated (I could always try to rewrite the code from R or Matlab to Netlogo):
I have $5000, which I want to distribute following different beta distributions among 10 000 actors. The maximum amount an actor may receive is $1.
Basically, I am looking for a way to generate random numbers to actors (10000 actors) in a [0,1]
interval, following different beta distributions, where the mean of the distributed values remains equal to 0.5
. This way the purchasing power of the population (10000 actors with a mean of 0.5
is $5000) remains equal for beta(1,1)
(uniform population) as well as, for example, beta(4,1)
(rich population).
an example with 5 actors distributing 2,5 dollar:
beta(1,1) 0,5 - 0,5 - 0,5 - 0,5 - 0,5 (mean 0,5)
beta(4,1) 0,1 - 0,2 - 0,5 - 0,7 - 1,0 (mean 0,5)
I've been thinking. If there is no apparent solution to this, maybe the following could work. We can write the shape of the frequency distribution of beta(4,1)
as y=ax^2+b
with some value for a
and b
(both increase exponentially).
In my case, the integral(0-1)
of y=ax^2+b
should be 5000. Playing around with values for a
and b
should give me the shape of beta(4,1)
.
The number of actors having 0.1 should then be the the integral(0-0.1)
of y=ax^2+b
where a
and b
are parameters of the shape resembling the beta(4,1).
Is my reasoning clear enough? Could someone extend this reasoning? Is there a link between the beta distribution and a function of a
,b
,x
?