CloseRange
Member
So i just need to know how to calculate the overall odds of this dynamic odds (idk what else to call it)
how it works.
The odds start out as 1/n
any time the random check fails, n is decremented
any time the random check succeeds, n is reset.
so it looks something like this:
i know I can calculate this via code by tracking how many times it succeeds / total trys
however I need a mathy way to do it so I can reverse it and figure out what to set oddsMax to in order to get an overall 50% chance or whatever I need.
how it works.
The odds start out as 1/n
any time the random check fails, n is decremented
any time the random check succeeds, n is reset.
so it looks something like this:
Code:
var oddsMax = 9;
var n = oddsMax;
repeat(100) {
if(random(1) <= 1/n) {
n = oddsMax;
} else n--;
}
however I need a mathy way to do it so I can reverse it and figure out what to set oddsMax to in order to get an overall 50% chance or whatever I need.