really interesting family of randomIndexDistribution: CapyTalk
I was looking at the Help description, and do understand it but then confused by one example:
(1 bpm: !BPM) nextRandomIndexFromDistribution: (0 to: 15 collect: [ :i | i twoExp])
this expands to
(1 bpm: !BPM dutyCycle: 0.5) nextRandomIndexFromDistribution: #( 1.0 2.0 4.0 8.0 16.0 32.0 64.0 128.0 256.0 512.0 1024.0 2048.0 4096.0 8192.0 16384.0 32768.0 )
as the two Exponential becomes large integers, then how does that relate to a percentage probability, as described in the description?
for example, if #(aStatisticalDistribution) is #(0 0.5 0.25 0.25), there is a zero likelihood of selecting a 0, a 50% chance of selecting 1, and a 25% chance of selecting 2 or 3.