netlogodistributionexponentialexponential-distribution

How to get a "reverse exponential distribution"?


Suppose I have X patches, and patches have a patch variable called "patch-quality", with values between 0 and 1. I want this patch variable to be generated randomly, but in two different ways (two different scenarios):

For Scenario 1 I don't have a problem, I use an exponential distribution with a mean of 0.13.

if (patch-quality-distribution = "scenario-1") [set patch-quality random-exponential 0.13]

My problem is with Scenario 2. I want an exponential distribution like the one with scenario 1 but "in reverse". Is there a way to have a sort of reverse exponential distribution in NetLogo where most patches have a patch-quality close to 1?


Solution

  • For getting that reverse exponential distribution (not inverse, as @pjs pointed out in his comment), you can use:

    [set patch-quality (1 - random-exponential mean_value)]